Skip to content

feat: crew page work-item board over a masked work-ledger projection - #12792

Merged
bolichen97 merged 1 commit into
mainfrom
feat/crew-page-work-items
Sep 29, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/crew-page-work-items

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Give a human a dashboard surface that answers "which work item is stuck waiting on me?" without spending a model turn.

A conductor's work ledger has a store, tools and a read route (Phases 1, 2, 2.5), but no surface. The only way to see what a fleet of workers is doing is to call work_ledger_read from an agent session and read the JSON, which means the one question a human actually has, which item is stuck waiting on me?, costs a model turn to answer.

The obvious fix does not work. /api/work-ledger cannot serve a browser for two independent reasons:

  • It cannot be addressed. api_work_ledger_get calls _caller_key(request) and returns the ledger owned by the calling session, resolved from X-Session-Key. There is no conductor parameter, and that is deliberate: session_ledger.py states the contract that the ledger a request touches is derived from the caller's identity, never from the request body. A browser has a cookie, not a session key, so it cannot name a conductor at all.
  • Its rows carry a key the page may not have. WorkItem.to_dict() includes worker_session_key, and the route is inside _STRICT_INTERNAL_API_PATHS, so it is MCP-only.

So this was never a missing field. It was a missing addressing mode plus a different auth principal.

Why it matters

Without a surface, a worker that asks its conductor a question and then waits is indistinguishable from a worker that is busy. The conductor notices on its next patrol; a human notices never. The item that most needs a person is the one hardest to find.

Phase 4 also names an orphaned item, one whose conductor session is gone while the item is still open. Nothing is reading that worker's reports, and it keeps writing them. Today nobody can see that state, let alone stop it.

Not a goal

Three things are deliberately out of scope:

  • Take-over. No server-side primitive exists to re-own a session: session_control exposes create_session, stop_target, close_target, send_to_target and read_messages and nothing that re-owns a session, and work_ledger.CONDUCTOR_ACTIONS is {create, bind, decide, verdict, close, goal} with no transfer. Phase 4's own instruction is not to invent a second one. Take-over answers 501 and renders no control; the code path that renders it is in place for when the primitive lands.
  • Channel rendering. Waits for Phase 5 — the open-channel exit criterion needs channel records that do not exist on main, so nothing here reads them.
  • A session-ledger board. An earlier revision built a new aggregate endpoint over session ledgers. Design Review identified this RFC as the incumbent owner of the surface, and the work was folded onto it. That code and its tests are not in this PR.

What changed (motivation → approach → change)

A second read over the same store, for the other caller, plus one action route. The conductor's own route is untouched, so nothing reading it today changes behaviour.

GET /api/crew-board?conductor=KEY is a masked projection behind the dashboard owner gate. A row is WorkItem.to_dict() minus worker_session_key, plus the derived flags the conductor's read already computes and a server-joined alive. Liveness is joined here precisely because the key that resolves it is the field the page may not receive.

Both routes call require_owner_dashboard_request before the caller's conductor key is read. That ordering is the substance rather than a formality: a ledger is keyed on a URL parameter the caller chooses, so an authenticated-but-not-owner token (a member, an app) could otherwise name any conductor. _own_ledger establishes that the named key has a ledger, which is not the same question as whether this caller may read it.

Four defects the work surfaced, all of which would have shipped:

  • The natural route spelling would have 403'd every browser call. /api/work-ledger/board sits under a prefix already in _STRICT_INTERNAL_API_PATHS, and that list matches path == p or path.startswith(p + "/"), so the board would have silently inherited MCP-only auth. Proven rather than argued: the old spelling is covered by ['/api/work-ledger'], /api/crew-board by []. Moved off the prefix rather than teaching a security matcher an exception for a read route.
  • Masking the item field is not enough: a bind event's text is the worker session key. Stripping WorkItem.worker_session_key left the key sitting in the event log, which a per-row check passes happily. The whole-payload assertion caught it. The line is kept, since its kind and ts are when dispatch happened, and only the text goes.
  • Cookie authentication is not owner authorization. An earlier revision leaned on the cookie boundary alone. It authenticates a dashboard caller, and non-owner token classes are first-class here, so the gate above is what actually confines the projection to one operator's ledgers. Tests cover a wrong subject and an app-scoped token carrying the owner's own subject, on both routes.
  • A conductor key is caller-supplied text, and not every string can name a directory. work_ledger.conductor_dir refuses a path separator or a null byte, because either would let the key escape its own directory, and that refusal reached the handler as an exception: an HTTP 500 on an ordinary GET, which reads as a broken board rather than a bad request. Both routes now answer a coded 400. Done by CATCHING the store's own error rather than re-testing the shape in the handler: the rule belongs to work_ledger, a copy of it here is a copy that can drift, and a rule the store adds later is covered without a second edit.

POST /api/crew-board/action with {conductor, item_id, action} carries the stop affordance. The masking is exactly what makes this route necessary: a browser that cannot learn the key cannot stop the session itself, so the server resolves the key from the store and never returns it.

