Skip to content

feat(crew): fold finished workers under a collapsible Done group in the Workers panel - #25876

Merged
dodgeblaster merged 1 commit into
mainfrom
fix/crew-panel-collapse-finished
Oct 30, 2026
Merged

dodgeblaster merged 1 commit into
mainfrom
fix/crew-panel-collapse-finished

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In a Crew Mode chat's Workers panel, finished workers fold away under one Done toggle so the live workers stay in view, and a search box finds any worker, live or finished, by its title or task line.

Finished workers (ledger item closed or reported done, or tab closed) stayed in the Workers panel at full size under "Done". Over a long session that group grows long and pushes the live workers out of view. Once they are folded away, finding one past worker means opening Done and scrolling through every card.

Why it matters

A conductor with many finished workers has to scroll past them to find the ones that need attention. A conductor also often goes back to one finished worker to read what it did or to reopen it.

Not a goal

  • A server-side search or a new endpoint. The search covers the list the panel already reads.
  • Searching transcripts or anything beyond a worker's title and task line.
  • Search in the Timeline view.
  • The "open the right panel" notice after dispatch, the worker-view banner and Back control, the conductor status strip, the Crew Mode welcome, the Crew-tab-default task, and the sidebar group-by-kind filter. Other PRs own those.
  • Any change to how a worker's group is decided (the gateway's group field stays the source).

What changed (motivation → approach → change)

The panel already groups workers by the gateway's group field, with finished ones in done. The Done heading is now a button with aria-expanded. It starts shut, and the choice is kept per browser with usePersistedBool. The live groups stay on top. A shut Done group still shows the worker on screen, marked current. A finished worker still opens, or reopens from its transcript.

From 6 workers up (CREW_WORKER_SEARCH_MIN), the list view has a labelled search box. It is the shared list search row, SearchFilterBar. Typing filters cards by title or task line (searchCrewWorkers() in website/src/lib/crewWorkers.ts). Case is ignored, full-width letters match plain ones, and CJK text matches as typed. While a query is on, finished matches show under a plain Done heading even when Done is folded. The saved fold choice is not written, so clearing the query folds Done back. Once the list is read, no match shows a line that says so. Esc or the clear button empties the box. The query is kept per Crew Mode root for the browser tab (safeStorage), so opening a match does not wipe it.

Four new strings are in every catalog under website/src/i18n/locales/, and en-XA is regenerated: commandCenter.workers_search_label, workers_search_placeholder, workers_search_clear, workers_search_empty. Two capture pages show the real component with a fixture list.

This PR now holds #25948 (merged into this branch), rebased on main and squashed to one commit.

Backwards compatibility

Compatible: the list renders the same rows; the Done group starts shut and one click shows it. Under 6 workers there is no search box.

Removes nothing: every finished worker is still listed and still opens.

Tests

CrewWorkerList.test.tsx:

  • finished workers fold by default with the right count, and live workers all show
  • one click opens and shuts Done, and the choice survives a remount
  • a shut Done still shows the worker on screen, marked current
  • a finished worker in the open group still opens like today
  • a worker whose group moves to done joins the folded count
  • search: title match, case-insensitive; task-line match; CJK match; finished matches shown while folded; clearing restores the fold (folded and open); empty-result state; Esc clears; query kept across the remount that opening a match causes; no "no match" line while the read is pending or failed; no box under 6 workers; searchCrewWorkers folds case and full-width forms

CrewTimeline.test.tsx opens the Done group before clicking a finished worker and clears the fold key in afterEach.

Determinism: CrewWorkerList.test.tsx passed 5 shuffled runs with random seeds. No timers or clocks in the new tests.

Local, on the rebased tree: 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/crew, the SearchFilterBar tests, the Crew Mode page suites and i18n passes (1930 tests).

Manual verification

I loaded website/capture/crew-finished-fold.html and website/capture/crew-worker-search.html in Chromium. I checked dark and light, folded and open, a finished worker on screen, the empty search box, English, CJK and no-match queries, Esc, and zh-CN.

Screenshots / video

Fold: folded (dark), open (dark), a finished worker on screen while folded, light, zh-CN.

folded-dark

open-dark

folded-viewing-done-dark

folded-light

folded-zh-dark

Search: empty box at rest, English query, CJK query, no match, zh-CN, light.

idle-dark

query-dark

cjk-dark

empty-dark

query-zh-dark

query-light

Related Issues

Closes #25857
Closes #25943

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

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 29, 2026 18:46
@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 7c116ebb9566545b71c4c730b20636f34b2c85ac — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level concerns: this is a reversible, frontend-only fold and filter over the list the panel already reads, and 11 rendered screenshots were provided.

[DESIGN-REVIEWED] 7c116eb

Description read

