diff --git a/docs/system-specs/modules/crew-mode.md b/docs/system-specs/modules/crew-mode.md index cc4521f176d6..e2873f1aa424 100644 --- a/docs/system-specs/modules/crew-mode.md +++ b/docs/system-specs/modules/crew-mode.md @@ -6278,8 +6278,8 @@ the unfiled crew members and the stamps all stay. | A PEER's crew members stay rows in the federated session list (`sessionSources.ts`): a local crew member leaves the list because its root's Crew panel lists it, but a peer's root opens in the crew window, which has no such panel, and the panel reads this gateway's slots and routes, so for a peer's crew member the list is the one way in. The rows keep their `crew_root` / `crew_mode_root` stamps for the marks | `website/src/pages/chat-sidebar/sessionSources.ts`, `website/src/hooks/useInstanceSessions.ts` | | What a hidden crew member (its root open) owes the person rides on its root. The Command Bar's Needs You lifts a conductor mode root whose workers wait on a tool approval with the Approve pill and the count (`crewWaitingApprovals` over the FULL slot set, the count the fleet page's command center uses); the root's own approval, when it has one, reads as any session's. The sessions view still lists no crew member | `website/src/components/commandBar/CommandBarOverlay.tsx`, `website/src/components/commandBar/CommandBarOverlayRootRows.tsx` | | Crew panel data: a worker's group (`approval`, `working`, `with_conductor`, `waiting`, `done`; an idle worker whose own bounded loop will wake it, `ledger_wake.worker_looping` sent as `looping`, is `working`, and so is its milestone, its goal-board card and, when every open item loops, its conductor's row: "N running", no new word), the root summary, the sub-dispatcher order, the Status view's milestone state, Done-when and Recap rules, and the steer receipt notice | `lib/crewWorkers.ts`, `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `lib/crewSteerNotice.ts`, `types/index.chat.ts` | -| **The Status view cuts no text.** Every Status text wraps, a long word (a SHA, a path) included, with no ellipsis, line clamp or tooltip standing in for it. The Overview shows the goal's whole first sentence (`goalSentence`, parentheticals removed), the goal's whole own "Done when" sentence (`goalDoneWhen`, ending at a sentence end, never inside a number such as "0.63 s", or where `Plan:` starts) and, when the goal text has a `Changed:` part, its last entry as **Latest change** (`latestChange`): an entry starts with its time at the start of the part, a line or after a ";", and one that carries a date also says how long ago it was ("Latest change, 2d ago: ...", the entry's own stamp in the `title`), so a goal the main chat never re-planned reads as old. No `Changed:` entry, no line. The line reads only the goal text: nothing is stored for it and the conductor's prompts are unchanged. A milestone's right column is the time since its last report, a running turn's too (the spinner says it runs). The done fold reads only "N done", folded or open. The Recap's milestone sentence counts running milestones ("87 of 94 done; 7 running.") instead of naming them; waiting, stuck and quiet ones are still named | `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `website/capture/conductor-mode-board-long.tsx` | -| **When a run is done.** The gateway sends the part only it holds as `run` on the root's `crew_work` (once its board has an item) and on `GET /api/crew-board` (`dashboard/conductor_mode_run.py`): with items and no active loop on the conductor's slot, `settled` is `done` when every item is closed and `stopped` when some are open, else `""`, and the board read also keeps a new goal that has created no item yet (the header's `goal_items_used` is 0) unsettled; `at_limit` marks a patrol that ended at its time or budget bound, and `patrol_on` whether the loop is on. Nothing is stored, so a new goal, a re-armed patrol or a new item leaves it on the next read. A stop the conductor made and one a person made both record `USER_STOP`, so no surface says who stopped a run. The Status view's Overview opens with one line (`conductorModeRunState`): **Paused**, **Waiting for you** (anything under Needs your input), **Working** (a turn or a milestone running, or an unsettled board with milestones whose patrol is on; a new goal waiting on its first milestone with no patrol and nothing running draws no line), then the verdict's **Done** or **Stopped**, each with one sentence and no numbers, and no control of its own: the panel's Back row stays the one way back to the main chat. No line says a final report exists: a stop at a limit or by a person sends none, and the board cannot tell them apart. No milestone and nothing running: no line. A rejected or abandoned milestone is `not_done` (a muted ✕, "Not done · failed its check" / "Not done · dropped"), stays among the open rows and is not counted in "X of Y". The Sessions row reads **Done** only when `run.settled` is `done` (a root with no ledger keeps the every-crew-member-done rule); a stopped run keeps the row's usual line. Known limit: the row's `run` comes from the work fold, which keeps no goal start, so a new goal with no item yet still shows the previous goal's Done on the row until its first item | `src/kiro_crew/dashboard/conductor_mode_run.py`, `dashboard/crew_work.py`, `dashboard/handlers/work_ledger_board.py`, `lib/conductorModeRun.ts`, `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `pages/chat-sidebar/SessionRow.tsx` | +| **The Status view cuts no text.** Every Status text wraps, a long word (a SHA, a path) included, with no ellipsis, line clamp or tooltip standing in for it. The Overview shows the goal's whole first sentence (`goalSentence`, parentheticals removed), the goal's whole own "Done when" sentence (`goalDoneWhen`, ending at a sentence end, never inside a number such as "0.63 s", or where `Plan:` starts) and, when the goal text has a `Changed:` part, its last entry as **Latest change** (`latestChange`): an entry starts with its time at the start of the part, a line or after a ";", and one that carries a date also says how long ago it was ("Latest change, 2d ago: ...", the entry's own stamp in the `title`), so a goal the main chat never re-planned reads as old. No `Changed:` entry, no line. The line reads only the goal text: nothing is stored for it and the conductor's prompts are unchanged. A milestone's right column is the time since its last report, a running turn's too (the spinner says it runs). The done fold reads only "N done", folded or open. Dropped milestones (closed as `abandoned`) fold the same way into one "N dropped" row below the open ones, folded by default; a rejected one stays in the open list, and the header still counts every milestone. The Recap's milestone sentence counts running milestones ("87 of 94 done; 7 running.") instead of naming them; waiting, stuck and quiet ones are still named | `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `website/capture/conductor-mode-board-long.tsx` | +| **When a run is done.** The gateway sends the part only it holds as `run` on the root's `crew_work` (once its board has an item) and on `GET /api/crew-board` (`dashboard/conductor_mode_run.py`): with items and no active loop on the conductor's slot, `settled` is `done` when every item is closed and `stopped` when some are open, else `""`, and the board read also keeps a new goal that has created no item yet (the header's `goal_items_used` is 0) unsettled; `at_limit` marks a patrol that ended at its time or budget bound, and `patrol_on` whether the loop is on. Nothing is stored, so a new goal, a re-armed patrol or a new item leaves it on the next read. A stop the conductor made and one a person made both record `USER_STOP`, so no surface says who stopped a run. The Status view's Overview opens with one line (`conductorModeRunState`): **Paused**, **Waiting for you** (anything under Needs your input), **Working** (a turn or a milestone running, or an unsettled board with milestones whose patrol is on; a new goal waiting on its first milestone with no patrol and nothing running draws no line), then the verdict's **Done** or **Stopped**, each with one sentence and no numbers, and no control of its own: the panel's Back row stays the one way back to the main chat. No line says a final report exists: a stop at a limit or by a person sends none, and the board cannot tell them apart. No milestone and nothing running: no line. A rejected or abandoned milestone is `not_done` (a muted ✕, "Not done · failed its check" / "Not done · dropped") and is not counted in "X of Y"; a rejected one stays among the open rows, and an abandoned one sits in the "N dropped" fold. The Sessions row reads **Done** only when `run.settled` is `done` (a root with no ledger keeps the every-crew-member-done rule); a stopped run keeps the row's usual line. Known limit: the row's `run` comes from the work fold, which keeps no goal start, so a new goal with no item yet still shows the previous goal's Done on the row until its first item | `src/kiro_crew/dashboard/conductor_mode_run.py`, `dashboard/crew_work.py`, `dashboard/handlers/work_ledger_board.py`, `lib/conductorModeRun.ts`, `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `pages/chat-sidebar/SessionRow.tsx` | | While a crew member is on screen, the Crew tab opens with a **Back to main chat** row (`CrewPanelBack`, above both views); it reads **Open main chat** while the root is closed, and then reopens the root from its saved transcript before opening it. Desktop keeps the side panel open on the root; a phone lands on the chat. A failed reopen shows the inline notice under the row (`commandCenter.worker_reopen_failed`, with the agent hand-off). The row takes its label and action from `useCrewBack`, the one place a Back comes from; the worker view's breadcrumb (`CrewWorkerBreadcrumb`) uses the same `useCrewBack` on its root crumb, so clicking the main chat's name does what the row does, and its sub-team lead crumb opens that member the way its Crew tab row does (reopening a closed one first); the current member and its status stay plain text | `components/crew/useCrewBack.ts`, `pages/chat/command-center/CrewWorkerList.tsx`, `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `components/crew/CrewWorkerBreadcrumb.tsx` | | While one of a root's crew members is the active chat, the sidebar marks the root's row as its parent: class `session-crew-parent`, `data-crew-parent`, and a screen-reader line (`components.crewMode.parent_row_hint`). `ChatSidebar` derives `crewParent` from the active slot's `crew_root`; `rowView` sets `isCrewParent` only when no crew window covers the pane, and the mark never makes the root the active row | `pages/ChatSidebar.tsx`, `pages/chat-sidebar/rows.ts`, `pages/chat-sidebar/SessionRow.tsx`, `styles/crew-mode.css` | | The List view draws the crew as ONE tree (`crewTree`): a finished member stays under its lead and is only styled (`data-done`, muted title). A top-level tree that is finished all through folds under one **Finished · N** row (N counts its members), folded by default. The open or folded choice is kept per browser in localStorage (`CREW_FINISHED_OPEN_KEY`, `mc-crew-workers-finished-open`). That fold hides its rows, the one on screen included; the Back row stays the way to the root | `pages/chat/command-center/ConductorModeCrewPanel.tsx`, `pages/chat/command-center/CrewWorkerList.tsx` | diff --git a/temp-screenshots/conductor-mode-dropped-fold/dropped-open-dark.png b/temp-screenshots/conductor-mode-dropped-fold/dropped-open-dark.png new file mode 100644 index 000000000000..8f4529b2830e Binary files /dev/null and b/temp-screenshots/conductor-mode-dropped-fold/dropped-open-dark.png differ diff --git a/temp-screenshots/conductor-mode-dropped-fold/dropped-open-light.png b/temp-screenshots/conductor-mode-dropped-fold/dropped-open-light.png new file mode 100644 index 000000000000..11054a8318d7 Binary files /dev/null and b/temp-screenshots/conductor-mode-dropped-fold/dropped-open-light.png differ diff --git a/temp-screenshots/conductor-mode-dropped-fold/only-abandoned-dark.png b/temp-screenshots/conductor-mode-dropped-fold/only-abandoned-dark.png new file mode 100644 index 000000000000..09eef4f74111 Binary files /dev/null and b/temp-screenshots/conductor-mode-dropped-fold/only-abandoned-dark.png differ diff --git a/temp-screenshots/conductor-mode-dropped-fold/only-abandoned-light.png b/temp-screenshots/conductor-mode-dropped-fold/only-abandoned-light.png new file mode 100644 index 000000000000..277ef65beae8 Binary files /dev/null and b/temp-screenshots/conductor-mode-dropped-fold/only-abandoned-light.png differ diff --git a/temp-screenshots/conductor-mode-dropped-fold/open-list-dark.png b/temp-screenshots/conductor-mode-dropped-fold/open-list-dark.png new file mode 100644 index 000000000000..a840a91d7269 Binary files /dev/null and b/temp-screenshots/conductor-mode-dropped-fold/open-list-dark.png differ diff --git a/temp-screenshots/conductor-mode-dropped-fold/open-list-light.png b/temp-screenshots/conductor-mode-dropped-fold/open-list-light.png new file mode 100644 index 000000000000..bd7a6429053e Binary files /dev/null and b/temp-screenshots/conductor-mode-dropped-fold/open-list-light.png differ diff --git a/website/capture/conductor-mode-run-states.tsx b/website/capture/conductor-mode-run-states.tsx index 54200cde4151..8ce9df4451ed 100644 --- a/website/capture/conductor-mode-run-states.tsx +++ b/website/capture/conductor-mode-run-states.tsx @@ -3,7 +3,7 @@ * * `?state=` picks the board: `working` (the patrol is still on), `waiting` (an item * asks the person), `done` (every milestone accepted), `done-some` (one rejected, - * one abandoned), `stopped` (milestones open, no patrol) or `paused` (Pause all). `?theme=light` for the + * one abandoned), `dropped` (open work above a two-row dropped fold), `only-abandoned` (the done fold right above the dropped fold), `stopped` (milestones open, no patrol) or `paused` (Pause all). `?theme=light` for the * light palette. The panel is the real component; only the reads are fixtures. */ import { createRoot } from 'react-dom/client' @@ -13,14 +13,11 @@ import { api } from '../src/api/client' import { store } from '../src/store' import { initI18n } from '../src/i18n/all' import ConductorModeCrewPanel from '../src/pages/chat/command-center/ConductorModeCrewPanel' -import { PREVIEW_CREW_MODE } from '../src/utils/previewFlags' import '../src/index.css' const params = new URLSearchParams(location.search) document.documentElement.setAttribute('data-theme', params.get('theme') === 'light' ? 'light' : 'dark') const state = params.get('state') || 'done' -// Pause all is drawn behind the conductor mode preview, as on a real gateway. -localStorage.setItem(PREVIEW_CREW_MODE, '1') const ago = (min: number) => new Date(Date.now() - min * 60_000).toISOString() const item = (id: string, title: string, over: Record) => ({ @@ -36,6 +33,8 @@ const ITEMS: Record = { done: [item('a', 'Rename the chip', {}), item('b', 'Update the docs', {}), item('c', 'Fix the tests', {})], 'done-some': [item('a', 'Rename the chip', {}), item('b', 'Port the old gate', { state: 'rejected', verdict: 'fail', summary: 'Checks still red.' }), item('c', 'Try a new icon', { state: 'abandoned', verdict: null, summary: 'Dropped by the plan.' })], stopped: [item('a', 'Rename the chip', {}), item('b', 'Update the docs', { ...open, status: 'progress', summary: 'Half the pages done.', alive: 'idle' })], + dropped: [item('a', 'Rename the chip', {}), item('b', 'Update the docs', { ...open, status: 'progress', summary: 'Editing the guide.', alive: 'running' }), item('r', 'Port the old gate', { state: 'rejected', verdict: 'fail', summary: 'Checks still red.' }), item('c', 'Try a new icon', { state: 'abandoned', verdict: null, summary: 'Dropped by the plan.' }), item('d', 'Move the badge', { state: 'abandoned', verdict: null, summary: 'Dropped by the plan.' })], + 'only-abandoned': [item('a', 'Rename the chip', {}), item('c', 'Try a new icon', { state: 'abandoned', verdict: null, summary: 'Dropped by the plan.' }), item('d', 'Move the badge', { state: 'abandoned', verdict: null, summary: 'Dropped by the plan.' })], paused: [item('a', 'Rename the chip', {}), item('b', 'Update the docs', { ...open, status: 'progress', summary: 'Half the pages done.', alive: 'idle' })], } const RUN: Record = { @@ -44,6 +43,8 @@ const RUN: Record = { done: { settled: 'done', open: 0, accepted: 3, not_done: 0, at_limit: false, patrol_on: false }, 'done-some': { settled: 'done', open: 0, accepted: 1, not_done: 2, at_limit: false, patrol_on: false }, stopped: { settled: 'stopped', open: 1, accepted: 1, not_done: 0, at_limit: false, patrol_on: false }, + dropped: { settled: '', open: 1, accepted: 1, not_done: 3, at_limit: false, patrol_on: true }, + 'only-abandoned': { settled: 'done', open: 0, accepted: 1, not_done: 2, at_limit: false, patrol_on: false }, paused: { settled: '', open: 1, accepted: 1, not_done: 0, at_limit: false, patrol_on: true }, } const conductor = { schema: 1, slot_key: 'root', goal: 'Rename the mode in the app. Done when: every surface uses the new name.', round: 1, depth: 0, parent_item: null, created_at: ago(120) } diff --git a/website/capture/shoot-conductor-mode-dropped-fold.mjs b/website/capture/shoot-conductor-mode-dropped-fold.mjs new file mode 100644 index 000000000000..a49817859b4c --- /dev/null +++ b/website/capture/shoot-conductor-mode-dropped-fold.mjs @@ -0,0 +1,55 @@ +/** + * Screenshot harness for the conductor mode Board's "N dropped" milestone fold. + * + * Serves the isolated capture entry (capture/conductor-mode-run-states.tsx) with a + * programmatic Vite dev server on loopback and photographs the REAL + * ConductorModeCrewPanel at side-panel width: open work above a closed dropped + * fold, the same fold opened, and a run whose only leftovers are abandoned. + * The reads are stubbed inside the entry, so no gateway / kiro-cli / token is involved. + * + * Usage (from website/): node capture/shoot-conductor-mode-dropped-fold.mjs [outDir] + */ +import { chromium } from 'playwright' +import { createServer } from 'vite' +import { mkdirSync } from 'node:fs' +import { fileURLToPath } from 'node:url' +import { dirname, resolve } from 'node:path' +import { chromiumExecutable } from '../scripts/lib/chromium-executable.mjs' + +const OUT = process.argv[2] || resolve(dirname(fileURLToPath(import.meta.url)), '../../temp-screenshots/conductor-mode-dropped-fold') +mkdirSync(OUT, { recursive: true }) + +const server = await createServer({ + configFile: './vite.config.ts', + server: { host: '127.0.0.1', port: 5199, strictPort: false }, + logLevel: 'warn', +}) +await server.listen() +const base = server.resolvedUrls?.local?.[0]?.replace(/\/$/, '') || `http://127.0.0.1:${server.config.server.port}` + +const browser = await chromium.launch({ + executablePath: chromiumExecutable(), + env: { ...process.env, LD_LIBRARY_PATH: '' }, +}) +const page = await browser.newPage({ viewport: { width: 420, height: 800 }, deviceScaleFactor: 2 }) +page.on('pageerror', e => console.log('PAGE EXCEPTION:', e.message)) + +const shoot = async (name) => { + await page.waitForTimeout(400) + await page.locator('[data-testid="capture-frame"]').screenshot({ path: `${OUT}/${name}.png` }) + console.log('wrote', `${OUT}/${name}.png`) +} + +for (const theme of ['dark', 'light']) { + await page.goto(`${base}/capture/conductor-mode-run-states.html?state=dropped&theme=${theme}`) + await page.locator('[data-testid="conductor-mode-milestones-dropped"]').waitFor({ timeout: 30000 }) + await shoot(`open-list-${theme}`) + await page.locator('[data-testid="conductor-mode-milestones-dropped"] summary').click() + await shoot(`dropped-open-${theme}`) + await page.goto(`${base}/capture/conductor-mode-run-states.html?state=only-abandoned&theme=${theme}`) + await page.locator('[data-testid="conductor-mode-milestones-dropped"]').waitFor({ timeout: 30000 }) + await shoot(`only-abandoned-${theme}`) +} + +await browser.close() +await server.close() diff --git a/website/src/i18n/locales/bn.json b/website/src/i18n/locales/bn.json index d2f7ecd548e5..c24e930f38af 100644 --- a/website/src/i18n/locales/bn.json +++ b/website/src/i18n/locales/bn.json @@ -10954,6 +10954,7 @@ "conductor_mode_ms_waiting_pr": "PR #{{n}}-এর অপেক্ষায়", "conductor_mode_ms_waiting_no_reason": "থেমে আছে, কোনো কারণ বলা নেই", "conductor_mode_ms_done_fold": "{{n}}টি শেষ", + "conductor_mode_ms_dropped_fold": "{{n}}টি বাদ দেওয়া হয়েছে", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "কাজ চলছে", "conductor_mode_run_waiting": "তোমার অপেক্ষায়", diff --git a/website/src/i18n/locales/de.json b/website/src/i18n/locales/de.json index a10323236c95..c073c9150bc8 100644 --- a/website/src/i18n/locales/de.json +++ b/website/src/i18n/locales/de.json @@ -10954,6 +10954,7 @@ "conductor_mode_ms_waiting_pr": "Wartet auf PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "Pausiert, kein Grund angegeben", "conductor_mode_ms_done_fold": "{{n}} erledigt", + "conductor_mode_ms_dropped_fold": "{{n}} verworfen", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "In Arbeit", "conductor_mode_run_waiting": "Wartet auf dich", diff --git a/website/src/i18n/locales/en-XA.json b/website/src/i18n/locales/en-XA.json index 5e32b176a6be..980f355ad052 100644 --- a/website/src/i18n/locales/en-XA.json +++ b/website/src/i18n/locales/en-XA.json @@ -10919,6 +10919,7 @@ "conductor_mode_ms_waiting_pr": "[Ẁàìţìñğ øñ ÞŔ #{{n}} ··············]", "conductor_mode_ms_waiting_no_reason": "[Þàùşèð, ñø ŕèàşøñ ğìṽèñ ················]", "conductor_mode_ms_done_fold": "[{{n}} ðøñè ········]", + "conductor_mode_ms_dropped_fold": "[{{n}} ðŕøþþèð ············]", "conductor_mode_ms_pr": "[· ÞŔ #{{n}} ·········]", "conductor_mode_run_working": "[Ẁøŕķìñğ ···········]", "conductor_mode_run_waiting": "[Ẁàìţìñğ ƒøŕ ýøù ··············]", diff --git a/website/src/i18n/locales/en.manual.json b/website/src/i18n/locales/en.manual.json index 10b5df21e691..22dd854be846 100644 --- a/website/src/i18n/locales/en.manual.json +++ b/website/src/i18n/locales/en.manual.json @@ -4569,6 +4569,7 @@ "conductor_mode_ms_waiting_pr": "Waiting on PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "Paused, no reason given", "conductor_mode_ms_done_fold": "{{n}} done", + "conductor_mode_ms_dropped_fold": "{{n}} dropped", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "Working", "conductor_mode_run_waiting": "Waiting for you", diff --git a/website/src/i18n/locales/es.json b/website/src/i18n/locales/es.json index dcb24a52ae84..2ac035831f70 100644 --- a/website/src/i18n/locales/es.json +++ b/website/src/i18n/locales/es.json @@ -11203,6 +11203,7 @@ "conductor_mode_ms_waiting_pr": "Esperando el PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "En pausa, sin motivo indicado", "conductor_mode_ms_done_fold": "{{n}} hechos", + "conductor_mode_ms_dropped_fold": "{{n}} descartados", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "Trabajando", "conductor_mode_run_waiting": "Esperándote", diff --git a/website/src/i18n/locales/fr.json b/website/src/i18n/locales/fr.json index 9fb792d374df..cb06f6e4494a 100644 --- a/website/src/i18n/locales/fr.json +++ b/website/src/i18n/locales/fr.json @@ -11203,6 +11203,7 @@ "conductor_mode_ms_waiting_pr": "En attente de la PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "En pause, sans raison donnée", "conductor_mode_ms_done_fold": "{{n}} terminés", + "conductor_mode_ms_dropped_fold": "{{n}} abandonnés", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "En cours", "conductor_mode_run_waiting": "En attente de toi", diff --git a/website/src/i18n/locales/hi.json b/website/src/i18n/locales/hi.json index c55091e6a12c..185cbda07528 100644 --- a/website/src/i18n/locales/hi.json +++ b/website/src/i18n/locales/hi.json @@ -10954,6 +10954,7 @@ "conductor_mode_ms_waiting_pr": "PR #{{n}} का इंतज़ार", "conductor_mode_ms_waiting_no_reason": "रुका हुआ, कोई कारण नहीं बताया", "conductor_mode_ms_done_fold": "{{n}} पूरे", + "conductor_mode_ms_dropped_fold": "{{n}} छोड़े गए", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "काम जारी", "conductor_mode_run_waiting": "तुम्हारा इंतज़ार", diff --git a/website/src/i18n/locales/it.json b/website/src/i18n/locales/it.json index 1d37b24f8bfd..143a6cead008 100644 --- a/website/src/i18n/locales/it.json +++ b/website/src/i18n/locales/it.json @@ -11203,6 +11203,7 @@ "conductor_mode_ms_waiting_pr": "In attesa della PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "In pausa, nessun motivo indicato", "conductor_mode_ms_done_fold": "{{n}} completati", + "conductor_mode_ms_dropped_fold": "{{n}} scartati", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "In lavorazione", "conductor_mode_run_waiting": "In attesa di te", diff --git a/website/src/i18n/locales/ja.json b/website/src/i18n/locales/ja.json index 1c7375d1c526..840832d04f7c 100644 --- a/website/src/i18n/locales/ja.json +++ b/website/src/i18n/locales/ja.json @@ -10705,6 +10705,7 @@ "conductor_mode_ms_waiting_pr": "PR #{{n}} を待機中", "conductor_mode_ms_waiting_no_reason": "一時停止中(理由の記載なし)", "conductor_mode_ms_done_fold": "{{n}} 件完了", + "conductor_mode_ms_dropped_fold": "{{n}} 件取り下げ", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "作業中", "conductor_mode_run_waiting": "あなたの対応待ち", diff --git a/website/src/i18n/locales/ko.json b/website/src/i18n/locales/ko.json index 3a229de7c599..3f22aa01b7c3 100644 --- a/website/src/i18n/locales/ko.json +++ b/website/src/i18n/locales/ko.json @@ -10705,6 +10705,7 @@ "conductor_mode_ms_waiting_pr": "PR #{{n}} 대기 중", "conductor_mode_ms_waiting_no_reason": "일시 중지됨, 이유 없음", "conductor_mode_ms_done_fold": "{{n}}개 완료", + "conductor_mode_ms_dropped_fold": "{{n}}개 중단됨", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "작업 중", "conductor_mode_run_waiting": "확인 대기", diff --git a/website/src/i18n/locales/pt.json b/website/src/i18n/locales/pt.json index d8419f53f727..b181538f8f1d 100644 --- a/website/src/i18n/locales/pt.json +++ b/website/src/i18n/locales/pt.json @@ -11203,6 +11203,7 @@ "conductor_mode_ms_waiting_pr": "Aguardando o PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "Pausado, sem motivo informado", "conductor_mode_ms_done_fold": "{{n}} concluídos", + "conductor_mode_ms_dropped_fold": "{{n}} descartados", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "Trabalhando", "conductor_mode_run_waiting": "Esperando por você", diff --git a/website/src/i18n/locales/ru.json b/website/src/i18n/locales/ru.json index db23683b3110..8c70d4326516 100644 --- a/website/src/i18n/locales/ru.json +++ b/website/src/i18n/locales/ru.json @@ -11427,6 +11427,7 @@ "conductor_mode_ms_waiting_pr": "Ждёт PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "На паузе, причина не указана", "conductor_mode_ms_done_fold": "Готово: {{n}}", + "conductor_mode_ms_dropped_fold": "Отменено: {{n}}", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "В работе", "conductor_mode_run_waiting": "Ждёт тебя", diff --git a/website/src/i18n/locales/zh-CN.json b/website/src/i18n/locales/zh-CN.json index 2f17e344466a..dd48780479f3 100644 --- a/website/src/i18n/locales/zh-CN.json +++ b/website/src/i18n/locales/zh-CN.json @@ -10705,6 +10705,7 @@ "conductor_mode_ms_waiting_pr": "等待 PR #{{n}}", "conductor_mode_ms_waiting_no_reason": "已暂停,未说明原因", "conductor_mode_ms_done_fold": "{{n}} 项已完成", + "conductor_mode_ms_dropped_fold": "{{n}} 项已放弃", "conductor_mode_ms_pr": "· PR #{{n}}", "conductor_mode_run_working": "进行中", "conductor_mode_run_waiting": "等待你处理", diff --git a/website/src/pages/chat/command-center/ConductorModeCrewPanel.remove.test.tsx b/website/src/pages/chat/command-center/ConductorModeCrewPanel.remove.test.tsx index d6b05a54f25f..117d864df560 100644 --- a/website/src/pages/chat/command-center/ConductorModeCrewPanel.remove.test.tsx +++ b/website/src/pages/chat/command-center/ConductorModeCrewPanel.remove.test.tsx @@ -59,7 +59,8 @@ describe('Conductor mode: hide a milestone that was not done', () => { const hide = within(withRemove[0]).getByTestId('conductor-mode-milestone-remove') // A visible word that says it only hides, not a bare trash icon read as a delete. expect(hide).toHaveTextContent('Hide') - expect(hide).toHaveAccessibleName('Hide "Old idea" from this list') + // The rejected row stays in the list; the abandoned one sits in the dropped fold below it. + expect(hide).toHaveAccessibleName('Hide "Port the gate" from this list') expect([DONE, DROPPED, REJECTED, OPEN].map(milestoneRemovable)).toEqual([false, true, true, false]) }) @@ -102,7 +103,7 @@ describe('Conductor mode: hide a milestone that was not done', () => { localStorage.setItem(CONDUCTOR_MILESTONES_REMOVED_KEY, JSON.stringify({ 'root-1': ['it_a', 'it_d'], 'root-2': ['it_c'] })) renderPanel() await screen.findByText('Old idea') - expect(rowTitles()).toEqual(['Ship the fix', 'Old idea', 'Port the gate', 'Write docs']) + expect(rowTitles()).toEqual(['Ship the fix', 'Port the gate', 'Write docs', 'Old idea']) expect(screen.queryByTestId('conductor-mode-milestones-removed')).toBeNull() }) diff --git a/website/src/pages/chat/command-center/ConductorModeCrewPanel.tsx b/website/src/pages/chat/command-center/ConductorModeCrewPanel.tsx index 22a1cc0379ff..07fee070d624 100644 --- a/website/src/pages/chat/command-center/ConductorModeCrewPanel.tsx +++ b/website/src/pages/chat/command-center/ConductorModeCrewPanel.tsx @@ -882,6 +882,7 @@ export default function ConductorModeCrewPanel({ root, viewing, active, onAct }: ) const [view, setView] = useState<'status' | 'list'>('status') const [doneOpen, setDoneOpen] = useState(false) + const [droppedOpen, setDroppedOpen] = useState(false) // The work ledger through the Crew page's own read (GET /api/crew-board), same key and cadence. // A board shown in the last CREW_BOARD_GC_MS paints at once on entry, and every // entry still reads it again (`refetchOnMount: 'always'`), so the cached copy is @@ -965,6 +966,10 @@ export default function ConductorModeCrewPanel({ root, viewing, active, onAct }: // Plus the rows below that wait on the person (kept out of `needsYouRows`). const needCount = needYou + forYou.length const openMs = milestones.filter(m => m.state !== 'done') + // Dropped milestones (closed as abandoned) fold into one row below the open + // ones, as done ones do above, so a goal that changed course keeps live work on screen. + const droppedMs = openMs.filter(m => m.state === 'not_done' && m.item.state === 'abandoned') + const listMs = openMs.filter(m => !droppedMs.includes(m)) const msDone = doneMs.length const lastReport = items.map(i => i.last_report_at).filter(Boolean).sort().pop() || null // Stuck: a milestone with nothing left to move it. Quiet: one idle with @@ -989,6 +994,23 @@ export default function ConductorModeCrewPanel({ root, viewing, active, onAct }: const w = workers.find(x => x.ledger_item === item.item_id) return w && !w.remote_crew ? () => open(w) : undefined } + // One folded row for a closed group: done milestones above the open ones, + // dropped ones below, so what is open stays on screen. No rows, no fold. + const shownListMs = listMs.filter(m => !hidden.has(m.item.item_id)) + // The done fold's bottom rule already divides it from the dropped fold when no open row sits between them. + const dropTopRule = shownListMs.length > 0 || doneMs.length === 0 + const milestoneFold = (kind: 'done' | 'dropped', rows: typeof milestones, isOpenFold: boolean, setOpenFold: (open: boolean) => void) => rows.length > 0 && ( +
setOpenFold((e.currentTarget as HTMLDetailsElement).open)}> + + {STATE_ICON[kind === 'done' ? 'done' : 'not_done']} + {i18nT(kind === 'done' ? 'components.crewMode.conductor_mode_ms_done_fold' : 'components.crewMode.conductor_mode_ms_dropped_fold', { n: rows.length })} + +
    {rows.map(m => setRemoved(ids => [...ids, m.item.item_id], 'restore') : undefined} />)}