The stop delegates to chat_handlers.stop_slot_turn, the single primitive the Stop button and session_control.stop_target both already use. Not to stop_target itself, and the reason is the interesting part: stop_target authorizes through authorize_target then caller_slot_key, which resolves a caller only by walking the live slot table. An orphaned item is by definition one whose conductor slot is gone, so a delegation naming the conductor as caller would be refused caller_unidentified on 100% of the requests this route accepts. The authorization it would have done is performed here instead, by the owner gate plus the ledger lookup.

escalate=False, for the same reason stop_target passes it: a browser whose request timed out re-sends it, and an escalation would discard the worker's queue and pending steers for what is a retry rather than a second decision.

Accepted only when the item is orphaned; 409 otherwise, so a click made from a stale poll is refused rather than quietly doing nothing, and the page re-reads. Every call is SEL-audited with the conductor and item_id, never the worker key. The response is allow-listed rather than masked, the opposite of the item rows and deliberately so: the row mask is a deny-list, so a field added to WorkItem later reaches the page by default, whereas the stop primitive's body belongs to another module and a field it gains later must not reach a browser that is not told which session was acted on.

The page is website/src/pages/CrewBoardPage.tsx at /crew-board?conductor=KEY, polling every 10 s through the shared api client. Items waiting on a decision are lifted into a band at the top; everything open follows; terminal items collapse behind an expander via is_terminal. status (worker) and state (conductor) stay two badges, each with a dim role prefix, because they are different parties' claims about the same item and can legitimately disagree; one merged badge would have to pick a side and would hide exactly that. summary is the row's last line, standing in for the session ledger's next, which this store has no equivalent of. stale is a badge; due-in is dropped for the same reason. The goal renders on an empty board too, because it belongs to the ledger rather than to the item list: without it a reader who followed the menu entry lands on a page that names nothing. Theme variables only, and the shared Badge, Btn, Card/CardTitle and PageHeader primitives throughout.

Its entry point is components/CrewBoardMenuItem.tsx, a Crew board item in the session overflow menu. It renders nothing for a session that owns no work ledger, which is most of them: the board is keyed on a conductor, and an always-present entry would lead almost everyone to an empty page. Only a 404 hides it; any other failure renders the shared ErrorNotice plus the sibling ErrorNoticeMenuItem hand-off, because hiding on both would turn a 500 or a dropped connection into "this session has no board" -- a wrong answer the reader has no way to question. The existence test is the projection itself, so opening the menu warms the page's cache rather than adding a round trip, and a Radix menu mounts its content only while open, so nothing is fetched until someone opens it.

The outstanding rule is stricter than "has a decision": an item can be decided, handed back, and ask something new, so the newest decision must be newer than the report that asked. Timestamps are parsed rather than string-compared, because two different offsets sort wrongly as text, and an undateable question is left outstanding, failing toward the human.

GPT 5.6 findings, latest round

  • Allowed board access was unlogged or misattributed (backend-security-controls, security-class, blocking). The owner gate returns None on a grant and writes no SEL line, and a safe GET skips the dashboard chain's audit middleware, so the allowed read of a conductor's ledger was recorded nowhere. The POST action did audit, but with the selected conductor key as the caller — attributing the permission decision to the subject being read rather than to the operator who made it. Both routes now derive caller = request["user"] (the authenticated dashboard owner, the same identity the owner gate itself checks) after the gate passes, and audit with that caller; the conductor key and item id ride in resources (conductor=… item=…:…), never as the caller. The GET now writes a crew_board_read/ok grant line. Two tests pin it: the allowed read is audited to the owner with the conductor as a resource, and a stop action names the owner as caller with the conductor never appearing as the caller.
  • The Stop control promised more than the server delivers (blocking, prior round). stop_slot_turn stops the slot's TURN, per its own docstring, and this route passes escalate=False, so the action is a cooperative cancel of the work running now -- it does not end the session and nothing about it is irreversible. The label said Stop worker and the line under it said Only the session ends, and it cannot be resumed, which is copy the button cannot keep. The label and the line are corrected across all 12 catalogs plus the generated pseudo-locale. action_stop is Stop current turn and the consequence ends This cancels the turn running now, and the session stays open. A test pins both halves.
  • A failed remote stop was audited as a successful one (residual/crash-data-loss-corruption, fenced, blocking, prior round). The outcome now comes from the result, with the refusal code in resources. Two tests make the pair discriminating: the reachable case audits ok, the unreachable case audits failure naming remote_stop_unreachable.
  • The failed-action row held four controls (max-two-buttons-per-row, blocking, prior round). The inline ErrorNotice is a sibling of the button row now, one line below it.

Earlier rounds fixed the feature-map row that still denied this page existed (feature-map-correctness), the item row that had no narrow layout (narrow-viewport-required), the silent board-probe failure (errors-use-error-notice), the bespoke status pill that bypassed the shared Badge (page-layout-pattern item 6), and the invalid-conductor-key crash, which is a coded 400 with a test on each route.

