Skip to content

feat(crew): search past workers in the Crew Mode Workers panel - #25948

Merged
chenmingwei23 merged 1 commit into
fix/crew-panel-collapse-finishedfrom
feat/crew-panel-worker-search
Oct 29, 2026
Merged

chenmingwei23 merged 1 commit into
fix/crew-panel-collapse-finishedfrom
feat/crew-panel-worker-search

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In a Crew Mode chat's Workers panel, a search box finds any worker, live or finished, by its title or task line.

A long Crew Mode session collects many finished workers. #25876 folds them under Done. Finding one past worker still means opening Done and scrolling through every card.

Why it matters

A conductor often goes back to a finished worker to read what it did or to reopen it. With dozens of workers, scrolling to find it is slow.

Not a goal

What changed (motivation → approach → change)

The list view of the Workers panel now has a labelled search box once the crew has 6 or more workers. It is the shared list search row, SearchFilterBar, the same field the Sessions sidebar and the Crew Members roster use. A shorter list is easy to scan. As you type, cards are filtered by title or task line. Case is ignored, full-width letters match plain ones, and Chinese and other CJK text matches as typed. Live and finished workers are both searched. While a query is on, finished matches show under a plain Done heading even if Done is folded. The saved fold choice is never touched, so clearing the query folds Done back as it was. Once the list has been read, no match shows "No crew member matches “…”." It is not shown while the read is pending or failed, because finished workers are not loaded yet. Esc or the clear button empties the box. The query is kept per Crew Mode root for the browser tab, so opening a match does not wipe the search.

website/src/lib/crewWorkers.ts adds searchCrewWorkers(), beside the finishedCrewWorkers() seam that #25876 left. Four new strings are in every catalog under website/src/i18n/locales/, and en-XA is regenerated. A capture page shows the real component with a fixture list.

Backwards compatibility

Compatible: under 6 workers the panel is unchanged; with more, the only addition is the search box above the same list.

Tests

CrewWorkerList.test.tsx, new CrewWorkerList search block:

  • filters by title as you type, case-insensitive
  • matches the task line too
  • CJK match (登录 finds a finished worker titled 修复登录页面, and 已合并 matches its task line)
  • finished matches are shown while Done is folded, under a plain heading; the fold choice is not written
  • clearing the search folds Done back (both folded and open cases)
  • empty-result state, and "No crew yet" is not shown
  • Esc clears the search and restores the list
  • the query survives the remount that opening a match causes
  • a saved query with the read pending or failed shows no "no match" line (this test fails with the guard removed)
  • no search box under CREW_WORKER_SEARCH_MIN
  • searchCrewWorkers folds case and full-width forms; a blank query matches all

Determinism: the file passed 5 runs with --sequence.shuffle and random seeds (34/34 each). No timers or clocks in the new tests.

Local: tsc -p tsconfig.app.json, eslint, lint:theme-colors, lint:phantom-classes, lint:restyle-ratchet and lint:i18n are green. Vitest for command-center, lib, components, the SearchFilterBar parity test and the other suites that mount the list passes (2590 tests), and the i18n suite passes (1039). Local GPT-contract and Opus reviews: PASS. Opus's one note, that the query was lost when a match was opened, is fixed in this commit. Round 2 fixes the CI findings: the field reuses SearchFilterBar, query storage uses safeStorage, and the empty-result line waits for the full list.

Manual verification

I loaded website/capture/crew-worker-search.html in Chromium through Playwright. I checked the empty box at rest, an English query, a CJK query and a query with no match, pressed Esc, and checked the light theme and zh-CN.

Screenshots / video

Screenshots are attached below: the box empty at rest with Done folded, English query, CJK query, no match, zh-CN, and the light theme.

Related Issues

Closes #25943

Stacked on #25876 (base fix/crew-panel-collapse-finished). It will be rebased onto main once #25876 merges.

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

idle-dark

query-dark

cjk-dark

empty-dark

query-zh-dark

query-light

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 29, 2026 20:49
@iamwhatever
iamwhatever requested review from cruisercohen and removed request for a team October 29, 2026 20:49
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the search runs on the client over the list the panel already reads, reuses SearchFilterBar, never writes the saved fold choice, takes nothing away, and six screenshots of this revision were downloaded.

[DESIGN-REVIEWED] 2c4b665

Description read

[DESCRIPTION-READ] b09732b980d50135bb0bf5d678bbebc0990c3e41660f57e89a625a179a5cd677

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 Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

No blockers. The blind reader understood the search box and the clear button, and the screenshots cover every state the PR adds: at rest, English and CJK queries, no match, zh-CN and the light theme.

