Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/system-specs/modules/crew-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions website/capture/conductor-mode-run-states.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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<string, unknown>) => ({
Expand All @@ -36,6 +33,8 @@ const ITEMS: Record<string, unknown[]> = {
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<string, unknown> = {
Expand All @@ -44,6 +43,8 @@ const RUN: Record<string, unknown> = {
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) }
Expand Down
55 changes: 55 additions & 0 deletions website/capture/shoot-conductor-mode-dropped-fold.mjs
Original file line number Diff line number Diff line change
@@ -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()
1 change: 1 addition & 0 deletions website/src/i18n/locales/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "তোমার অপেক্ষায়",
Expand Down
1 change: 1 addition & 0 deletions website/src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions website/src/i18n/locales/en-XA.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[Ẁàìţìñğ ƒøŕ ýøù ··············]",
Expand Down
1 change: 1 addition & 0 deletions website/src/i18n/locales/en.manual.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions website/src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading
Loading