Rebase drive-by: session_set_model title

Rebasing onto current main pulled in #14508 ("declare Tool.title on the own MCP servers' tools"), which added test/test_mcp_tool_titles.py asserting every listed dashboard tool has a title in data/mcp_tool_titles.json. #14508's table omitted session_set_model (added to the dashboard server earlier by #14223), so the merge-ref inherited a red on Backend Tests (Windows)(4) and (3.12,4) — the same shards main's own newest completed run fails. Since the red blocks PR Readiness on this branch's merge ref and the fix is one table entry, it is completed here: "session_set_model": "Set session model" is added to the dashboard block. test_mcp_tool_titles.py and test_titles_are_short_single_line_copy both pass.

UX findings, latest round

The blocking verdict was cannot evaluate, and the cause was timing rather than the page. The lane finished 22 seconds before this description's attachments were replaced, so the blind reader saw the previous revision's captures. The captures below are rendered from the current head and were attached BEFORE the push that carries it, which is the ordering that keeps the evidence and the code in step.

The one finding about the page itself was the 320px capture, and it was a defect in the capture rather than in the layout. capture-crew-board.mjs clicks each Events expander before shooting, and a fullPage screenshot cannot reach back above a fixed-header scroll offset -- so the card title and the goal line were absent from the image while being present on the page. The harness resets every scroller to the top before each shot; the refreshed 320px capture shows the header, the card title, GOAL and Round 0 in full.

Backwards compatibility

Compatible: this PR adds two new routes (GET /api/crew-board, POST /api/crew-board/action) and a new page; it does not reject, rename or remove anything main currently accepts. The conductor's own /api/work-ledger route is untouched, so every existing MCP caller behaves exactly as before. The masked projection is a strict read-subset of WorkItem.to_dict() behind the owner gate, adding a field (alive) rather than changing any.

Tests

Gate Result
test/test_work_ledger_board.py 40 passed
test/test_security_posture.py 53 passed
CrewBoardPage.test.tsx, crewBoardRows.test.ts, CrewBoardMenuItem.test.tsx 34 passed
SessionActionsMenu.errorHandoff, SessionActionsMenu.popout, TagManagerList 21 passed
src/i18n/style/ (all 11 locale style suites) 95 passed
tsc -b 0 errors
black gate, flake8, isort clean
check_memory_store_seam.py, check_comment_history.py, check_feature_map.py (base ref set) clean
lint:i18n with I18N_BASE_REF=origin/main 0 untranslated on added lines
jscpd@3.5.10 with website/.jscpd.json 0 clones
check-bundle-size.mjs 712 chunks within budget
Coverage, cobertura per file page 87.93%, menu item 100%, both modules 100%, floor 80%

The action-route cases cover what the masking and the gate make load-bearing: that the stop reaches the shared primitive with escalate=False; that a non-owner subject and an app-scoped token are both refused 403 on each route before the store is touched; that a key holding a path separator is refused a coded 400 on each route rather than raising; that another conductor's item is refused 404 (the lookup is scoped to the named ledger); that a non-orphaned item and a terminal item are both refused 409; unknown item; unknown action; an item with no bound worker; a worker whose session has closed; take-over refused with the same code the read advertises; a 200 carrying ok: false not read as success; artifact keys redacted, including two keys that redact alike; and a whole-response assertion that no chat-* key appears anywhere in an action reply.

Manual verification

Screenshots below are rendered from the real built SPA by website/scripts/capture-crew-board.mjs, booted through stubDashboardApi over the verbatim output of the real handler (api_work_ledger_board called in-process over a seeded store by website/scripts/fixtures/regen-crew-board.py). The generator asserts on the bytes it writes that no worker_session_key and no chat-* worker key is present.

Screenshots / video

The ordinary board, light and dark -- the conductor's slot is open, so nothing is orphaned and no row offers an action. Decision band on top, working band, finished collapsed. Both themes, so the theme-variable claim is checked rather than asserted.

board light

board dark

Orphaned, with the affordances, light and dark -- the conductor's slot is gone, so every open item is orphaned. Stop current turn is live on the item whose worker still runs; on the item whose session has closed the button is disabled. No take-over control renders on either row.

orphaned light

orphaned dark

The entry point. Crew board in a conducting session's overflow menu, between Reveal in sidebar and Pop out to window.

menu entry

A ledger that exists and holds nothing, which is a different answer from a session that keeps no ledger at all. The goal still renders, so the page says whose board it is.

empty board

The per-item event tail, opened.

events open

A failed Stop. The action route is answered 500 and the button clicked, so this is the page's real error path.

action failed

A session that keeps no work ledger. The route answers no_ledger and the page renders an expected gap rather than a failure.

no ledger

At 320px, the narrowest width narrow-viewport-required names. Each row's two metadata rails sit under the title instead of squeezing it, and the event tail wraps.

narrow 320

The same images are also committed under docs/request-for-change/assets/, where the harness writes them by default, so the repository keeps a durable copy that survives an attachment expiring.

Related Issues