+
+ ) const waitingMs = milestones.filter(m => m.state === 'needs_you') // An approval already named by its milestone is not repeated as a worker. // Unbound approvals and the main chat's own asks still belong in the Recap. @@ -1080,22 +1102,13 @@ export default function ConductorModeCrewPanel({ root, viewing, active, onAct }: ?

{i18nT('components.crewMode.conductor_mode_milestones_none')}

: <> {/* Finished milestones fold into one row, so what is open stays on screen. */} - {doneMs.length > 0 && ( -
setDoneOpen((e.currentTarget as HTMLDetailsElement).open)}> - - {STATE_ICON.done} - {i18nT('components.crewMode.conductor_mode_ms_done_fold', { n: doneMs.length })} - -
    {doneMs.map(m => )}
-
- )} + {milestoneFold('done', doneMs, doneOpen, setDoneOpen)}
    {/* A hidden milestone loses only its row here; the count and the Recap keep it. */} - {openMs.filter(m => !hidden.has(m.item.item_id)).map(m => setRemoved(ids => [...ids, m.item.item_id], 'restore') : undefined} />)}
+ {milestoneFold('dropped', droppedMs.filter(m => !hidden.has(m.item.item_id)), droppedOpen, setDroppedOpen)} } {hidden.size > 0 && (

diff --git a/website/src/pages/chat/command-center/CrewWorkerList.test.tsx b/website/src/pages/chat/command-center/CrewWorkerList.test.tsx index b1304fa3f5f2..b481d5015665 100644 --- a/website/src/pages/chat/command-center/CrewWorkerList.test.tsx +++ b/website/src/pages/chat/command-center/CrewWorkerList.test.tsx @@ -592,6 +592,46 @@ describe('Conductor mode Crew tab', () => { expect(summary).toHaveTextContent(/^1 done$/) }) + it('Milestones: dropped milestones fold into one "N dropped" row below the open ones', async () => { + api.crewWorkers.mockResolvedValue(WORKERS) + api.crewBoard.mockResolvedValue({ ...BOARD, items: [ + ITEM({ item_id: 'x1', title: 'Old plan A', state: 'abandoned', terminal: true }), + ITEM({ item_id: 'o1', title: 'Live work', alive: 'running' }), + ITEM({ item_id: 'x2', title: 'Old plan B', state: 'abandoned', terminal: true }), + ITEM({ item_id: 'r1', title: 'Failed check', state: 'rejected', terminal: true }), + ] }) + renderWith() + const fold = await screen.findByTestId('conductor-mode-milestones-dropped') + const summary = fold.querySelector('summary') as HTMLElement + expect(summary).toHaveTextContent(/^2 dropped$/) + expect((fold as HTMLDetailsElement).open).toBe(false) + // Folded rows stay in the fold; the open list keeps live work and the rejected one. + expect(within(fold).getAllByTestId('conductor-mode-milestone').map(r => r.textContent)).toEqual([expect.stringContaining('Old plan A'), expect.stringContaining('Old plan B')]) + const outside = screen.getAllByTestId('conductor-mode-milestone').filter(r => !fold.contains(r)) + expect(outside.map(r => r.textContent)).toEqual([expect.stringContaining('Live work'), expect.stringContaining('Failed check')]) + // Below the open rows, so live work stays on top. + expect(outside[0].compareDocumentPosition(fold) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() + // The header still counts every milestone. + expect(within(screen.getByTestId('conductor-mode-milestones')).getByRole('heading').textContent).toBe('Milestones · 0 of 4') + }) + + it('Milestones: the dropped fold opens on its own, and drops its top rule when only the done fold sits above it', async () => { + api.crewWorkers.mockResolvedValue(WORKERS) + api.crewBoard.mockResolvedValue({ ...BOARD, items: [ + ITEM({ item_id: 'd1', title: 'Drinks menu', state: 'accepted', terminal: true }), + ITEM({ item_id: 'x1', title: 'Old plan A', state: 'abandoned', terminal: true }), + ] }) + renderWith() + const dropped = await screen.findByTestId('conductor-mode-milestones-dropped') + const done = screen.getByTestId('conductor-mode-milestones-done') as HTMLDetailsElement + // No open row between the two folds: the done fold's bottom rule is the only divider. + expect(done).toHaveClass('border-b') + expect(dropped).not.toHaveClass('border-t') + act(() => { (dropped as HTMLDetailsElement).open = true; fireEvent(dropped, new Event('toggle')) }) + expect((dropped as HTMLDetailsElement).open).toBe(true) + expect(done.open).toBe(false) + }) + it('Status: a failed summary read and a failed crew read say so', async () => { api.crewWorkers.mockRejectedValue(new ApiError(500, 'boom', '')) api.sessionSummary.mockRejectedValue(new ApiError(500, 'summary down', ''))