[DESCRIPTION-READ] d9334624d227ea60399c9004236a9cac266c8413b31e9ebf37d3cd11c3cfc46a

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

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7c116ebb9566545b71c4c730b20636f34b2c85ac — 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 traces to the two linked issues (#25857, #25943), and no item copies an existing mechanism: the search row reuses SearchFilterBar and the fold reuses usePersistedBool.

Notes

  • Item 1 — one consumer, generalized: export const CREW_FINISHED_GROUP: CrewWorkerGroup = 'done' has exactly one non-test consumer (CrewWorkerList.tsx, the folds line), grepped as CREW_FINISHED_GROUP across website/. Subtraction: delete the export and compare group === 'done' inline.

What this change ships

Inventory (10 items) — 9 justified

Intent: let a conductor keep live workers in view and still find any past worker. ADDITION.

  1. The Done heading is now a toggle, and finished workers start folded away — one consumer, generalized
  2. The open/shut choice for Done is remembered per browser — justified
  3. A folded Done group still shows the worker on screen, marked current — justified
  4. A search box appears once the panel lists 6 or more workers — justified
  5. Search matches title or task line, ignoring case and full-width forms — justified
  6. While searching, finished matches show under Done, and clearing the query folds it back — justified
  7. A "no match" line shows only after the full list is read — justified
  8. Esc or the clear button empties the search — justified
  9. The query is kept per root for the browser tab, so opening a match does not wipe it — justified
  10. Four new strings in every locale, plus two capture pages — justified

[FIRST-PRINCIPLES-REVIEWED] 7c116eb

Description read

[DESCRIPTION-READ] 283a2c890af61705395bd04865a5aead8ad46c5f2af75bab473b25a5a7df0be3

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

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the blind reader identified the Done toggle, the search box and the clear button correctly, said they were sure what each does, and would use them.

Notes

  • When Done is folded, the finished worker on screen still shows under the heading (rows.filter(w => w.key === viewing)). The blind reader saw that in shot-03, rated it "no idea", and could not tell whether the group was open or shut. Change the heading to something like Done · 9 (1 shown) so it says why that card is there.
  • The search copy uses three words for one thing: the placeholder says "Search by task…", the label says "Search the crew", and the no-match line says "No crew member matches". The search also matches titles, so "by task" undersells it. Use one noun, e.g. "Search workers…" and "No worker matches “{{query}}”."
  • In light mode, shot-11 shows the search box filled solid grey, and the blind reader said it "looks switched off". Check what fill the shared SearchFilterBar uses when focused or filled in this panel.

[UX-REVIEWED] 7c116eb

Description read

[DESCRIPTION-READ] a33d9f3ff95186011763856474f50bde7315ebd79fcd388a0c556cba72a116a6

That sha256 names everything this verdict read: the PR description, plus the 14 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 7c116ebb9566545b71c4c730b20636f34b2c85ac — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7c116eb

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

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

@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 7c116ebb9566545b71c4c730b20636f34b2c85ac and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7c116eb

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

buluoray
buluoray previously approved these changes Oct 29, 2026

@buluoray buluoray 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.

🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:

Approving at 509c6c2. Keeping live workers on top while a long run piles up finished ones is a good trade, and the fold keeps the on-screen finished worker visible and marked current, which is the case most likely to confuse.

Docs gap (spec + feature map) is tracked in #25976 rather than holding this.

Please also fix before merge if you can: five of the six screenshots in the description point at website/temp-screenshots/..., which is gitignored and not in the diff, so they do not render.

Owner question, not blocking: at the end of a run, when every worker is finished, the panel opens to a single "Done · N" heading and needs one more click to see results. Starting open when there is no live group may read better. The open/closed choice is also shared across every Crew Mode chat in the browser; say so if it is meant to be per chat.

Optional: aria-controls on the toggle pointing at the list. Heads-up: #25888 also edits CrewWorkerList.tsx; whichever lands second merges the two lucide-react imports.

Checked: CI green on this head. Locally the worker-list and timeline tests pass (48), and making the folded group drop the on-screen worker turns "a folded Done group still shows the finished worker on screen" red.

@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Oct 29, 2026
@iamwhatever
iamwhatever force-pushed the fix/crew-panel-collapse-finished branch from 1f7870e to fd8b7f9 Compare October 30, 2026 00:40
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels 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
iamwhatever force-pushed the fix/crew-panel-collapse-finished branch from fd8b7f9 to 7c116eb Compare October 30, 2026 01:31
@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 Oct 30, 2026
@dodgeblaster
dodgeblaster merged commit 92c3fca into main Oct 30, 2026
93 checks passed
@dodgeblaster
dodgeblaster deleted the fix/crew-panel-collapse-finished branch October 30, 2026 04:21
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 30, 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.

Crew Mode Workers panel: search past workers Crew Mode panel: fold finished workers under a collapsible Done group

3 participants