Implements Phase 4 of the work-ledger crew board RFC under docs/request-for-change/.

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

@chenmingwei23
chenmingwei23 requested review from a team and dwu96 September 22, 2026 12:00
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

Design-level review of be88320a50d7ccdeb202f7294210995a372b8dbb — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

Every 10-second poll writes an append-only SEL grant row, so routine board reads will drown the audit trail and grow the log without bound.

Watch

The GET handler audits every allowed read (_audit(caller, "crew_board_read", "ok", ...) — "the grant is logged here or not at all") while the page refetches on CREW_BOARD_POLL_MS = 10_000: one open board tab appends ~8,600 identical SEL rows per day, and the menu entry's existence probe adds a routine no_ledger "denied" row for every non-conductor session whose overflow menu is opened. The grant log exists so an operator can prove which ledgers were read; six identical rows a minute per tab buries that answer and dilutes what a "denied" row means elsewhere in SEL.
Clears when: the read audit is deduplicated or coarsened (e.g. one row per caller+conductor per session/interval, or polls after the first are unaudited), or a maintainer states per-poll SEL rows are the intended audit grain.

[DESIGN-REVIEWED] be88320

Description read

[DESCRIPTION-READ] 966080ca8ebeb5e96c24bc0e70918e8fe578f25a5441513dd6267ba1614d0068

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 Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

UX-level review of be88320a50d7ccdeb202f7294210995a372b8dbb — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Liveness renders as a bare 7px dot — no text, tooltip, or AT exposure — and the blind reader had "no idea" what it meant.

Watch

  • AliveDot (CrewBoardPage.tsx) is the row's only carrier of running/idle/closed, is aria-hidden, and pairs with no word — blind reader: "Purple filled dot… maybe 'active right now' or 'unread' -> no idea." The server joins liveness precisely because it matters, then encodes it as shape/color only; screen-reader users get nothing at all. Every board view, every row, persistent. Smallest fix: title/aria-label with the alive word, or a small text token beside the dot.
  • Each row stacks three status systems (worker chip, conductor chip, right-edge kind word) and the reader could not relate them: "'open' and those state words seem to be two different status systems on the same row, and I can't tell how they relate." The board_info InfoTip explains the two chips but never the right-edge label or "Round". Fix: one sentence in board_info naming the right-edge word as the row's situation.
  • stop_not_confirmed shipped degraded in several catalogs: Bengali mixes Devanagari glyphs ("গेটওয়ে… करতে"), Korean misspells worker ("워여" for "워커", twice), and es/fr/pt drop diacritics ("ejecucion", "l'arret", "peut-etre", "nao… execucao"). Every non-English user on the failed-stop path reads visibly broken copy.

Suggestions

  • Masked bind events render as a bare word with blank text ("no idea what 'bind' means here"); render a localized placeholder like "worker assigned" instead of the emptied string.

[UX-REVIEWED] be88320

Description read

[DESCRIPTION-READ] 1db416cd3f6a15e3d40f111a07eab099cc0b0f35eec236c19f47abbdb4bda6c5

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 .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 added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 5.6 flagged blocking issues on be88320a50d7ccdeb202f7294210995a372b8dbb; Opus 5 adjudication downgraded every one of them to advisory. Adjudication downgraded all 1 blocking finding(s) to advisory: the remedy each one requires is disproportionate to the harm it prevents. Read them as advice, not as merge conditions.

This comment is updated in place on each push.

Review details

BLOCKING -- src/kiro_crew/dashboard/handlers/work_ledger_board.py:174 -- Same-second decisions remain outstanding

return answered <= asked
Question report and decision within one second -> equal second-precision timestamps -> answered item remains in “Needs a decision”
Anchor: feature-map-correctness
Fix: Break equal-timestamp ties using event order.
[GPT-REVIEWED] be88320
[BLOCK-MERGE-DOWNGRADED] be88320

Adjudication (Opus 5) — is blocking on each finding proportionate?

LOW — a decided question stays in the "Needs a decision" band; the row carries decision (work_ledger.py:347) so the operator sees it was answered, and the next worker report rewrites item.status (work_ledger.py:1939), which the band's first gate reads (work_ledger_board.py:153), clearing it.

Conditions confirmed: event stamps are second-precision (work_ledger.py:492, applied at work_ledger.py:1019-1022); decide writes a decision event without touching item.status (work_ledger.py:1873-1876), so the question gate still admits; equal stamps make the comparison at work_ledger_board.py:174 answer outstanding. Requires the conductor's read-and-decide round trip to land inside the same wall-clock second as the asking report.

Real fix cost: a second ordering rule — event-tail positions when both sides come from events, timestamps when the ask fell back to item.last_report_at (work_ledger_board.py:169) and has no position — so the function carries two coexisting orderings and every future reader must know which applies, against a rare, visible, self-clearing false positive in the safe-fail direction the docstring already chose.

[ADJUDICATION] be88320 total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/dashboard/handlers/work_ledger_board.py:174 reason=disproportionate-remedy
[GPT-ADJUDICATED] be88320

