Repository navigation
feat(dashboard): find, create and pick tags from the tag picker's search box - #35899
Conversation
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The change copies the combobox keyboard model the project picker already uses, and the removed catalog keys and old row roles have no readers outside the listed ones. [DESIGN-REVIEWED] baac451 Description read[DESCRIPTION-READ] 35922af85ad70d34b6f8833145bc82773e551244a7d0d60770585073c303efa5 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Every item answers the stated Goal. The one possible duplicate, the hand-rolled arrow-key highlight, is a note: the picker's "follow the typed text or nothing" highlight doesn't map cleanly onto an index-based shared hook. Notes
What this change shipsInventory (9 items) — 8 justifiedIntent: a person narrows, creates and assigns a session's tags from one search box in the Assign tags picker. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] baac451 Description read[DESCRIPTION-READ] 146405bb89e4ca3f49dbc1c562bfe70aa951c580441b1d66e24f40f09fc198ed That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader correctly identified the search box, the filtering and the Create row, said they would use them, and all 13 screenshots in both themes show every state the diff adds. Notes
[UX-REVIEWED] baac451 Description read[DESCRIPTION-READ] 8804d3bd1843e23fe06a1c3b27659aeea2eacef0c17a1c9622d89aacf8122d4a That sha256 names everything this verdict read: the PR description, plus the 16 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: A person should decideWhy: the decider raised 1 possible problem and estimates a 55% chance that this change introduces a defect; a person should check it. The search, filter, create-and-assign and keyboard work in SlotTagPopover is careful. It is well tested and leaves the write queue and revision logic alone. The default highlight is the blocker. When the first tag that matches the typed text is already on the session, the picker puts the ↵ hint on that ticked row. Enter then does nothing except clear the search, so the 'type a few letters, press Enter' goal fails on a common path. The UX Review lane's BLOCK says this, and the code confirms it. The repo's CI rules treat that BLOCK as a merge blocker until it is fixed or a human overrides it, and many test jobs were still pending. Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
0dd6364 to
d171cd6
Compare
|
self-added: yes
|
|
self-added: yes
|
d171cd6 to
a9c6943
Compare
|
self-added: yes
|
a9c6943 to
48f6151
Compare
48f6151 to
3be8614
Compare
…rch box The Assign tags picker opens with a focused search box at the top. Typing narrows the list by name. Enter on a name no tag has creates the tag and adds it to the session. Enter on an existing tag's exact name adds it and never removes it. The Up and Down arrows move a highlight through the rows while focus stays in the search box, and Enter on a highlighted row switches that tag, the same as a click. The search box replaces the New tag box at the bottom of the picker. The rows were also carrying bg-transparent beside their colour utility. The built CSS emits bg-transparent after the colour utilities, so it won and the checked-row fill never showed. Each row now has one background.
3be8614 to
baac451
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving. I read the whole diff: SlotTagPopover.tsx, both test files, the e2e and capture scripts, the doc and every locale.
- The search box filters and creates in one place. It's a combobox over a
listboxwitharia-activedescendant, so focus stays in the box and the arrows move a highlight. Enter acts on the highlighted row. The typed-text highlight goes only to a row where Enter adds something (exact name, else first match the chat lacks, else Create), so Enter can't silently remove a tag. A row the user moved to toggles like a click, which keeps removal reachable from the keyboard. - The add path is careful.
addreads the same latest listtoggledoes and is a no-op for a tag already on, so a duplicate create response (the gateway returns the existing tag for a taken name) and a double Enter before re-render both add once. A create that resolves after the picker moved to another chat assigns nothing. The tests pin each of these. - Nothing that worked is refused. Creating still works, from the Create row by Enter or click, and Manage tags… keeps its own New tag box. The search box is now usable offline (only the create is refused there, announced the same way), which is looser than the old read-only input. The tag write path and its gates are unchanged.
- Small details are handled. The IME keeps the arrows while composing, a resting pointer can't take the highlight (
usePointerMotion), touch doesn't steal focus, and the search resets on each open. - No regex in product code. The patterns are in the tests and the dev capture script.
Problem / Motivation
Goal: In the Assign tags picker, a person finds, creates and picks a session's tags from one search box, with the keyboard or the mouse.
The Assign tags picker lists every tag and has no way to narrow the list. With many tags you scan it by eye. Focus starts on the first tag, so typing does nothing.
To create a tag you move to the New tag… box at the bottom, type a name and press Enter. The new tag is not added to the session, so you find it in the list and click it as a second step.
Why it matters
Tagging a session is a frequent, small action, and today it takes a hunt through the list or three steps for a new tag. With the search box, the whole job is: open the picker, type a few letters, press Enter. That works for a tag that exists and for one that does not yet.
Not a goal
What changed (motivation → approach → change)
The picker opens with a search box at the top, and the box has focus. You type a tag's name into it whether the tag exists or not, so one box does both jobs: it filters the list and it creates. The keyboard model is the one the project picker's Browse tab already uses. Focus stays in the box, the Up and Down arrows move a highlight through the rows, and
aria-activedescendantnames the highlighted row. Enter acts on that row, and the row shows a ↵ mark.The highlight that follows the typed text skips tags the session already has. So the ↵ mark sits beside a checkmark only on a row you moved to, and Enter there removes that tag. Typing
reand pressing Enter adds the first tag that containsreand is not on the session. It does not create a tag namedre. To create that tag, press Up until the Create row at the top of the list is highlighted, or click it. A row you moved to toggles, because otherwise a keyboard user could not remove a tag.One function,
add, does every add-only change. It reads the same latest list thattogglereads, and it does nothing for a tag the session has. The create response goes through it, because the gateway returns the existing tag for a name that is already taken. That happens when Enter creates before the tag list has loaded. A second Enter that arrives before React renders again also goes through it, so it cannot remove the tag the first Enter added.The rows are
options in alistbox, which the combobox pattern needs, andaria-selectedmarks a session's tags. A click on a row keeps focus in the box. A pointer that moves over a row highlights it, and a pointer that only rests there does not (usePointerMotion). While an IME composes text, it keeps the arrow keys. On a touch device the box does not take focus, because the on-screen keyboard would cover the list. Offline, the box still filters, the Create row is refused, and no row shows the ↵ mark. If a create finishes after the picker moved to another chat, the new tag is not added, and the other chat's search box keeps its text.The rows also carried
bg-transparentbeside their colour class. The built CSS emitsbg-transparentlater at the same specificity, so it won, and the fill on a checked row never showed. Each row now has one background, and only the highlighted row has a fill. The checkmark marks a session's tags.In
website/src/i18n, three strings replace two in all twelve catalogs and the pseudolocale, anden.context.jsongives translators context for the new ones. The user docs insrc/kiro_crew/docs/dashboard.mddescribe the search box, the default highlight and how to reach the Create row. The Playwright spec andwebsite/scripts/capture-slot-tag-write-failure.mjsfind rows by their new role.website/scripts/capture-tag-picker-search.mjsis the screenshot harness for this PR.Backwards compatibility
Compatible: the picker's actions still work. A click switches a tag, a typed new name and Enter creates one, and the tag API calls are the same.
Readers of the removed catalog keys and the old row roles, found with
git grepon origin/main @ ab65f7a:Reader: website/src/components/SlotTagPopover.tsx:SlotTagPopover -- chat -- the only reader of
components.slotTagPopover.new_tagandno_tags_yet_create_one_below, now readsfind_or_create_tagandno_tags_yet_type_a_name(SlotTagPopover.cov80.test.tsx)Reader: website/playwright/session-tags-e2e.spec.ts:17. right-click session row opens Tags picker -- chat -- finds the row with role
optionReader: website/scripts/capture-slot-tag-write-failure.mjs:main -- chat -- finds the row with role
option, ran against this buildReader: website/integration/ChatSidebarTags.integration.test.tsx:tag picker shows current slot tags -- chat -- finds rows by text and the dialog by test id, unchanged and passing
Reader: website/src/test/ChatSidebar.tagFilter.test.tsx:renders one checkbox row per tag in the vocabulary -- chat -- reads
menuitemcheckboxon the sidebar filter menu's own rows, not on this picker, unchanged and passingTests
website/src/components/SlotTagPopover.cov80.test.tsxcovers the search box: focus on open and none on touch, the case-insensitive filter, the default highlight (the exact match, else the first match, skipping tags the session has, else the Create row, and none for a blank search), Enter on a partial match (adds the first match the session lacks, creates nothing), Up to the Create row, Enter on a new name (create, then the PUT that adds it), Enter on an exact name (adds it, and does nothing for a tag the session has), Enter on a row the pointer moved to (removes a tag the session has), a create that returns a tag the session has (no PUT), two Enter presses before a render (one PUT), the arrow keys (wrap, Create row, focus stays in the box), Enter on an arrowed row (toggles), the highlight following new text, arrows left to an IME (with a fake clock past the post-composition window), pointer motion, a click that keeps focus, a create that finishes after a switch to another chat (no PUT, and that chat's text stays), and one background class per row.website/src/test/SlotTagPopover.test.tsxcovers the offline Create row (refused, no ↵ mark) and the create errors through the search box.website/playwright/session-tags-e2e.spec.tsuses the new row role.Determinism of the two changed test files: 10 repeats, 90/90 each time, and a shuffled order (
--sequence.shuffle --sequence.seed=71), 90/90.Manual verification
website/scripts/capture-tag-picker-search.mjsdrives the built SPA against stub data in Chromium, in the dark and light themes. Each run asserts 28 facts before it takes a picture, among them: the search box has focus, the filter result, the highlighted row for a partial match and for a new name, the skipped tag the session has, focus staying in the box under the arrows, the create request and the PUT that adds the new tag, no highlight and no second PUT for an exact name the session already has, the empty-state text, and no create request and no ↵ mark offline. Both themes pass.capture-slot-tag-write-failure.mjsstill shows the rollback notice on a refused write.Screenshots / video
Before, on main: the New tag… box at the bottom, no filter.
After: the picker opens with the search box focused.
Typing
refilters the list and highlights Review, the first matching tag the session lacks. The highlight skips In progress, which the session has. The Create row stays at the top.Text no tag name contains highlights the Create row.
Arrow keys, exact match, create and assign, empty, offline, light theme
The arrow keys move the highlight while focus stays in the search box.
Up from Review reaches In progress. The ↵ mark now sits beside its checkmark, and Enter removes the tag.
An exact name highlights that tag, and Enter adds it.
The full name of a tag the session has highlights nothing, and Enter changes nothing.
After Enter on a new name, flaky exists, is checked, and the search is empty.
With no tags at all, the picker says to type a name.
Offline, the Create row is dimmed and has no ↵ mark, Enter sends nothing, and the typed text stays.
Light theme.
Related Issues
Closes #35898
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)