Repository navigation
feat: bring back the Crew Mode switch above the chat input - #21526
iamwhatever wants to merge 1 commit into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm a maintainer has approved bringing Crew Mode back. #16257 removed it because it merged before it was meant to land, and this PR records no sign-off. [DESIGN-REVIEWED] 74e851b Description read[DESCRIPTION-READ] 24be0d1aef5d45e645a465f3c5d4dcab5aac660f1e9c12bd7d66d2e521c78887 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 |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The sample board looks like live work waiting on the user, and the "kirocrew-conductor" label is unexplained jargon that appears the moment the mode turns on. Watch
Suggestions
[UX-REVIEWED] 74e851b Description read[DESCRIPTION-READ] a53a7a5b7394beaf62bf3d11459c0ea17a3e534f6c0a65e804ae5be563dff01b That sha256 names everything this verdict read: the PR description, plus the 13 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) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The Crew Mode welcome page ships an animated, fake-data "Example" board. The Goal asks for plain words, and the title, tagline and four labels already give them. Not justified as shipped
What this change shipsInventory (8 items) — 7 justifiedIntent: let a user turn a chat into the existing Conductor with one visible switch and learn what it does. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 74e851b Description read[DESCRIPTION-READ] e3afa54a05c0ec0153ab40628e3e2001e27f7ca5a3bf25ab89e3682db86d981d That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. No blocking issues; one advisory finding. FINDING — website/src/pages/chat/page/crewModeSwitch.ts:32 — when [OPUS-REVIEWED] 74e851b Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
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: |
|
Real Adapter Contract Tests is red on main, not from this diff: #15909 bumped |
1607b7a to
8ba694a
Compare
|
|
|
|
|
|
|
|
|
|
|
Main is red on the same tests this head fails, so these are not from this PR:
No override and no fix here. This PR rebases once those land. |
|
A Crew Mode chip right of "Choose memory mode" switches a plain chat to the existing kirocrew-conductor through the ordinary agent switch, and back again. An empty chat with it on shows the Crew Mode welcome page. The switch is not offered when the conductor itself is the default agent, since off would have nothing to switch back to. There is no new setting, route, config key or session field. Re-lands the switch backed out in #16257 on the current page owners. Co-authored-by: Bolin Chen <17506219+bolichen97@users.noreply.github.com>
6cfcac7 to
74e851b
Compare
|
|
|
|
|
|
|
buluoray
left a comment
There was a problem hiding this comment.
Approving at 74e851b. Crew Mode stays a view over the existing kirocrew-conductor agent with no new state. Turning it on calls the same switchAgent path the agent picker uses, in the template namespace; turning it off sends the empty name and the server sets the configured default template (agent_switch.py, stamped_default = not agent_name), so the chip and the picker cannot disagree and off works while the agent catalog is unavailable. The Incognito and Temporary handling in memoryModeSwitch is declared in the Reader line. docs/decisions has no entry recording the removal; the backout in #16257 was only about timing and said the switch would return in a fresh PR, so nothing needs superseding.
Ran on the head: the crew mode, chip, page owners and memory chip vitest files (57 passed), test_crew_mode.py, i18n-check and check-i18n-strings; all 25 keys are in every catalog and en-XA. Mutating the memory switch leaving the conductor, the conductor-as-default guard, the crewmate-name guard, off sending the empty name, and the Persistent gate each turns a named test red. CI: 89 passed, 11 skipped, 0 failed.
Follow-ups, non-blocking:
- Test gaps: the local slotRunning term in busy, the instance_id gate for remote-instance chats, and the slotLoading hold on the chip can each be removed with no test going red.
- Accessibility: the button name changes with state (Crew Mode vs Crew Mode on) while aria-pressed also changes, so a screen reader announces both; a stable name plus aria-pressed is the usual pattern. The busy and on hints live only in title, and the busy one is on a disabled button, so keyboard and touch users never reach it.
- First Principles shows CONCERNS on this head and its dispositions cover only earlier heads.
|
Require to collaborate with the marketing, so let us pause for now. |
Problem / Motivation
Goal: Let any user turn a chat into a Conductor with one switch next to "Choose memory mode", and see in plain words what it does.
The Conductor (
kirocrew-conductor) splits a goal into tasks, runs each in its own chat, and reports back. Today the only way in is the agent picker, which lists several conductor agents under technical names, so most users never find it. The Crew Mode switch that fixed this shipped in #16088 and was backed out the same day in #16257, because it merged before it was meant to land. It never came back.Why it matters
The Conductor is how a big goal gets split up and tracked without the user reading every transcript. Hidden behind the agent picker, almost nobody who would benefit from it reaches it. One visible switch, and a page that says what it does, is how a user learns it exists.
Not a goal
kirocrew-conductorunchanged.What changed (motivation → approach → change)
Users cannot find the Conductor in the agent picker, so a Crew Mode switch now sits next to "Choose memory mode", one click away, with a page that says what the Conductor does. One switch, same chat. A chat is in Crew Mode exactly when it runs on
kirocrew-conductor; nothing else stores it. Turning it on is the ordinary agent switch, in the template namespace, so memory and history stay. Turning it off sends the same switch with no agent name, so the server puts the chat back on the configured default template.components/CrewModeChip.tsx,pages/chat/page/crewModeSwitch.ts,ComposerDockView.tsxComposerDockView.tsxcomponents/CrewModeWelcome.tsx,ChatTranscriptView.tsxpages/chat/memoryModeSwitch.tsThe switch shows only on a plain local Persistent chat that runs the default template or the Conductor. It never shows in a crewmate's chat, an app's chat or a mode session. Incognito and Temporary chats are left out, because such a session may not create sessions (
ephemeral_callerindashboard/session_control_parts/session_create.py). It is also hidden whenkirocrew-conductoris itself the default agent (agent.default_agent), because off would have nothing to switch back to. That default is already the way to start every new chat on the Conductor, so this PR adds no setting.The switch is a ChatPage owner hook. It waits for the transcript to load, so it never slides across the memory chip. No default changes: a chat a user never touches is exactly what main shows, on the welcome state and after the first message alike.
Docs say the same in
session.md,learn-cron-dashboard.md,crew-mode.md,agents.md,work-ledger.mdand a feature-map row. i18n adds 25 keys to all 12 catalogs ini18n/locales/and toen-XA; "Crew Mode" joins the do-not-translate list ini18n/glossary.json.Backwards compatibility
Compatible: no route, field, config key or value changes; the switch calls the existing
POST /api/chat/slots/{slot}/agent, and off uses its existing empty-name form, which stamps the default template.Reader: website/src/pages/chat/memoryModeSwitch.ts:runMemorySwitch -- chat -- a
kirocrew-conductortemplate chat switched to Incognito or Temporary is now recreated on the default template instead of the Conductor, which could not create sessions there;ChatPage.crewMode.test.tsx"leaves the conductor when the chat switches to Incognito", and "keeps a plain chat on its agent when it switches to Incognito".Tests
test/test_crew_mode.py: the Conductor prompt still carries its introduction and task board.lib/crewMode.test.ts: Crew Mode runs onkirocrew-conductor; the empty name and the configured default count as the default agent; only a Persistent chat qualifies.CrewModeChip.test.tsx:aria-pressed, click and disabled. Off shows one label at a time ("Crew Mode" belowsm, "Crew Mode: split into tasks" fromsmup), and the on hint says what turning it off does. While a reply runs the chip keeps its on look and shows the busy hint; any other disabled state fades it. The welcome page has its title and four labels; its Example board has no buttons and no sample answers; its sample question has no warning tone, its ghost circles and question icon tile are muted, and its state words are muted text, with each tone on the circle beside the word.ChatPage.crewMode.test.tsx: the chip sits right of the memory chip on the welcome state; on goes throughchatSlotAgent(slot, 'kirocrew-conductor', 'template')and swaps in the welcome page; off mid-chat goes through('', 'template')and the chat ends on the default the server names, also while the agent catalog is unavailable. Mid-chat with the mode on, the note is shown and named by the chip'saria-describedby; on the welcome state and mid-chat with the mode off the chip shows no note, and mid-chat with the mode off the chip is absent entirely. It is not offered on another agent, a crewmate chat, a crewmate namedkirocrew-conductor, an Incognito chat, an app chat, an orchestrator-mode session, or when the Conductor is the default agent. A Crew Mode chat switched to Incognito is recreated with no agent, and a plain chat keeps its agent.ChatPage.memoryChip.test.tsx: the memory chip and its row leave once the chat has messages.ChatPage.pageOwners.test.ts:useCrewModeSwitchsits in the page's owner call order.Determinism, per testing-conventions § Proving a determinism fix:
test/test_crew_mode.py(one test, so no order to shuffle): 20/20 green at-n0; 10/10 green at-n 4 --dist loadgroup --max-worker-restart=2besidetest_tail_fork_config.pyandtest_dashboard_config_gitlab_hosts.py.CrewModeChip.test.tsx,crewMode.test.ts,ChatPage.crewMode.test.tsx,ChatPage.pageOwners.test.ts(the frontend test files this PR adds or changes): 20/20 green, and a shuffled order (--sequence.shuffle --sequence.seed=10986) green, 34 tests.ChatPage.memoryChip.test.tsxis reverted to base, so it is not in this diff (its former shuffle-order flake, Flaky: shows an error when creating the replacement slot fails (ChatPage.memoryChip) fails under a shuffled order #21516, was fixed on main by test: isolate memory chip API mocks #21533).Manual verification
Built this branch's SPA (
npm run build) and drove it in headless Chromium against a stubbed gateway, with a capture script kept out of the repo. The script fails a scene when a check below does not hold.aria-pressed="true", and its hint reads "Available after the reply."Ran the kirocrew prepare-pr gate floor and the diff-scoped test surfaces locally against
origin/main(b290c522e7): 0 failing gates (isort, flake8, mypy, the i18n check and render, the SPA build, bundle-size and chunk-cycle checks, the Electron smoke test, docs lint and the repository's static guards); the frontend scoped suite is 483 files / 13,053 tests green; the backend tests tied to the diff (152 files, 7,669 items) are 7,666 passed and 3 skipped on 2 workers; the flake-pattern ratchet passes (58 tests); and semgrep finds nothing on the 13 changed files. The rest of the backend suite runs on CI's shards.Screenshots / video
A new chat, Crew Mode off:
Crew Mode on, the welcome page:
Mid-chat with the mode on, the note beside the chip:
A plain chat mid-conversation with the mode off: no chip, the composer as on main:
The whole flow: turn it on, then the first send. The memory chip leaves, the Crew Mode chip glides over, and its note appears.
08-flow.webm
After the first send, phone and dark theme
Related Issues
Closes #21503
Follow-up: #21531 (agent labels still show the code name
kirocrew-conductor).Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.