Notes

  • The three new strings name the thing being searched three ways: the box label workers_search_label "Search the crew", the placeholder "Search by task…" and the no-match line "No crew member matches “…”." The blind reader said: "I thought I was searching jobs, not people." Also, the search matches titles as well as task lines. Use one term, for example "Search workers…" and "No worker matches “…”.", so the strings agree with each other and with the Workers panel name.
  • In the light-theme screenshot (shot-06) the search field is solid mid-grey, and the reader "would hesitate" because "it looks disabled". Check SearchFilterBar's light-mode fill in this panel, or on the capture page, against the white cards around it.
  • While a query is active, the Done heading loses its chevron, and the reader "can't tell how to fold it again". Keep a non-interactive cue showing that Done is open because of the search, or keep the chevron visible but disabled.

[UX-REVIEWED] 2c4b665

Description read

[DESCRIPTION-READ] 6ef265d800dc5640de3b05a8e0a93b81248bfa86739a2ef69e00004a72ca4e9c

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 .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 Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 2c4b665

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

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

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 2c4b6651dfec12869b449cf119ca3d099ce4fda2 — 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 removes the harm the Goal names. The only note is the unmeasured 6-worker threshold for showing the search box.

Notes

  • Item 1 — inherited: the 6-worker gate rests on "A shorter list is easy to scan", which is an opinion, not a measured cost or a report. It also adds a hidden-until state and a searching || exception to showSearch. Subtraction: delete CREW_WORKER_SEARCH_MIN and always show the box in list view. That also removes the under-minimum test and the special case for a saved query below the threshold.

What this change ships

Inventory (8 items) — 7 justified

Intent: find any past or live worker in a long Crew Mode Workers panel without scrolling through Done. This is an ADDITION.

  1. A search box appears above the worker cards once the crew has 6 or more workers. — inherited (threshold)
  2. Typing filters cards by title or task line, ignoring case and full-width forms. — justified
  3. While a query is on, finished matches show under a plain Done heading, and the fold choice is untouched. — justified
  4. A "No crew member matches" line appears only after the full list has loaded. — justified
  5. Esc or the clear button empties the box. — justified
  6. The query is kept per Crew Mode root for the browser tab, so it survives opening a match. — justified
  7. The new exported searchCrewWorkers() helper in lib/crewWorkers.ts. — justified
  8. Four new catalog strings in every locale, and a capture page for manual checking. — justified

[FIRST-PRINCIPLES-REVIEWED] 2c4b665

Description read

[DESCRIPTION-READ] 9e5a68c10ad24028cb4dc6711e1b3f6f8139277b5826b40a5ff8b8a08d42c353

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 Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 2c4b665

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

@iamwhatever
iamwhatever force-pushed the feat/crew-panel-worker-search branch from dba8284 to 2c4b665 Compare October 29, 2026 21:26
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=aea961933fa4 -- The worker search box is a second version of the shared list search field

fixed in 2c4b665: CrewWorkerSearch now renders SearchFilterBar; its own input, Search icon and clear button are removed.
The note on item 5 is fixed too: the query is stored with safeGetSessionItem / safeSetSessionItem.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=3a0d1dc0b8a8 -- No-match line shown while the list read is pending or failed

fixed in 2c4b665: the no-match line now has the same workers.isSuccess || routeNotServed(workers.error) guard as the plain empty state.
New test: a saved query with the read pending, then failed, shows no no-match line; it fails with the guard removed.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 29, 2026
@chenmingwei23
chenmingwei23 merged commit 1f7870e into fix/crew-panel-collapse-finished Oct 29, 2026
28 of 33 checks passed
@chenmingwei23
chenmingwei23 deleted the feat/crew-panel-worker-search branch October 29, 2026 23:34
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 29, 2026
iamwhatever pushed a commit that referenced this pull request Oct 30, 2026
…in the Workers panel

Finished workers fold under a Done toggle, closed by default, so live workers
stay on top. From 6 workers up, a search box (the shared SearchFilterBar)
filters live and finished workers by title or task line; matches inside a
folded Done group show while the query is on, and clearing it restores the
fold. Includes the search work from #25948.

Closes #25857
Closes #25943
iamwhatever pushed a commit that referenced this pull request Oct 30, 2026
…in the Workers panel

Finished workers fold under a Done toggle, closed by default, so live workers
stay on top. From 6 workers up, a search box (the shared SearchFilterBar)
filters live and finished workers by title or task line; matches inside a
folded Done group show while the query is on, and clearing it restores the
fold. Includes the search work from #25948.

Closes #25857
Closes #25943
rnoack1 pushed a commit to rnoack1/KiroCrew that referenced this pull request Oct 30, 2026
…in the Workers panel (kirodotdev#25876)

Finished workers fold under a Done toggle, closed by default, so live workers
stay on top. From 6 workers up, a search box (the shared SearchFilterBar)
filters live and finished workers by title or task line; matches inside a
folded Done group show while the query is on, and clearing it restores the
fold. Includes the search work from kirodotdev#25948.

Closes kirodotdev#25857
Closes kirodotdev#25943

Co-authored-by: Joe Guo <zejiangg@amazon.com>
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.

2 participants