False positive or not applicable? A repository writer can comment:
/ai-review override gpt be88320a50d7ccdeb202f7294210995a372b8dbb: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of be88320a50d7ccdeb202f7294210995a372b8dbb — 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/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

The payload ships conductor_alive with zero readers — the exact field-class this PR itself deletes ("a field with no reader is a claim the payload makes and the page ignores").

Not justified as shipped

  • Item 6 — zero consumers: grep conductor_alive across website/src: the TS type declares it, fixtures and tests carry it, and no shipped component reads it (rows already carry per-item orphaned). The PR dropped stop_available/channels_available on this exact rule.
    Subtraction: delete the "conductor_alive" key from the GET payload and WorkBoardResponse (keep the local variable feeding is_orphaned).
    Clears when: a component reads it, or the deletion is made.
  • Item 7 — duplicate of crew_log_emit.safe_work_fields: the hunk claims "nothing between that write and this read inspects them", but every agent write route already scrubs the same strings — keys included, collisions refused (emit.py:2743) — via safe_work_fields at handlers/work_ledger.py:528, 744, 1226, with the same credential/exfil pair. The residual is only a loaded companion's extra patterns, which the false premise hides.
    Subtraction: delete _redact_deep's key-collision suffix machinery and rest the pass on the companion-delta justification alone.
    Clears when: a pattern redact_via_context catches that ingest misses is named, or the shrink is made.

What this change ships

Inventory (10 items) — 8 justified

Intent: let a human see which of a conductor's work items is stuck waiting on them, without spending a model turn — an ADDITION (RFC Phase 4, partial, its as-built block names this PR).

  1. New /crew-board page: one conductor's items in three bands, finished collapsed — justified
  2. "Crew board" entry in a session's overflow menu, self-hiding when no ledger exists — justified
  3. Stop button on an orphaned item, keyed by item id, worker key never exposed — justified
  4. Take-over renders no control and the route answers 501 — justified
  5. Owner-gated masked read (worker_session_key dropped, bind text blanked, 400 on a malformed key) — justified
  6. conductor_alive field in the payload — zero consumers (see above)
  7. Egress deep-redaction of every payload string + posture-registry row — duplicate of safe_work_fields ingest pass (see above)
  8. SEL lines now name the operator, not the conductor key; _own_ledger gains a caller param — justified
  9. Ten committed screenshots + capture harness + fixtures + regen script — justified (653 sibling capture-*.mjs scripts; assets dir precedent)
  10. Feature-map rows and bundle-size comment updated — rides along; docs-in-same-commit invariant, harm-free

[FIRST-PRINCIPLES-REVIEWED] be88320

Description read

[DESCRIPTION-READ] 1bed0ac26f69491e380a75ae4c4ddf1efc243b91a8eeb3961b9ee9883a47a857

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 Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

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

Review details

Nothing blocks: no AUTOSDE blocking: true rule is violated and no survivor reaches a crash, data-loss or security class — five advisory defects on the changed lines.

FINDING — website/src/i18n/locales/ko.json:11357 — the new Korean block spells the worker role "워여", a non-word, and repeats it in stop_not_confirmed (:11368), while the same block writes the correct "워커" three times (board_info, stop_unavailable_closed), so every Korean board row's worker badge and the stop-not-confirmed notice render a garbled term → Fix: replace both 워여 with 워커.

FINDING — website/src/pages/crewBoardRows.ts:73 — if (item.outstanding) return 'pages.crewBoard.kind_ruling' is tested before if (item.terminal) return null, and apply_conductor_action's close branch (src/kiro_crew/work_ledger.py:1883-1889) sets state and appends a "close" event without touching worker-owned status, so an item closed while its last report was question comes back terminal: true, outstanding: true (_is_outstanding returns True on answered is None) and its Finished-band row's kind label reads "needs a decision" instead of item.state — the exact confusion partitionBoardRows' own docstring says the band ordering exists to prevent → Fix: move the item.terminal check above the outstanding check.

FINDING — src/kiro_crew/dashboard/handlers/work_ledger_board.py:295 — CrewBoardMenuItem probes this route on every session-actions menu open and hides on 404, so _own_ledger(key, "work_ledger_board", caller) writes an SEL outcome="denied" error=no_ledger row for every ordinary (non-conducting) session an operator opens a menu on, diluting the audit trail with routine navigation → Fix: give the probe a distinct operation, or suppress the denied row for a simply-absent record, in _own_ledger (already edited by this PR).

