Repository navigation
feat(dashboard): waiting-on-you cards pin an agent's ask above the composer - #39616
unstablebrainiac wants to merge 1 commit into
Conversation
Sensitive change reviewHead: 952d355
|
Sensitive Change ReviewSensitive files changed:
|
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the ask needed somewhere to persist across turns, it is a separate surface that adds to the existing ones, the moved functions' readers are listed and still resolve, and 17 images and 2 recordings of this revision were found. [DESIGN-REVIEWED] db54f61 Description read[DESCRIPTION-READ] 9688454740c0aa5d24a698669796212df5353b3228542af133170a71e2090391 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The tool is new and sits beside Notes
What this change shipsInventory (10 items) — 8 justifiedIntent: keep an agent's request for a person's action or decision in view across turns and restarts until it is resolved. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] db54f61 Description read[DESCRIPTION-READ] ffece6f985072291b5c176d364a5469249f011396fb125ad8e5b6c96a6925b28 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader understood and would use the main controls: the option rows, Send and Done. Both state changes (a card turning into its notice in place, and the stack opening and closing) have recordings. Notes
[UX-REVIEWED] db54f61 Description read[DESCRIPTION-READ] 088fabf276b05e336e76966515fb8baef5489761b6457128d925bf7d00e4e41a That sha256 names everything this verdict read: the PR description, plus the 20 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 |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/dashboard/chat_api/chat_send.py:1797 -- Regenerating an answer restores command execution
BLOCKING -- src/kiro_crew/dashboard/waiting_on_you_events.py:156 -- Lifecycle routes report success after ask cleanup fails
BLOCKING -- src/kiro_crew/dashboard/waiting_on_you.py:653 -- Uncertain answer identifiers bypass retention bounds
BLOCKING -- website/src/components/waitingOnYou/useWaitingOnYouActions.ts:75 -- Failed composer transfer loses the unsent note
[BLOCK-MERGE] db54f61 Adjudication (Opus 5.5) — is blocking on each finding proportionate?I upheld all three adjudicable findings (F1–F3) and flagged the fenced one (F4); the gate stays blocked on every finding. F1 — MEDIUM. When an answer is regenerated, the owner's note is run as a slash command, for example F2 — The finding is anchored to F3 — The finding is anchored to F4 (fenced) — The loss is real but needs three conditions at once: a superseded/cleared refusal ( 🏷️ Fenced finding(s) machine-flagged as likely edge caseThe security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.
Replace False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — 🔴 changes requested (blocking)Reviewed BLOCK: a queued card answer retires its ask as soon as it is queued, so cancelling that queued message tells the agent the ask was "answered by the person" even though no answer ever reaches it. BLOCKING — src/kiro_crew/dashboard/handlers/waiting_on_you.py:402 [BLOCK-MERGE] db54f61 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
952d355 to
2960b1b
Compare
|
Rebased: main moved in website/src/i18n/en.context.json, website/src/i18n/pluralKeys.json and all 13 locale catalogs (each conflicted beside the new globalChatSearch keys; resolved as unions) since this head's base (952d355~1 -> a311517); CI re-running. Locally: isort, flake8, black, mypy, docs lint, 301 related backend tests, tsc, eslint, and 1,317 frontend and i18n tests pass on 2960b1b. |
Sensitive change reviewHead: 2960b1b
|
2960b1b to
94a2ee5
Compare
Sensitive change reviewHead: 94a2ee5
|
94a2ee5 to
1f36404
Compare
Sensitive change reviewHead: 1f36404
|
1f36404 to
bc62581
Compare
Sensitive change reviewHead: bc62581
|
bc62581 to
ebb359a
Compare
Sensitive change reviewHead: ebb359a
|
Sensitive change reviewHead: db54f61
|
ebb359a to
db54f61
Compare
Problem / Motivation
Goal: An agent can pin what it needs from the person above the composer, as an "Action for you" card that stays until the person answers it or writes, the agent clears it, or it expires.
When an agent is blocked on the person, only the turn that first said so explains the ask. In a watch loop every later cycle adds another "still waiting on you" reply on top, so the person scrolls back to find what is needed.
[OPTIONS:]chips come only from the newest reply. Theask_questioncard blocks the turn for 30 minutes, then is withdrawn. Nothing keeps an ask in view across turns.Why it matters
Loops that wait on a person for hours produce one reply per cycle that says nothing new, and the actual ask scrolls out of view. Non-loop chats lose the ask too, as soon as the person asks a side question. The sidebar cannot say "waiting on you" for a plain-text ask (#20961).
Not a goal
babysitand goal-conductor guidance that would tell a loop to stop restating its ask. That changes default loop behaviour and waits for the RFC to be accepted. The tool description stays neutral on it.ask_question, native question cards,[OPTIONS:]chips orneeds_input.[OPTIONS:].What changed (motivation → approach → change)
An agent can now pin what it needs from you, an action or a decision with options, as an "Action for you" card above the message box. The card stays across turns, loop cycles and restarts until you answer it or write in the chat, the agent clears it, or 7 days pass, so the ask no longer scrolls away. This is Phase 1 of the design in PR #39294 (
docs/request-for-change/rfc-waiting-on-you-cards.md, stilldraft); the packaged doc issrc/kiro_crew/docs/waiting-on-you.md.waiting_on_youpins or replaces one ask: a key, a title, optional detail, and 0 to 6 options.waiting_on_you_clearremoves it. Up to 4 per session. Over-length text is refused, never cut, and so is an option label that would run as more than prose (a leading/or@, or a$nameskill token).mcp_tools/control_parts/waiting.pyandschemas.py,validation_parts/server_registries.pyandcore_turn_schemas.py(named invalidation.py),mcp_core_parts/identity.py,data/mcp_tool_titles.json,mcp_listing_relay.py, shared limits inwaiting_on_you_contract.pywaiting_on_you.jsonunder the data home, MAC'd likechange_cards.json. It survives restarts and lazy tab restore. Incognito sessions keep asks in memory only.dashboard/waiting_on_you.pymeta.human, owner as author) retires every ask. Auto-nudges, crons, sub-agents, peersession_send, apps and teammates retire none. Answering a card retires only that card. Fork starts empty; rewind and edit-and-resend clear.dashboard/waiting_on_you_events.py,dashboard/state_parts/slot_transcript.pyask_idand the stored options, and are idempotent peranswer_id. Only the chosen label or typed text becomes the user row, sent with commands off, so agent-written text never arrives with the owner's authority. A gateway restart mid-answer leaves the card marked "may already have been sent", never re-sent.dashboard/handlers/waiting_on_you.py(a registered redaction sink insecurity_posture_sinks_gateway.py); commands-off on answer sends indashboard/chat_api/chat_send.py, whose steer-or-queue decision moved whole tochat_send_steer.pyto stay under the line cap[WAITING ON YOU]block lists pinned asks, names retired ones once with their full text, and says which ask a card answer answers. It is capped at 6,000 characters.context_blocks.py,dashboard/chat_turn/--aim, separate from "Waiting on you". The needs-me hover card and the Questions tab list asks too. Strings ship in all 12 locales.website/src/components/waitingOnYou/,website/src/api/client/approvals.ts,website/src/types/,website/src/i18n/Where this build differs from the draft RFC: a paused crew queues the answer instead of refusing it (that is how chat send behaves), edit-and-resend clears asks like rewind, and Shared Crew teammates get 403 on the answer and dismiss routes. The RFC will be updated to match.
PR Size(shadow, not enforced) reports 123 files over its 80: backend, frontend, 13 locale catalogs, tests, 19 screenshots and 2 recordings. The two halves share one contract and land together.Backwards compatibility
Compatible: the tools, store, routes, slot field and context block are all new. Agents that never call the tools see no change. An older build ignores
waiting_on_you.jsonand thewaiting_on_youslot field, and skips the unknownwaitingcard surface.steer_is_autoanddecided_message_handlingmove whole fromchat_api/chat_send.pytochat_api/chat_send_steer.py, sochat_send.pystays under the 2,000-line cap. Nothing else is taken away;needs_inputand every reader of it are unchanged. Every reader of the two moved functions on main:Reader: src/kiro_crew/dashboard/chat_api/chat_send.py:_api_chat_send -- chat -- it imports both names from
chat_send_steer; test_decisions_message_steer_apply.pyReader: src/kiro_crew/dashboard/chat_handlers.py:decided_message_handling -- chat -- the facade still re-exports both names and composes
chat_send_steer; test_chat_handlers_composition_contract.pyReader: test/test_agent_origin_send.py:decided_message_handling -- chat -- its monkeypatch targets
chat_handlers, which still resolves; test_agent_origin_send.pyTests
test/test_waiting_on_you_store.py: survival across restart and lazy restore, tamper-evident records, an oversized file left alone, a failed write that broadcasts nothing and keeps every slot, expiry, incognito.test/test_waiting_on_you_retirement.py: only a live owner row retires; replays, nudges, crons, peers, apps, Issue Radar and teammates do not; fork, rewind and delete; restored asks are pushed after load.test/test_waiting_on_you_answers.py: exact label sent with its meta; oldask_id, label not among the options, a second window, retries and concurrent answers; a refused send keeps the ask; a send refused after its row landed becomesuncertain; queued answers never merge.test/test_waiting_on_you_agent.py: tool and gateway refusals with SEL audit; the per-turn block's cap, boundary escaping and answered line, including no answered line on a machine-opened turn; no loop guidance in the tool, the doc or the block.WaitingOnYouStack.test.tsx,waitingOnYou.test.ts,NeedsMeHoverCard.waiting.test.tsxandcommandCenterPanel.waitingOnYou.test.tsxcover render, answer, every 409, retry reuse, dismiss, the kept draft, the stale answer returned to its own session's draft, status precedence and the selectable list.Each fix found in local review has a regression test that fails when the fix is reverted.
Manual verification
website/scripts/capture-waiting-on-you.mjsmounts the realChatPagein a capture harness with intercepted API answers. It asserts each state, then writes the frames below in light and dark, plus two recordings. All 230 checks pass. Each frame was also inspected by eye. That inspection found one defect: "Show more" appeared when nothing was hidden. It is fixed by measuring the clamp after layout.Real-machine verification
Machine: Amazon Linux 2023 cloud desktop, x86_64, 192 vCPU / 740 GiB.
Before (main
6e059d769e):git grep -c WaitingOnYouStack -- website/src-> no matches; no card, tool or route exists.After (head
db54f610fb):node scripts/capture-waiting-on-you.mjs ../temp-screenshots/waiting-on-you-> exit 0, 230 checks pass, 36 frames and 2 recordings written.Cleanup: own machine; the capture server ran in-process on 127.0.0.1 and exited with the script.
Screenshots / video
A decision card, dark. Options form one list with a single Send:
A stack of three asks, collapsed to "+2 more", light:
More frames: action card, answered elsewhere, needs-me hover card, 390px
More states: selected option, expanded stack, grid pane, Questions tab, closed draft, returned answer, uncertain, error, read-only, 390px show more and less
A card answered elsewhere turns into its notice in place:
temp-screenshots/waiting-on-you/rec-a-answered-in-place.webm
The stack expanding and collapsing:
temp-screenshots/waiting-on-you/rec-b-stack-expand-collapse.webm
Related Issues
Part of #20961
Supersedes #39362, the same commit on a fork branch, which Sensitive Change Review cannot pass.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.