Repository navigation
feat(sidebar): hide every PR and Issue chip from the session menu - #18556
Conversation
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The partial-failure notice is four sentences that contradict each other, and no first-time reader has checked any of the new states. Watch
Suggestions
[UX-REVIEWED] 75ac570 Description read[DESCRIPTION-READ] d2cffd2b43be298467a4c05b8e5f20b53c9395bb816e543bc69985bbfece1825 That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check one case: if the menu closes mid-walk and reopens, the "Stopped after N of M" count is lost because the walk's state lives inside the submenu, which unmounts on close. [DESIGN-REVIEWED] 75ac570 Description read[DESCRIPTION-READ] b3cbbf276e6c510dfaaca0183bcb26c06ac317a1bdfcd15024ba6c3a2cbe2aa9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The "Stopped after hiding N of M chips" prefix brings in new state that has to be reset in three places, but the chips still listed already show what was left. Not justified as shipped
What this change shipsInventory (7 items) — 6 justifiedIntent: let a user clear every PR and Issue chip from one session in a single confirmed action instead of two clicks per chip. ADDITION (#18555).
[FIRST-PRINCIPLES-REVIEWED] 75ac570 Description read[DESCRIPTION-READ] 78fb2d2de012c3f1cee8eb04e1474cfcaf6ad229694c6cd2d23cf6a385fb6cc1 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
7ae3110 to
e61d113
Compare
|
Pushed e61d113 for the UX review on 7ae3110 and the design note. issue (blocking): evidence gaps for the walk, loading and stopped states. issue (non-blocking): a partial failure said nothing about progress. suggestion (non-blocking): put the count in the confirm. note (non-blocking): the walk keeps sending DELETEs if the menu closes partway. |
e61d113 to
f2b289a
Compare
|
Pushed f2b289a for the round 2 findings on e61d113, plus the Frontend Tests (1) failure. issue (blocking): GPT 6.1, errors-use-error-notice at SourceLinksSubmenu.tsx:368. Fixed. The stopped count is no longer a separate muted issue (non-blocking): Opus 5.5, a stale stopped count could attach to a later single-chip failure. Fixed. Staging a single chip now clears note (non-blocking): UX placement of the notice. Kept at the bottom of the submenu, which is where single-chip hide errors already render, so both failures read the same way. note (non-blocking): UX, the stopped count rendered muted next to a red error. Resolved by the same ErrorNotice change, since the count is now part of the red notice. suggestion (non-blocking): UX, a "Loading all chips" line while the full list loads. Deferred. The disabled entry already blocks the action until the list is complete, and the label would add a new key to 12 catalogs for a state that lasts one request. chore: Frontend Tests (1) on e61d113. |
f2b289a to
2f14fc1
Compare
|
Rebased on main (adfd71b), no behaviour change. The diff-only SAST (Semgrep) scan on f2b289a flagged test/test_readiness_poll_gate_max_age_14857.py:83, which this PR does not touch. It came in from main because the branch sat on the older base d4c3a73. The rebase was clean, and the SourceLinksSubmenu and src/i18n tests pass locally (745). |
|
note (non-blocking): could a maintainer re-run three failed jobs on 2f14fc1? The fork cannot re-run them (gh run rerun needs admin rights). All other 86 checks pass, and none of the three touches this diff.
|
2f14fc1 to
6cf4585
Compare
6cf4585 to
e82ee84
Compare
e82ee84 to
3499b25
Compare
|
Pushed 3499b25 for Build Wheel and both Build Desktop jobs on e82ee84. chore: the frontend build runs |
3499b25 to
7ffae6f
Compare
|
Pushed 7ffae6f for Build Wheel, both Build Desktop jobs and E2E (stub ACP backend, offline) on 3499b25. All four stopped at the same thought (non-blocking): First Principles, item 5, the partial-failure count repeats what the remaining list shows. Kept. The list alone cannot tell a stop after 0 of 6 from a stop after 2 of 6 without the user remembering how many chips there were, and the count is one string inside the existing ErrorNotice, which GPT 6.1 required in round 2. |
|
CI on 7ffae6f finished with 90 checks passing. Frontend Tests (3) failed one test, and Frontend Coverage Merge, Coverage Gate and PR Readiness failed after it. The failing test is src/guide/GuideLayer.test.tsx > "pressing the highlighted control on the last step finishes the guide, as Done does" (expected 2 reports, got 1). This PR does not touch that file, and the test passes 3 of 3 runs locally on the same head. The fork account cannot re-run jobs. Could a maintainer re-run the failed jobs on this run? |
7ffae6f to
75ac570
Compare
|
Rebased on main (d32c084), no behaviour change. Main regenerated src/kiro_crew/docs/ui-index.generated.json, which conflicted with this PR's copy. I took main's file and re-ran |
iamwhatever
left a comment
There was a problem hiding this comment.
This adds a "Hide all PR and Issue chips" entry to the session menu so a session with many chips can be cleared in one confirmed action (issue #18555, tier:T2). I read SourceLinksSubmenu.tsx in full. The entry uses the same two-step confirm as a single chip. It walks the existing per-link DELETE one request at a time, each carrying the generation captured at staging. It also stops locally when the live generation moves or a request fails. It stays disabled until the complete list has loaded (a placeholder carried across a re-key does not count), so chips behind "+N" are included. No new backend path and no wider permission: every request is one the single-chip path already sends. The new tests cover ordering, the sequential walk, stops after 0 and 1 chips, a truncated list, a same-key recreation dropping a staged hide, focus retention and the one-chip case. The temp-screenshots PNGs are on a fork PR, where the repo rules allow committed evidence. All checks are green at 75ac570, and GPT, Opus and Design pass. Non-blocking: UX says the stopped notice reads contradictorily ("Stopped after hiding 2 of 6… Could not hide. Try again."). Rewording it to say what "try again" means (select Hide all again) would be a cheap follow-up. — crew-pr-reviewer
A stopped hide-all walk showed "Stopped after hiding 2 of 6 chips. The chips still listed were not hidden." followed by the generic single-chip "Could not hide. Try again.", which read as contradicting the count. The stopped notice now ends with "To try again, hide the rest from this menu." in all 13 catalogs. It names the menu rather than Hide all because a single remaining chip removes that entry. Follow-up to the review on kirodotdev#18556.
A stopped hide-all walk showed "Stopped after hiding 2 of 6 chips. The chips still listed were not hidden." followed by the generic single-chip "Could not hide. Try again.", which read as contradicting the count. The stopped notice now ends with "To try again, hide the rest from this menu." in all 13 catalogs. It names the menu rather than Hide all because a single remaining chip removes that entry. Follow-up to the review on #18556.
Problem / Motivation
Goal: A user can hide every PR and Issue chip on a session from its right-click menu in one action, instead of one chip at a time.
The session menu's "Hide a PR or Issue chip" submenu hides one chip per two clicks. A long-running session collects 20 or more chips (a fleet worker that rebased across many PRs, a triage thread), so clearing its row takes 40 or more clicks through a scrolling list.
Why it matters
Chips on a stale session crowd the sidebar row and its strip wraps to several lines. The single-chip path makes clearing them tedious enough that users leave them, which keeps the sidebar noisy.
Not a goal
What changed (motivation → approach → change)
The submenu in
website/src/components/SourceLinksSubmenu.tsxnow starts with a "Hide all PR and Issue chips" entry, shown when the session has two or more chips. It uses the same two-step confirm as a single chip: the first select stages it ("Select again to permanently hide all 4 chips", with the count of chips it will hide), the second commits.Committing walks the existing per-link DELETE one identity at a time. Each request carries the session generation captured at staging, so the backend's 409 guard refuses any request that would land on a replacement session, and the loop also stops locally once the live generation moves. The first refusal stops the walk and shows the existing "Could not hide" notice. I chose reuse over a new bulk endpoint because the per-link handler already owns the generation, rebind and persistence guards, and duplicating them for a bulk path would be a second copy of that logic.
On a session whose row shows only part of its chips, the entry stays disabled until the full list has loaded from the source-links read, and a placeholder list carried across a re-key does not count as loaded, so chips behind "+N" are included. While the walk runs every entry is disabled and the "hide all" entry reads "Hiding chip 2 of 6". It stays mounted until the walk ends so keyboard focus is not dropped. If a request fails partway, the existing error notice reads "Stopped after hiding 2 of 6 chips. The chips still listed were not hidden. Could not hide. Try again.", so the count reaches the notice's report and the agent hand-off, and the chips it did not reach stay listed. If the menu closes mid-walk, the walk still runs to the end, the same way a single committed hide finishes after the menu closes, and a reopened menu disables its entries while a DELETE is in flight. Staging a single chip clears an earlier walk's count. The four new strings are added to
website/src/i18n/locales/en.manual.json, translated in every shipped catalog underwebsite/src/i18n/locales/, and theen-XA.jsonpseudolocale is regenerated.Backwards compatibility
Compatible: the single-chip entries and the DELETE contract are unchanged; the new entry only issues requests the single-chip path already issues.
Removes nothing: the diff adds a menu entry and two catalog keys and takes nothing away.
Tests
website/src/test/ChatSidebar.sourceLinkUnlink.test.tsxgains eight cases, seven tests with one run against both menus:Two keyboard tests now step past the new first entry with ArrowDown.
Manual verification
Ran the built SPA in Playwright against stubbed
/apiroutes: right-click a session with four chips, open the submenu, select "Hide all" twice, and confirm four DELETEs and an empty chip strip, in dark and light themes. A second run used a truncated session with six chips, a held source-links read and a 503 on the third DELETE, to capture the loading, walking and stopped states.Screenshots / video
The submenu with the new entry (dark):
After the first select, staged for confirmation with the count (light):
After the second select, the row has no chips (dark):
A truncated session ("+2") before its full list loads, with the entry disabled and a spinner above it (dark):
Mid-walk, the entry reads "Hiding chip 2 of 6" and every entry is disabled (light):
The third DELETE failed: two chips are gone, the four it did not reach stay listed, and the error notice carries the count (dark):
Related Issues
Fixes #18555
Checklist