FINDING — website/src/pages/CrewBoardPage.tsx:78 — AliveDot renders alive as an aria-hidden bordered span with no text and nothing else in the row carries it, so a screen-reader user gets no running/idle/closed state at all and idle vs closed differ only by border colour → Fix: give the span role="img" with aria-label={item.alive} (and correct the docstring's "alive … shown verbatim" at :28). (origin: validation)

FINDING — website/src/pages/CrewBoardPage.tsx:23 — the module docstring states "channels_available arrives false until the RFC's Phase 5 … so that band turns on server-side with no edit here", but the handler's payload carries no such field and test_the_read_advertises_whether_take_over_is_possible pins its absence, so the prose documents a server contract that does not exist → Fix: delete that sentence.

[OPUS-REVIEWED] be88320

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable be88320a50d7ccdeb202f7294210995a372b8dbb: <one-sentence reason>

@chenmingwei23 chenmingwei23 changed the title Crew page work-item board over a masked work-ledger projection (RFC Phase 4) feat: crew page work-item board over a masked work-ledger projection Sep 22, 2026
@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 readiness: checking Automated validation is still running labels Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from 05dafd2 to 3e793ed Compare September 22, 2026 14:04
@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 readiness: checking Automated validation is still running labels Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from 3e793ed to d5013a8 Compare September 22, 2026 15:17
@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 readiness: checking Automated validation is still running labels Sep 22, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from d5013a8 to 99c0bc6 Compare September 22, 2026 15:53
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 22, 2026
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 23, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from 501eec2 to 7316bec Compare September 23, 2026 03:20
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 23, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Rendered evidence refreshed for 7316bec2d4, now covering the entry point and the empty board.

The board, light and dark.

board light
board dark

The orphaned board, light and dark. Stop worker is live on the item whose worker still runs and states what stopping keeps and that it cannot be undone; on the item whose session has closed the same line carries the reason and the button is disabled.

orphaned light
orphaned dark

The entry point: the Crew board item in a conducting session's overflow menu.

menu entry

A ledger that exists and holds nothing. The goal still shows, so the page says whose board it is.

empty board

The per-item event tail, opened.

events open

A failed Stop: the action route answered 500 and the button was clicked, so this is the page's real error path.

action failed

A session that keeps no work ledger. The menu entry hides itself for exactly this case.

no ledger

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — 🔴 changes requested (blocking)

GPT 5.6 found at least one blocking issue that must be resolved before merging 7316bec2d471c3d6d719870cbe1d61896283f45a. Adjudication upheld 2 of 2 blocking finding(s); those must be resolved before merging.

This comment is updated in place on each push.

BLOCKING -- docs/feature-map/README.md:272 -- The Work ledger row still claims no dashboard page exists

| Crew board | One conductor's work items as a board...
Feature-map reader -> compares this row with line 220’s “no dashboard page yet” -> receives contradictory navigation guidance.
Anchor: feature-map-correctness
Fix: Update the Work ledger row to reference the Crew board page and projection.

BLOCKING -- website/src/pages/CrewBoardPage.tsx:277 -- Item rows lack the required narrow layout

<div className="flex items-start gap-2">
<span className="w-[5.5rem] shrink-0 ...">
320px viewport -> fixed metadata rails consume the row width -> the title/status column is squeezed instead of adopting a usable narrow layout.
Anchor: narrow-viewport-required
Fix: Stack or wrap metadata below the title on narrow screens, restoring columns at md:.

FINDING -- src/kiro_crew/dashboard/handlers/work_ledger_board.py:103 -- “the button ships disabled” contradicts takeOverAvailable ? <Btn> : null, which omits it -> Fix: state that unavailable take-over renders no control.

[BLOCK-MERGE] 7316bec
[GPT-REVIEWED] 7316bec

Adjudication (Opus 4.8) — is blocking on each finding proportionate?

Both findings are anchored to AUTOSDE rules carrying blocking: true, which the contract makes authoritative over my weighing.

F1 — feature-map-correctness (AUTOSDE.yaml:13, blocking: true). Confirmed the contradiction: the Work ledger row (README.md:220) still reads "no dashboard page yet (Phase 4 adds the Crew page item table)", while this PR adds exactly that page — the Crew board row (README.md:272) whose page reads the work_ledger projection. The rule requires every changed map row verified true against the diff. Rule flag is authoritative.

F2 — narrow-viewport-required (AUTOSDE.yaml:73, blocking: true), file-pattern src/pages/*.tsx matches CrewBoardPage.tsx. ItemRow (line 277) is a fixed multi-column flex shell with two shrink-0 rails including a pinned w-[5.5rem] (line 313) and no narrow-first / width-branch / single-column provision — precisely what the rule states "does not satisfy this." Rule flag is authoritative.

[ADJUDICATION] 7316bec2d471c3d6d719870cbe1d61896283f45a total=2 uphold=2 downgrade=0
UPHOLD F1 docs/feature-map/README.md:272 reason=autosde-blocking-rule
UPHOLD F2 website/src/pages/CrewBoardPage.tsx:277 reason=autosde-blocking-rule
[GPT-ADJUDICATED] 7316bec2d471c3d6d719870cbe1d61896283f45a

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7316bec2d471c3d6d719870cbe1d61896283f45a: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 23, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from 7316bec to 960af34 Compare September 23, 2026 04:14
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 23, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Rendered evidence refreshed for 960af34bee. The board, orphaned actions and event tail are re-rendered against the narrow-first row layout; narrow-320 is new and is the 320px width the layout rule names.

Board, dark
Board, light
Orphaned actions, dark
Orphaned actions, light
Crew board entry in the session overflow menu
Empty board, ledger present with no items
Event tail expanded
Failed Stop, real error path
Session that keeps no work ledger
320px: metadata stacks under the title, event rows wrap

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Sep 23, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from 960af34 to 34359a1 Compare September 23, 2026 05:05
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 23, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Rendered evidence refreshed for 34359a1204. The failed-Stop shot now shows the error notice on its own line below the button row, and every orphaned row leads its hint with what survives.

Board, dark
Board, light
Orphaned actions, dark
Orphaned actions, light
Crew board entry in the session overflow menu
Empty board, ledger present with no items
Event tail expanded
Failed Stop: the notice sits below the button row
Session that keeps no work ledger
320px: metadata stacks under the title, event rows wrap

@chenmingwei23
chenmingwei23 force-pushed the feat/crew-page-work-items branch from 34359a1 to 2d16efe Compare September 23, 2026 05:47
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Rendered evidence refreshed for 2d16efe608, the rebase onto current main.

Board, dark
Board, light
Orphaned actions, dark
Orphaned actions, light
Crew board entry in the session overflow menu
Empty board, ledger present with no items
Event tail expanded
Failed Stop: the notice sits below the button row
Session that keeps no work ledger
320px: metadata stacks under the title, event rows wrap

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 23, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Screenshot evidence re-rendered on the current head: the Stop control now reads Stop current turn and its one dim line states the outcome the delegate actually delivers.

Crew board, dark
Crew board, light
Orphaned item actions, dark
Orphaned item actions, light
Failed action, dark
Events expanded, dark
Crew board entry in the session menu, dark
Empty board, dark
No ledger, dark
Narrow 320 px viewport, dark

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Screenshot evidence re-rendered on the current head: the Stop control now reads Stop current turn and its one dim line states the outcome the delegate actually delivers.

Crew board, dark
Crew board, light
Orphaned item actions, dark
Orphaned item actions, light
Failed action, dark
Events expanded, dark
Crew board entry in the session menu, dark
Empty board, dark
No ledger, dark
Narrow 320 px viewport, dark

@dwu96

dwu96 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:

  • Size/scope puts it outside the unattended lane. 4220 added lines across 46 files introducing a new dashboard surface end to end (CrewBoardPage.tsx, the work_ledger_board projection handler, the API client, and a screenshot-capture harness with fixtures). A new subsystem of this size is more surface than the automated drive-to-green lane will change on your behalf without your direction.
  • UX Review is 🔴 BLOCK on "cannot evaluate", and closing it needs decisions I must not make for you. The evidence gaps are two missing stills — the Finished band in its collapsed default state (showFinished=false, the view every user sees first; shot-01/02 show it expanded) and a board with a stale item (the reviewer says a fixture variant suffices). The rest of that verdict is presentation design: whether the aria-hidden alive dot gets a title naming running/idle/closed, whether board_info explains what a "Round" is, how no_ledger_title is distinguished from empty_title, and what a masked bind event should read as instead of a bare "bind" with empty text.
  • GPT 5.6 is blocking with 2 findings on head d5b7f951, one of them security-fenced. F1 — src/kiro_crew/dashboard/handlers/work_ledger_board.py:265: a successful owner board read emits no SEL event, because the dashboard audit middleware records only POST/PUT/DELETE/PATCH and the board GET audits only refusals; the fix is to emit an allowed SEL event after the owner gate succeeds. F2 — website/src/pages/CrewBoardPage.tsx:464 and website/src/components/CrewBoardMenuItem.tsx:59: isNotFoundError branches on HTTP status alone, so any 404 (route-not-registered, proxy) renders as a neutral empty board and hides the menu entry, bypassing ErrorNotice; treat a 404 as absence only when its backend code is no_ledger (parseErrorCode(err.body) is the existing idiom). Both fixes are small, but F1 is security-class and fenced, so it needs a repository writer either way.
  • The branch is CONFLICTING with main and needs a rebase before any of the above can be re-verified.

One thing you can ignore: the single red backend shard, Backend Tests (Windows) (4), failed only on test/test_slack_agent_passthrough.py::TestAgentPassthrough::test_channel_agent_passed (1 failed, 14518 passed) — unrelated to this diff, and it should clear on the re-run your rebase triggers.

When you've addressed these, the pipeline will re-assess on its next cycle. If you'd prefer no automation on this PR at all, add the pr-no-autofix label.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

🤖 Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days with failing CI. I've assessed the blockers and they appear resolvable — I'll push fixes directly to this branch as a co-author.

Assessment: Five blockers, all mechanical. (1) Branch is dirty against main — rebase. (2) GPT 5.6 BLOCK, both findings upheld with the fix named: isNotFoundError at CrewBoardPage.tsx:464 / CrewBoardMenuItem.tsx:59 branches on HTTP status alone, so any 404 reads as absence — use the existing parseErrorCode idiom and treat 404 as absence only for no_ledger; and the owner-gated board GET at work_ledger_board.py:265 emits no allowed SEL event. (3) UX BLOCK is an evidence gap, not a design objection: no shot of the collapsed Finished band or the stale badge — the PR already ships capture-crew-board.mjs + regen-crew-board.py, so add the two fixture variants and regenerate. (4) Backend Tests (Windows) (4) is red on test/test_work_ledger_projection.py, which is out of this diff — base drift, rebase re-measures. (5) First Principles CONCERNS (advisory): conductor_alive ships with zero readers; either drop the key or say why it stays.

If you'd prefer I don't touch this PR, add the pr-no-autofix label.

Implements Phase 4 ("the surfaces"), Crew page half, of
docs/request-for-change/rfc-conductor-work-ledger.md. The store, tools and the
conductor's own read route shipped in Phases 1, 2 and 2.5; this adds the surface.

/api/work-ledger cannot serve a browser, and not because it lacks a field. It
resolves WHICH ledger to read from the caller's X-Session-Key and takes no
conductor parameter, which is the contract session_ledger.py states outright; a
browser carries a cookie, not a session key, so it cannot name a conductor at
all. Its rows also carry worker_session_key, and the route is MCP-only. So this
adds a second read over the same store for the other caller:

  GET  /api/crew-board?conductor=KEY   masked, cookie-authenticated projection
  POST /api/crew-board/action          stop or take over one ORPHANED item

A row is WorkItem.to_dict() minus worker_session_key, plus the derived flags the
conductor's read already computes and a server-joined `alive` -- joined here
because the key that resolves it is the field the page may not receive. The mask
names the field to DROP rather than the fields to keep, so an item field added
later reaches the page instead of silently going missing.

Two defects the work surfaced, both of which would otherwise have shipped. The
natural route spelling, /api/work-ledger/board, sits under a prefix already in
_STRICT_INTERNAL_API_PATHS, and that list matches by prefix -- so the board would
have inherited MCP-only auth and 403'd every browser call. And masking the item
field is not enough: a bind event's text IS the worker session key, which a
per-row check passes happily and a whole-payload assertion catches.

The stop delegates to chat_handlers.stop_slot_turn, the single primitive the Stop
button and session_control.stop_target both already use. Not to stop_target
itself: it authorizes through authorize_target -> caller_slot_key, which resolves
a caller only by walking the LIVE slot table, and an orphaned item is by
definition one whose conductor slot is gone -- so that delegation would be
refused caller_unidentified on every request this route accepts. escalate=False
for the reason stop_target documents: a browser whose request timed out re-sends
it, and escalation would discard the worker's queue for a retry.

take_over answers 501 and renders disabled. No primitive exists to delegate to:
session_control has no verb that re-owns a session, and CONDUCTOR_ACTIONS is
{create, bind, decide, verdict, close, goal} with no transfer. The server sends a
stable code and the page renders a translated reason, so the refusal and the
explanation cannot drift apart. Its reason is stated once at board level, because
the unavailability belongs to the gateway rather than to any row; a row states
only its own reason, which is whether its worker session is still open.

The page lifts items waiting on a ruling into a band at the top, because that is
the one question a conductor's board is read to answer. status (worker) and state
(conductor) stay two chips: they are different parties' claims about the same
item and can legitimately disagree, and one merged chip would have to pick a
side. The outstanding rule requires the newest decision to be NEWER than the
report that asked, so a stale ruling does not silence a fresh question, and an
undateable question stays outstanding -- failing toward the human.

Error branches read a rejection's `status` rather than using `instanceof
ApiError`, for the reason isNotFoundError documents next door: an ApiError from a
different transport, or a mocked client, is still a 404 or a 409 and must be read
as one.

The artifact row is sorted by byte order, not localeCompare. Those are keys the
store defines, never translated prose, and a locale collation made the row order
depend on the viewer's browser -- two people reading the same board could see the
same artifacts in different orders.

Screenshots are committed under docs/request-for-change/assets/ and the harness
writes there by default, because Design and UX review read rendered evidence from
the revision itself. The payload they render is verbatim real handler output,
dumped from a seeded store, since a hand-written fixture would agree with the
page by construction. The orphaned scene is its own smaller two-item board rather
than a second recording of the first: two recordings of one board differ by a few
flags, which makes the files near-copies, and a focused board is the clearer
screenshot anyway. The boot-time /api stubs every harness repeats now live in
website/scripts/lib/boot-stubs.mjs beside serve-dist.mjs.

work_ledger_board.py joins _PERMITTED_STORE_IMPORTERS as an argued third seam:
the rule exists so one AGENT session cannot name another's ledger, and this
module's caller is the dashboard owner, who already reads every session here.

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

Reviewed on behalf of the maintainers (readiness sweep 2026-09-29): readiness passed, the required PR Readiness check is green on this head, no live CHANGES_REQUESTED, no open blocking review threads; where the PR's files also moved on main since its merge-base, the PR's own tests were run on the main+PR merge tree and passed. Approving and squash-merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-author-decision PR blocked on author input readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants