Skip to content

feat(dashboard): find, create and pick tags from the tag picker's search box - #35899

Merged
bolichen97 merged 1 commit into
mainfrom
feat/tag-picker-search
Nov 13, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/tag-picker-search

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

  • The Manage tags… panel. Its own New tag… box stays as it is.
  • Ranking or fuzzy matching. The filter is a case-insensitive "name contains the text" match.
  • How the picker opens, where it sits, and what a tag write sends to the gateway.

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-activedescendant names the highlighted row. Enter acts on that row, and the row shows a ↵ mark.

The search box holds Highlighted row Enter
nothing none does nothing
the exact name of a tag the session lacks that tag adds it
the exact name of a tag the session has none does nothing
part of the name of a tag the session lacks the first such tag adds it
text that no name contains, or only names of the session's tags Create “text” creates the tag and adds it to the session
anything, after the arrow keys or the pointer moved the row you moved to adds or removes that tag like a click, or creates on the Create row

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 re and pressing Enter adds the first tag that contains re and is not on the session. It does not create a tag named re. 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 that toggle reads, 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 a listbox, which the combobox pattern needs, and aria-selected marks 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-transparent beside their colour class. The built CSS emits bg-transparent later 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, and en.context.json gives translators context for the new ones. The user docs in src/kiro_crew/docs/dashboard.md describe the search box, the default highlight and how to reach the Create row. The Playwright spec and website/scripts/capture-slot-tag-write-failure.mjs find rows by their new role. website/scripts/capture-tag-picker-search.mjs is 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 grep on origin/main @ ab65f7a:

Reader: website/src/components/SlotTagPopover.tsx:SlotTagPopover -- chat -- the only reader of components.slotTagPopover.new_tag and no_tags_yet_create_one_below, now reads find_or_create_tag and no_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 option
Reader: website/scripts/capture-slot-tag-write-failure.mjs:main -- chat -- finds the row with role option, ran against this build
Reader: 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 menuitemcheckbox on the sidebar filter menu's own rows, not on this picker, unchanged and passing

Tests

  • website/src/components/SlotTagPopover.cov80.test.tsx covers 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.tsx covers the offline Create row (refused, no ↵ mark) and the create errors through the search box.
  • website/playwright/session-tags-e2e.spec.ts uses 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.mjs drives 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.mjs still shows the rollback notice on a refused write.

Screenshots / video

Before, on main: the New tag… box at the bottom, no filter.

Before: the picker on main

After: the picker opens with the search box focused.

After: search box focused on open

Typing re filters 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.

Typing re: Review highlighted, In progress skipped

Text no tag name contains highlights the Create row.

Typing flaky: Create row highlighted

Arrow keys, exact match, create and assign, empty, offline, light theme

The arrow keys move the highlight while focus stays in the search box.

Arrow keys highlight In progress

Up from Review reaches In progress. The ↵ mark now sits beside its checkmark, and Enter removes the tag.

One Up from Review to In progress

An exact name highlights that tag, and Enter adds it.

Exact match review highlighted

The full name of a tag the session has highlights nothing, and Enter changes nothing.

Exact name of a tag the session has, nothing highlighted

After Enter on a new name, flaky exists, is checked, and the search is empty.

flaky created and assigned

With no tags at all, the picker says to type a name.

Empty state: no tags yet

Offline, the Create row is dimmed and has no ↵ mark, Enter sends nothing, and the typed text stays.

Offline: Create row dimmed, no Enter mark

Light theme.

Light theme, Review highlighted

Light theme, arrow highlight

Related Issues

Closes #35898

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of baac4514129f8017ba25e9341c30d4277a5abb00 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] baac451

False positive or not applicable? A repository writer can comment:
/ai-review override gpt baac4514129f8017ba25e9341c30d4277a5abb00 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of baac4514129f8017ba25e9341c30d4277a5abb00 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of baac4514129f8017ba25e9341c30d4277a5abb00 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Item 3 — one consumer, generalized: moveHighlight plus the input's onKeyDown arrow branch is a second version of useListKeyboardNav (website/src/hooks/useListKeyboardNav.ts). Six non-test components call that hook, and SettingsSearch.tsx already uses it with focus held in an input plus aria-activedescendant. The description cites "the project picker's Browse tab", which also writes its own arrow handling (ProjectPicker.tsx:1052). Subtraction: replace moveHighlight and the arrow branch with useListKeyboardNav({ wrap: true, ... }) and keep only the picked === null follow-the-typed-text rule here.

What this change ships

Inventory (9 items) — 8 justified

Intent: a person narrows, creates and assigns a session's tags from one search box in the Assign tags picker. This is an ADDITION.

  1. The picker opens with a focused search box that filters tags by "name contains" — justified
  2. Typing a new name shows a "Create “…”" row; the New tag… box at the bottom is gone — justified
  3. Up/Down move a highlight through the rows while focus stays in the box; Home/End now move the text cursor instead of the list — one consumer, generalized
  4. Enter adds the highlighted tag, and the highlight skips tags the session already has — justified
  5. A newly created tag is now added to the session straight away — justified
  6. Moving the pointer over a row highlights it; a pointer that only rests there does not — justified
  7. Checked rows no longer get a fill (the fill never rendered before); only the highlighted row is filled — justified
  8. Rows are announced as listbox options instead of menu checkboxes — justified
  9. A new screenshot harness, capture-tag-picker-search.mjs — justified

[FIRST-PRINCIPLES-REVIEWED] baac451

Description read

[DESCRIPTION-READ] 146405bb89e4ca3f49dbc1c562bfe70aa951c580441b1d66e24f40f09fc198ed

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of baac4514129f8017ba25e9341c30d4277a5abb00 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • When the highlight sits on a tagged row (shots 5, 6, 13), the reader said "I would hesitate… could mean 'Enter adds it' or 'Enter removes it'." Use a distinct mark on a checked, highlighted row, such as a minus or "remove" hint, instead of the same CornerDownLeft icon.
  • In shot 3, + Create "re" sits above the highlighted "Review" row. The reader was unsure which one Enter would pick. Showing the Create row with weaker emphasis than the highlighted row while a partial match exists would make the Enter target clear.
  • In shot 8, the only matching row loses its highlight and ↵ mark once it is checked, and the reader had "no idea" what Enter does next. Keep the highlight on that row so a second Enter has a visible target.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed baac4514129f8017ba25e9341c30d4277a5abb00 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] baac451

Verdict parsed from the review's SHA-scoped output markers for commit baac4514129f8017ba25e9341c30d4277a5abb00.

False positive or not applicable? A repository writer can comment:
/ai-review override fable baac4514129f8017ba25e9341c30d4277a5abb00 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

KiroCrewCaptain commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: 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):

  • The PR's stated goal is 'open the picker, type a few letters, press Enter'. That breaks whenever the first matching tag is already on the session. Enter is offered on that row and does nothing visible, then clears the search, so the user loses the text and the tag they meant (for example 'Review') i (website/src/components/SlotTagPopover.tsx, medium)

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 d171cd6a2c · 1209 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 12, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/tag-picker-search branch from 0dd6364 to d171cd6 Compare November 12, 2026 19:30
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: with no exact match the default highlight fell to the Create row, so Enter on a partial match created a tag

  • span=b540f7d0a93d Enter on a partial match created a tag

fixed in d171cd6: the default highlight is the exact match, then the first matching tag, then the Create row. A blank search highlights nothing.
Enter on a typed highlight only adds. Typing rev and pressing Enter adds Review and creates no tag named rev.
The Create row stays first in the list, one Up from the first match.
The test "Enter on a partial match adds the first matching tag, creates nothing, and clears the search" covers the defect.
The tests "from the default partial-match highlight, ArrowUp reaches the create row" and "the arrows reach the create row above the first match" fail on the old code.
Screenshots 03 and 04 in the PR body show the first match highlighted with the Create row above it.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: the create response called toggle, and toggle removes a tag that the chat already has

  • span=0c1f303ac5be A duplicate create response removed an assigned tag

fixed in d171cd6: a new add(tagId) reads pendingRef.current ?? slot?.tags and returns if the tag is there. Otherwise it calls toggle, which then always adds.
createTagMutation.onSuccess calls add through addRef. A create that returns a tag the chat has sends no PUT and removes nothing.
An Enter on a typed highlight uses the same add path. A second Enter before a render reads pendingRef and does not remove the tag that the first Enter added.
The test "a duplicate create response keeps the tag already assigned to the chat" fails on the old code and passes now.
The test "two Enter keydowns on the same add-only highlight add the tag once" covers the second Enter.
The repair ran on gpt-5.6-sol because this backend serves no GPT 6 model.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 12, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/tag-picker-search branch from d171cd6 to a9c6943 Compare November 12, 2026 20:47
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: typedKey took the first matching tag even when the chat had it, so the Enter mark sat beside a checkmark and Enter there only cleared the search

  • span=f15cad76912d The default highlight landed on a tag the chat already has

fixed in a9c6943: the highlight that follows the typed text skips tags the chat has. It goes to the exact match the chat lacks, then the first match the chat lacks, then the Create row.
The exact name of a tag the chat has highlights nothing, and Enter does nothing there.
A row picked with the arrows or real pointer motion acts like a click, so Enter on a picked checked row removes it. The Enter mark now has this one meaning.
Offline, no row shows the Enter mark, because Enter is refused.
The docs say to press Up until the Create row is highlighted, because a checked tag can sit between the highlight and the Create row.
The tests "a partial match skips a tag the chat already has, and Enter adds the first match it does not have" and "the exact name of a tag the chat already has highlights nothing, and Enter changes nothing" cover the defect and fail on the old code.
The test "Enter on the exact-name row of a tag the chat has, once the pointer picked it, removes it like a click" covers the picked row.
Screenshot 03 shows re highlighting Review with In progress skipped. Screenshot 04 shows one Up to In progress with the mark beside its checkmark. Screenshot 07 shows Enter on an exact match.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 12, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/tag-picker-search branch from a9c6943 to 48f6151 Compare November 12, 2026 22:30
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/en.context.json and the website/src/i18n/locales catalogs since this head went green (4de745e -> b3bf88b); CI re-running.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 12, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/tag-picker-search branch from 48f6151 to 3be8614 Compare November 12, 2026 22:47
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in no file this PR touches (b3bf88b -> 0feaa8b). The rebase picks up #36124, which restores the GitFork import that main dropped in AssistantMessage.tsx and that failed Frontend Lint & Type Check, Build Wheel and Build Desktop on the previous head; CI re-running.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 13, 2026
…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.
@Pearcekieser
Pearcekieser force-pushed the feat/tag-picker-search branch from 3be8614 to baac451 Compare November 13, 2026 01:02
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/en.context.json and 13 website/src/i18n/locales/*.json files since this head went green (0feaa8b -> 0842788); CI re-running.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 13, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 listbox with aria-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. add reads the same latest list toggle does 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.

@bolichen97
bolichen97 enabled auto-merge (squash) November 13, 2026 02:27
@bolichen97
bolichen97 merged commit 52cb13e into main Nov 13, 2026
99 checks passed
@bolichen97
bolichen97 deleted the feat/tag-picker-search branch November 13, 2026 02:27
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tag picker: search box that filters tags and creates one on Enter

3 participants