Repository navigation
Conversation
55af774 to
20fbfe8
Compare
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. Screenshots 01–10 show every new chip state: at rest and armed, multiline and scroll layouts, the narrow stacked layout, light and dark themes, and German. Because this is a fork, no blind first-time reader has seen them. Notes
[UX-REVIEWED] dfa65b0 Description read[DESCRIPTION-READ] d527080156e9688a49d9c6a94296c389c268a23d71feaae7297ba13be863a5ba 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 |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the close chip reuses the existing control-tag grammar and the sidebar's own close path, and nothing is taken away. Notes
[DESIGN-REVIEWED] dfa65b0 Description read[DESCRIPTION-READ] 50d98325f28412cd64b9dc86c5c8e61a1159d759bdfe1a01e0c1a323243baaeb 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 |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Opus 5.5, fork) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK Product-shape change without accepted RFC: the change adds close-session offers to the always-on dashboard rules, so by default every dashboard agent now ends finished work by offering to close the session. No base RFC records that decision. What this change shipsInventory (10 items) — 9 justifiedIntent: let a user close a finished session from a model-offered chip without spending an LLM turn. ADDITION.
BlockersProduct-shape change without accepted RFC: the default dashboard agent now offers to close sessions — item 1 [FIRST-PRINCIPLES-REVIEWED] dfa65b0 Description read[DESCRIPTION-READ] 755f695b8d0b3c6d3bdb3efcdc238ee23c520fe5ef78066ec599040f5a12a3b7 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
20fbfe8 to
3880319
Compare
3880319 to
0745bf5
Compare
0745bf5 to
bc20046
Compare
Security Scope Review (fork) — 🔴 BLOCK (blocking)Which legitimate operations does no leg reported, and this was not the nothing-to-adjudicate short circuit Scope-Verdict: CONCERNS TIGHTENING: The action-chip block ladder in ADJUDICATED: 0 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: I wrote candidates for no platform, deliberately. The diff makes no path, separator, argv, interpreter, executable-name, or environment-variable assumption at any shell-reachable surface: it is browser-rendered TypeScript, and the strings it adds are UI copy and CSS class names. There is therefore no posix or windows spelling of a refused operation to probe, and no assumed platform I could not cover. The per-leg verdicts are the deterministic fold's to report, not mine. UNADJUDICATED: The entire tightening. The guard is the block ladder in
[SCOPE-REVIEWED] 2e84def |
|
🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive since 2026-09-15 with failing CI. I reviewed the blockers but they require your input — and your own description already names the first one:
For the record: GPT 5.6 and Opus 4.8 both report no blocking findings at this head, so nothing in the code itself is contested. PR Readiness reports 5 blocking items, Screenshot Evidence is red, and the branch is CONFLICTING against current main with its base 430 commits behind. Given the PR declares itself not ready for review, nothing here is automation's to drive. When the stack below it has landed and this revision typechecks against main, the pipeline will re-assess on its next cycle. If you'd prefer no automation touched this PR at all, add the |
|
@dwu96 — your review was written against 1. "Does not typecheck on its own" / the 21 red checks — fixed. 2. The undeclared 3. The 325 strings / 25 zero-consumer keys — fixed. All five families are gone from the diff: 4. The Also fixed: the branch was CONFLICTING with its base 430 commits behind; it is now 5. The locale defects you relayed from UX. The two concrete ones are out of scope at this head: On register mixing, I want to flag a conflict rather than silently act, because the fix direction UX asks for is the opposite of what this repo mandates. The informal forms are required by the style guides: Still open, and genuinely the author's: the screenshots. UX and Design both BLOCK solely on missing rendered evidence, and the gate reads the PR body for a |
PR triage (2026-10-05): OVERLAPPING, needs a rebase, keep openI read the full diff at head Classification: OVERLAPPING / DISTINCT. Not a duplicate and not superseded.
Breaking change / P0: neither. Every new prop is optional, and the chip renders nothing unless a host passes Rebase needed: the branch is Recommendation: REBASE + MERGE-DISCUSSION. Rebase onto current
|
Code change approver recommendation: A person should decideAutomated, not a person, and not a review: a maintainer still decides.
Why: the decider approves but is not confident enough to auto-approve (p_defect 0.2 > 0.10). Adds a close chip, rendered when a reply ends with an option-action:close control tag. The chip blocks with a visible reason whenever closing could discard unsent work: picks, a draft, a capture in flight, or work in another pane or window. The close runs through the existing cross-window handshake, covers the crew workers the server also closes, and handles confirm and reopen the same way the sidebar does. The beacon and handshake utilities had no production callers before, so existing closers are unaffected. Tests cover the tag parsing, how the offer is derived, ChatInput's wiring, the close guards and the beacon's lifecycle. Nothing blocking found. If this recommendation is wrong, reply here; the replies are how the approver is evaluated. |
Code change approver recommendation: A person should decideWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 1234 lines, more than the 400 it may approve on its own. Adds a close-session chip, driven by a trailing `` control tag, to the follow-up bar. The close is the sidebar ✕'s own logic, moved unchanged into the exported Tier: 2, held for a person: changes requested. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the careful work here. One item blocks merge on this head.
src/kiro_crew/context_assembly/output_contract.py:190-197: this PR adds a paragraph to_DIFF_RULE_DASHBOARD. It tells the default agent in every dashboard session to end a finished reply with theoption-action:closetag. That changes what a first-class agent does by default, and.github/review-prompts/first-principles.mdtreats that as product shape. Product shape needs one of two things: an RFC with status accepted (or later) on the base branch, or a maintainer override on this head. Neither exists yet.docs/request-for-change/onmainhas no close-chip RFC. #37053 adds one, but its status isdraftand it is not merged. This PR has no override comment. If this merged now, the new default would ship before anyone chose it. That also reverses the order #37053 itself describes. Smallest fix: no code change. Once a maintainer accepts #37053 and it merges, rebase or push this PR so the review lanes read the new base. Is that the order you want, or would you rather ask a maintainer for an override on this head?
What the review verified on this head:
- The chip reaches
deleteSlotonly throughcloseSessionAsking, which is the sidebar close body moved over unchanged. So the busy-session confirm still runs, and it runs again on the second click. ActionChipcloses over neitheronSelectnoronSend, so the label can never be sent as chat text.- The tag reader reuses
isStringTagLineandinOpenFence. test_option_action_producer.pyruns every example tag through the real backend strip.
Optional:
- The Goal says "one click". With default settings (
confirmCloseSessionis false), an idle session arms on the first click and closes on the second (FollowUpBar.tsx:712). A maintainer may need to choose between keeping that guard and changing the Goal wording. - No test pins the host wiring at
ComposerDockView.tsx:840-842, which decides when the close needs a second click. Inverting=== nullturns no test red. AComposerDockViewtest with a tagged reply would cover it. ComposerDockViewwires the chip with noembeddedcheck, so embeddedChatPagepanels (the app SDKChatPanelandArtifactChatPanel) show it too. The body says only the main chat page gets it. You could either gate it on!embeddedor correct the scope in a PR comment.
bolichen97
left a comment
There was a problem hiding this comment.
Thanks for the follow-up work. One item still blocks merge on this head.
src/kiro_crew/context_assembly/output_contract.py:190-197:_DIFF_RULE_DASHBOARDnow tells the default agent in every dashboard session to offer a close chip when its work is done. Users cannot opt out. That changes what a first-class agent does by default, so it needs a recorded product decision before it merges.docs/request-for-change/onmainstill has no close-chip RFC. #37053 is stillstatus: draftand not merged, and it says itself that it lands before this PR. This head has no maintainer override either, and the First Principles lane still says BLOCK. Smallest fix, with no code change: a maintainer accepts #37053 and merges it, and then you rebase this PR so the lanes read the new base. The other route is a maintainer override posted on this head.
Earlier review on a76425c, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, for the reason in item 1.
- Optional, Goal said "one click": the Goal now describes the second click. The model-facing rule at
output_contract.py:192still says "a one-click close" (see the notes below). - Optional, no test for the host wiring: fixed.
ChatPage.composerDock.test.tsx:198-212coversfollowUpActionNeedsSecondClickand the embedded case. - Optional, embedded panels showed the chip: fixed.
ComposerDockView.tsx:844passesembedded ? null : followUpAction.
Done well: the chip adds no second close path. Both clicks go through closeSessionAsking and closeAskFor, so the busy-session and confirm rules match the sidebar close exactly.
Optional:
test/test_agent_ipc_client.py:404-458: #36804 is already in this PR's merge base, and with itagent_ipc_client.pyis above the 80% per-file floor onmain. So the body's reason for these four tests no longer holds. You could drop the hunk, or land it once in #28329 or in a separate test PR.website/src/components/chat/crewmateChips.ts:65: nothing reads the action this keeps, becauseChatPane.tsx:467uses only the options, the source key and the multi flag. The copy, quote and search strip calls also have no test at their call sites. You could drop the crewmate change, or add one test per call site with a reply that ends in the close tag.output_contract.py:192: "a one-click close" could read "a close chip" so the agent's rule matches the two-click behaviour. The critical rules hash pin would need updating, and so would the title in #37053.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the follow-up work. One item still blocks merge on this head.
src/kiro_crew/context_assembly/output_contract.py:190-197: the new paragraph in_DIFF_RULE_DASHBOARDreaches_CRITICAL_RULESfor every dashboard session with no opt-in. With it, the default agent offers a close-session chip when its work is done..github/review-prompts/first-principles.mdtreats a change to what a first-class agent does by default as product shape, so it needs a recorded decision before it merges.docs/request-for-change/onmainhas no close-chip RFC. #37053 is stillstatus: draftand is not merged, and it says itself that it lands before this PR. This head has no maintainer override, and the First Principles lane still says BLOCK. Smallest fix, with no code change: a maintainer accepts #37053 and merges it, then you rebase this PR so the lanes read the new base. The other route is a maintainer override posted on this head. Which route would you like to ask for?
Earlier review on a76425c, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, for the reason in item 1.
- Optional, the Goal said "one click": fixed in the Goal. The model-facing rule at
output_contract.py:192still says "a one-click close". - Optional, no test for the host wiring: fixed.
ChatPage.composerDock.test.tsxnow covers the second-click rule and the embedded case. - Optional, embedded panels showed the chip: fixed.
ComposerDockView.tsx:844passesembedded ? null : followUpAction.
Done well: the chip adds no second close path. Both clicks go through closeSessionAsking and closeAskFor, so the busy-session and confirm rules stay the same as the sidebar close.
Optional:
output_contract.py:192says to put the tag "after any [OPTIONS:] line", but the existing rule at:251says the[OPTIONS:]line must have nothing after it. A model that follows the stricter rule puts the tag above it, andfindTagthen offers no chip. A short carve-out in the:251rule, plus "a close-session chip" in place of "a one-click close", would fix both. The critical rules hash pin would move with it.- The strip calls at
AssistantMessage.tsx:467and:503and atsearchableText.ts:38have no test at the call site. One case each, with a reply that ends in the tag, would pin them. test/test_agent_ipc_client.py:402onward andcrewmateChips.ts:65could be dropped. #36804 is already in the merge base, and nothing reads the action that the crewmate change keeps.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the follow-up push. One item still blocks merge on this head.
output_contract.py:190-198: the new paragraph in_DIFF_RULE_DASHBOARDreaches_CRITICAL_RULES(:289-290) in every dashboard session of the default agent, with no opt-in. If this head merges, the default agent starts offering a close-session chip at the end of finished work, and nobody has recorded that decision..github/review-prompts/first-principles.mdtreats a change to what a first-class agent does by default as product shape. Product shape needs one of two things: an RFC with status accepted (or later) on the base branch, or a maintainer override on this head.docs/request-for-change/onmainhas no close-chip RFC. #37053 is stillstatus: draftand is not merged. This head has no override. The smallest fix needs no code change. Either a maintainer accepts and merges #37053 and you rebase this PR, or a maintainer posts an override on this head. Have you asked a maintainer which route they prefer?
Earlier review on 1e86f56, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, see item 1. The First Principles lane passes on this head, but neither record it requires exists yet.
- Optional, the "one-click close" wording at
:192: fixed. It now says "close-session chip". - Optional, a carve-out in the
[OPTIONS:]tail rule: partly done. The new paragraph calls the tag "the one line allowed after it", but the tail rule at:252-253still says "NOTHING after it". - Optional, call-site tests for the copy, quote and search strips: fixed. The
AssistantMessage.copyFormat,AssistantMessage.quoteandsearchableTexttests now cover a reply that ends in the tag. - Optional, drop the
test_agent_ipc_client.pyandcrewmateChips.tsedits: the test edit is gone. The one-linecrewmateChips.tschange stays becauseFollowUpDerivationneeds it to type-check, which is fine.
Done well: the chip adds no second close path. Both clicks go through closeSessionAsking and closeAskFor, so the busy-session dialog and the confirm setting work the same as the sidebar close, and the confirming click checks them again.
Optional:
- Put the exception in the tail rule at
:252-253itself (for example "NOTHING after it except one<!-- option-action:close=... -->line") and move the critical rules hash pin with it. Today a model that follows the stricter line writes the tag above[OPTIONS:]. ThenfindTagoffers no chip, and in a session mirrored to a channel the backend strip leaves the raw tag text in place. - The note-row branch of
deriveFollowUpOptions(options.ts:206-211, aninjectrow withmeta.noteSession) now offers the chip, and no test covers it. Removing|| actionthere turns no test red. Should a note from another session be able to offer to close this one? - The body says the
composerShape.tsmove keepsChatInput.tsxunder the line cap. The file is 1,949 lines at the merge base and would be about 1,954 without the move, so the cap does not need it. Either drop the move or correct the reason in the body.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the follow-up push. One item still blocks merge on this head.
context_assembly/output_contract.py:190-197: the new paragraph in_DIFF_RULE_DASHBOARDreaches_CRITICAL_RULES(:326-328) for every dashboard session of the default agent, with no opt-in. So when this head merges, the default agent starts ending finished work with theoption-action:closetag, and nobody has recorded that decision..github/review-prompts/first-principles.mdcounts a change to what a first-class agent does by default as product shape. Product shape needs one of two records: an RFC with status accepted (or later) on the base branch, or a maintainer override on this head.docs/request-for-change/onmainhas no close-chip RFC. #37053 is stillstatus: draftand is not merged, and it says itself that it lands before this PR. This head has no override. The smallest fix needs no code change. Either a maintainer accepts and merges #37053 and you rebase this PR so the lanes read the new base, or a maintainer posts an override on this head. Have you asked a maintainer which route they prefer?
Earlier review on ce75e1f, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, see item 1.
- Optional, put the carve-out in the
[OPTIONS:]tail rule: fixed._CRITICAL_RULES_TAIL_DASHBOARDnow says "NOTHING after it except one ... line", the channel copy keeps the original wording, and a test pins both. - Optional, the note-row branch offered the chip: fixed. Note rows now return no action, and a derive test covers it.
- Optional, the
composerShape.tsmove and its stated reason: fixed. The move is gone from the diff.
Done well: the chip still adds no second close path. Both clicks end in closeSessionAsking, and the confirming click reads closeAskFor again, so the busy-session dialog and the confirm setting work the same as the sidebar close.
Optional:
output_contract.py:320: the module-levelassertturns a future rewording of the tail rule into an import failure for every test that imports this module, andpython -Ostrips it.test_the_dashboard_last_line_rule_allows_the_close_tag_after_optionsalready fails if the replace stops matching, so the assert could go.ChatInput.tsx:1025: no test pinsactionScope={slotId}. Removing it turns nothing red. A test that arms the chip, switches to another slot with the same source key, and checks that one click does not close would pin it.- #37053's title and heading still say "one-click", while this PR ships a second-click guard. The RFC is where the guard decision would be recorded, so the two should match.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the follow-up push. Everything optional from the last round is fixed. One item still blocks merge on this head.
src/kiro_crew/context_assembly/output_contract.py:190-197: the new paragraph in_DIFF_RULE_DASHBOARDgoes into_CRITICAL_RULESfor every dashboard session of the default agent, with no opt-in. If this head merges, the default agent starts ending finished work with theoption-action:closetag, and the follow-up bar shows a danger-styled close chip. Nobody has recorded that decision..github/review-prompts/first-principles.mdcounts a change to what a first-class agent does by default as product shape. Product shape needs one of two records: an RFC with status accepted (or later) on the base branch, or a maintainer override on this head.mainhas no close-chip RFC underdocs/request-for-change/. #37053 still saysstatus: draftand is not merged, and it says itself that it must land before this PR. This head has no override. The First Principles lane passed this head, but it marked this item justified without citing a base RFC, so that pass does not clear it. The fix needs no code change. Either a maintainer accepts and merges #37053 and you rebase this PR so the lanes read the new base, or a maintainer posts/ai-review override first-principles 2ed440de36cfba227783ea56ff4e913d0175ebe9 <class>: <decision>on this head. Choosing the route is the maintainers' call.
Earlier review on a71df90, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, see item 1.
- Optional, drop the module-level
assertinoutput_contract.py: fixed. The assert is gone, and the test still pins the replace. - Optional, pin
actionScope={slotId}: fixed.ChatInput.followUpActionScope.test.tsxdrives the realChatInput. - Optional, align #37053's "one-click" title and heading with the second-click guard: not done yet. Its title, line 2 and heading still say "one-click". That fix belongs in #37053 before it is accepted.
Done well: the chip still adds no second close path. Both clicks end in closeSessionAsking, and the confirming click reads closeAskFor again, so a session that turns busy between the two clicks still gets the dialog.
Optional:
website/src/styles/focus-and-state-cues.css:61-71still describes the label as "Closes this session" inside one truncating span. The shipped label is "Close session" and it wraps.FollowUpBar.tsx:864-867also narrates an earlier layout. Both comments could describe the current behaviour.website/src/hooks/useSessionActions.ts:507-516: the long doc block for closing sits abovecloseAskFor, socloseSessionAskingat :521 has no doc of its own. Moving the block down one function fixes the hover.website/src/test/optionActionHost.test.tsx:101-113copies five backend strip cases by hand. Readingtest/fixtures/control_tag_corpus.jsonthe waykeepVisibleMarker.test.tsdoes would make a grammar change on either side go red.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the rebase. This head is a patch-identical rebase of 2ed440d, so the one blocking item from the last review still stands.
context_assembly/output_contract.py:190-197: the new paragraph in_DIFF_RULE_DASHBOARDgoes into_CRITICAL_RULES(:325-327), and the dashboard copy of the [OPTIONS:] last-line rule is loosened (:319-324). If this head merges, every dashboard session of the default agent is taught to end finished work with<!-- option-action:close=<label> -->, and the follow-up bar shows a danger-styled close chip. There is no opt-in. That changes what a first-class agent does by default, so it needs one of two records: an RFC with status accepted on the base branch, or a maintainer override on this head. Neither exists yet.mainhas no close-chip RFC underdocs/request-for-change/, #37053 is stillstatus: draftand not merged, and no head has an/ai-review override first-principlescomment. No code change is needed. Either a maintainer accepts and merges #37053 and you rebase this PR so the lanes read the new base, or a maintainer posts/ai-review override first-principles 30826b5b4403ea5e5266012513e7391d9f3e9e68 product-shape: <decision>on this head. Choosing the route is the maintainers' call.
Earlier review on 2ed440d, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, see item 1.
- Optional, align the "one-click" title and heading in #37053 with the second-click guard: not done yet. Its front matter title still says "one-click". This belongs in #37053 before it is accepted.
- Optional, the comment at
website/src/styles/focus-and-state-cues.css:61-71and the earlier-layout narration atFollowUpBar.tsx:864-867: not done yet. - Optional, the doc block above
closeAskForinwebsite/src/hooks/useSessionActions.ts:507-516that belongs tocloseSessionAsking: not done yet. - Optional, read
test/fixtures/control_tag_corpus.jsoninwebsite/src/test/optionActionHost.test.tsx:103-113: not done yet. The five strip cases are still copied by hand.
The AI review comments on this PR still name 5b12d96, so the lanes also need to run again on this head.
Done well: the chip still adds no second close path. Both clicks end in closeSessionAsking, and the confirming click reads closeAskFor again. So a session that turns busy between the two clicks, or one another person started in a shared Crew, still gets the dialog.
Optional:
- The stale label wording also appears at
FollowUpBar.tsx:110-112andFollowUpBar.actions.test.tsx:40-42. All three sites could name the real string ("Close session") and say the label wraps (break-words) instead of truncating, and the 44rem cap could get a reason that fits the wrapping layout. test_no_other_surface_is_taught_the_close_tag(test/test_option_action_producer.py:22) checks only the channel variant. Looping over every entry of_CRITICAL_RULES_VARIANTSexcept_CRITICAL_RULESwould make it match its name and cover the sub-agent variant too.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the follow-up push. Every optional item from the last round is fixed. One item still blocks merge on this head.
src/kiro_crew/context_assembly/output_contract.py:190-197and:319-327: the new paragraph in_DIFF_RULE_DASHBOARDand the loosened dashboard[OPTIONS:]last-line rule both go into_CRITICAL_RULESfor every dashboard session of the default agent. There is no opt-in. If this head merges, the default agent starts ending finished work with<!-- option-action:close=<label> -->, and the follow-up bar shows a danger-styled close chip. That changes what a first-class agent does by default. It needs one of two records: an RFC with status accepted on the base branch, or a maintainer override on this head. Neither exists yet.mainhas no close-chip RFC underdocs/request-for-change/. #37053 is stillstatus: draftand not merged. No head has an/ai-review override first-principlescomment. No code change is needed. Either a maintainer accepts and merges #37053 and you rebase this PR so the lanes read the new base, or a maintainer posts/ai-review override first-principles dd70619621af7ea39b5b8ac7e13c0a5d095494ba product-shape: <decision>on this head. The maintainers choose the route.
Earlier review on 30826b5, item by item:
- Blocking item (product shape needs an accepted RFC or an override): still stands, see item 1.
- Optional, align the "one-click" title in #37053 with the second-click guard: not done yet. Its front matter title still says "one-click". This belongs in #37053 before it is accepted.
- Optional, the comments at
focus-and-state-cues.css:61-71andFollowUpBar.tsx:864-867: fixed. - Optional, the doc block above
closeAskForinuseSessionActions.ts: fixed. Each function now has its own doc block. - Optional, read
control_tag_corpus.jsoninoptionActionHost.test.tsx: fixed. The test reads the shared corpus and checks that it found rows. - Optional, the stale label wording in
FollowUpBar.tsx:110-112andFollowUpBar.actions.test.tsx:40-42: fixed. - Optional, make
test_no_other_surface_is_taught_the_close_tagloop over every non-dashboard variant: fixed.
The First Principles check on this head finished as "review incomplete", and its last verdict comment names 5b12d96. So that lane also needs to run to completion on this head.
Done well: the chip still adds no second close path. Both clicks end in closeSessionAsking, and the confirming click reads closeAskFor again. So a session that turns busy between the two clicks still gets the dialog.
Optional:
ComposerDockView.tsx:856: the mockedcloseConfirmPromptinChatPage.composerDock.test.tsx:66ignores its slot argument. So pointingcloseAskForat a different slot turns no test red. You could have the mock record the slot key and assert that it isslot-a.output_contract.py:319-324: the dashboard tail is built withstr.replaceon a copied literal. A test pins it, but splitting_CRITICAL_RULES_TAILinto a prefix and a suffix at that sentence would remove the text search.
Chips and their catalogs only; grammar, primitives and dispatch are separate PRs.
Problem / Motivation
Goal: Let a user accept a model-offered "close this session" suggestion from the chip, without spending an LLM turn. Where no dialog would ask first, the chip takes a second click to guard against a stray one; the owner chose that guard on this PR.
The model can already end a turn with
[OPTIONS: …]chips, but "we're done, close this"has no chip: the user has to type a reply, which spends an LLM turn to say nothing, or
find the close control themselves. A reply that ends with the control tag
<!-- option-action:close=<label> -->now gets a chip that closes the session locally,with no turn.
Why it matters
Closing is the one follow-up whose answer needs no model at all. The chip uses the same
close as the sidebar ✕, so nothing new decides what a close does: drafts are kept per
session and survive it (
lib/closeConfirmPrompt.ts), the session can be reopened, and abusy session still asks first. What the chip adds is protection against a stray click:
where that close would not ask, the chip asks for a second click instead of a dialog.
Not a goal
option-action:to the backend control-tag grammar.[OPTIONS:]grammar fixes, now fix(chat): parse same-line option markers and refuse a nested one #30465.ChatPanel,ArtifactChatPanel).ComposerDockViewpasses no action whenembeddedis set.close. An unknown action offers nothing.What changed (motivation → approach → change)
Approach. Carry the offer as one more family of the existing control-tag grammar (
keep-visible,deliver:,plan_task_id:), so it is invisible in the transcript and needs no new marker grammar. Render it as a chip in the follow-up bar after the content options, and have it call the existinguseSessionActions().close, so the chip and the sidebar close follow one rule.Change, 38 files, +1176/-66:
The producer (
src/kiro_crew/context_assembly/output_contract.py): the dashboard's critical rules now tell the agent when to offer the close: once the session's work is finished and nothing is left open, end the reply with<!-- option-action:close=<label> -->on its own line, after any[OPTIONS:]line. The dashboard's copy of the[OPTIONS:]last-line rule now reads "NOTHING after it except one<!-- option-action:close=... -->line", so the two rules agree. The channel copy is unchanged. Only the dashboard variant carries the rule; every other variant (channel, sub-agent) does not, and the backend strip from #30166 removes the tag wherever else a reply goes.test/test_option_action_producer.pypins all three, andtest_context_composition_contract.py'scritical_ruleshash moves with the new text.The tag (
website/src/app-sdk/protocol/optionActionTag.ts, new, no regex): it walks the reply's trailing lines from the end, skips blank lines and other recognised control-tag lines, and takes the firstoption-action:line. It has no line grammar of its own: whether a line is a tag line isisStringTagLine, now exported fromkeepVisibleMarker.ts, which mirrors the backend's_is_string_tag_lineand is pinned to it bycontrol_tag_corpus.json. Whether a tag sits inside a code fence isinOpenFence, also exported from there. So the chip, web copy and search, and the backend strip agree on every line.OfferedActionis the one type for the offer: just{ label }, sincecloseis the only action the tag carries and anything else offers nothing.<!-- option-action:close=Done -->, alone or after[OPTIONS: …], any case=, an empty label, a>in the label, a body over 256 characters, or an unrecognised comment line after itHost wiring:
deriveFollowUpOptionsreturnsfollowUpAction, read from the same row as the options withoptionActionOf. An action-only row now counts as an offer. A note row never offers the close, since a cron or another session wrote it, not this session's agent. Once the scan crosses a failed newer user turn, no action is offered: that request is still owed, so a close from before it would be wrong. The row's options are still re-offered there, as before.useFollowUpChips→ChatPage→ComposerDockView→ChatInput→FollowUpBar.ChatInputrenders the bar for an action-only offer too.ComposerDockView. Its body moves unchanged out of theuseSessionActions().closecallback into an exportedcloseSessionAsking(dispatch, slotKey)in the same file (hooks/useSessionActions.ts), and the callback now calls it.ComposerDockViewalready receivesdispatchand renders without a Redux provider in its tests, so it calls the function rather than the whole hook. It asks throughcloseConfirmPromptwhen the session is busy or the "Confirm Before Closing Session" setting is on, records the close for the reopen shortcut, and reports a refused close in the sidebar notice.ComposerDockViewpassesfollowUpActionNeedsSecondClick, which iscloseAskFor(activeSlot) === null, read at click time.closeAskForis the one place the close-ask rule lives;closeSessionAskingcalls it too. So where the close would ask anyway, one click opens its dialog and the user confirms once; where it would close at once, the chip needs a second click.crewmateFollowUpsonly gainsfollowUpAction: nullon its empty result; a crewmate pane never reads the action.stripOptionActionTaginAssistantMessage.tsxandsearchableText.ts), with the same output as the backend's control-tag strip.docs/feature-map/README.mdgains a Close-session chip row.Chip (
website/src/components/FollowUpBar.tsx, +222) and copy:ActionGrouprenders after the content chips, separated by a divider in the scroll layout and on its own row in multiline, holding one danger-borderedActionChiplabelled "Close session — ".actionNeedsSecondClicktrue, the first click turns the chip into a filled "Click again to close — " for 3 seconds, announced through arole="status"node, and only a second click in that window callsonAction. Otherwise it reverts. The arm, confirm and 3-second revert are the shareduseArmedDeletemachine (ARM_REVERT_MS) that the hooks, schedule and leaked-runtimes Delete buttons use, including its guard against a click that lands after the revert. Both labels sit in one grid cell with the inactive oneinvisible, so the chip keeps its width when it arms and the second click lands where the first did, in the scroll layout too. A newer offer, or another session, remounts the chip unarmed: its reset key carries the session key (actionScope,ChatInput's slot) as well as the offer'ssourceKey, because a fork keeps its rows' ids, so an old first click never carries over, and after it runs the next click arms again rather than closing twice.ActionChipcloses over neitheronSelectnoronSend, so no click, double-click or▲segment can send the label as chat text.frStyleandruStylerequire.en.manual.jsonis the English source anden-XA.jsonis the generated pseudolocale.Backwards compatibility
Compatible for callers: every new prop is optional, and no locale key was renamed or removed.
FollowUpDerivationgains one field,followUpAction; every in-tree reader compiles. The side chat and the embed render exactly as before, since neither passesonFollowUpAction. A reply without the tag renders, copies and searches exactly as before. Every other close path behaves as before.All 64 deleted lines are rewrites or moves. 20 are
useSessionActions's close callback and its comment, moved whole intocloseSessionAskingbelow the hook, plus its store import, re-added withAppDispatch. One is thecritical_ruleshash intest_context_composition_contract.py, re-pinned for the new rule. 13 are onesend_now_2line per catalogue, re-added with the same value plus a trailing comma because a new key follows it. 12 are inFollowUpBar.tsx: the icon import, the three component signatures, the entrance-stagger call, the two layout pass-throughs, the remeasure effect and its comment,CHIP_BASE(rebuilt fromCHIP_LAYOUTso the action chip can omitborder-transparent) and the scroll layout's two wrapper divs. The other 18 sit inoutput_contract.py(the dashboard rules line, rebuilt with its own tail),options.ts,ChatInput.tsx,ComposerDockView.tsx,followUpChips.ts,ChatPage.tsx,AssistantMessage.tsx,searchableText.tsandkeepVisibleMarker.ts: lines re-added to carryfollowUpAction, the strip call, a merged import, or theexportoninOpenFenceandisStringTagLine.Tests
website/src/pages/ChatPage.composerDock.test.tsx(+33), the host wiring: the second click is asked for only wherecloseConfirmPromptreturnsnullfor the active slotslot-a, the chip closes the active slot throughcloseSessionAsking, and an embedded panel gets no chip. Each test fails when its line is inverted or removed.website/src/test/optionActionHost.test.tsx(+197), the tag and the host:optionActionOfoffersclosewith its label, in any case, after an[OPTIONS:]line and inside a stacked control-tag block. It offers nothing for an unknown action, a missing=, an empty label, prose after the tag, a mid-line tag, an indented tag, a body over 256 characters, or a tag inside an unclosed fence; a fence closed earlier leaves a later tag live.isStringTagLinedoes (tab and space indent, the 16-blank limits), and skips only recognised control-tag lines after the tag. Both tests fail on the previous reader, checked by restoring it as a control.stripOptionActionTag, thenstripKeepVisibleMarker) give the backend's output for everyoption-actioncase oftest/fixtures/control_tag_corpus.json, read from the file, so a grammar change on either side goes red.deriveFollowUpOptionscarries the action beside options, offers an action-only row, and offers nothing once the user replied. Across a failed newer request (finished reply, user turn, terminal error) it offers no close, and still re-offers the options; the test fails on the previous scan. A note row (from a cron or another session) never offers a close, though its options still show; that test fails if the note branch reads the tag.ChatInputrenders an action-only bar and runs the action on click, keeps the chip live over an unsent draft, passes the host's second-click rule through, and renders no chip without a handler.website/src/test/ChatInput.followUpActionScope.test.tsx(+53): through the realChatInput, an armed chip drops its arm when the session changes and the reply keeps itssourceKey, so one click closes nothing. It fails withactionScope={slotId}removed fromChatInput, checked as a control.searchableText.test.ts,AssistantMessage.copyFormat.test.tsxandAssistantMessage.quote.test.tsx(+4, +7, +7): search, copy and quote each drop a trailing close tag. All three fail with their strip call removed.website/src/test/FollowUpBar.actions.test.tsx(+379), the chip:onActionand neitheronSelectnoronSend; a double click never sends (with a content-chip positive control); no▲segment;quickSendcannot send it.sourceKeystarts unarmed (fails with the session left out of the key). All six arming tests fail with arming disabled, checked by forcingneedsSecondClickoff as a control (theChatInputpass-through test fails too).Manual verification
Run against this head:
tsc -p tsconfig.app.jsonrc=0.eslinton every changed source and test file rc=0.check_file_line_cap.py0 failures.lint:i18n,i18n:check,lint:phantom-classes,lint:restyle-ratchetandlint:theme-colorspass.src/i18ntest files pass.vitest relatedover every changed source file: 13290 passed, 12 failed. The same 12 fail on a clean checkout ofmainin the same worktree (ArtifactDetailPage,CrewChatWindow,MarkdownPanel,ChatInput.approval).Screenshots / video
Ten frames of the real
FollowUpBar, attached to this description, none committed. Each armed frame clicks the chip once, checks the action did NOT run, and moves the pointer off, so the frame shows the armed paint and not hover. The capture also fails if the chip's width changes by more than 1px when it arms.01 -- at rest, multiline, under three content chips
02 -- at rest, scroll layout
03 -- action-only row
04 -- armed after the first click: "Click again to close — ", same width
05 -- armed, scroll layout, same width as frame 02
06 -- armed, German
07 -- 320px column, a long model label wrapping in full
08 -- 320px pane, scroll layout: the action stacks under the strip
09 -- at rest, light palette
10 -- armed, light palette
Related Issues
Follows #30166 (merged), which added
option-action:to the backend control-tag grammar so other channels strip the tag; the producer here depends on that strip. The[OPTIONS:]grammar fixes this PR used to carry are #30465.Checklist
Contribution License Agreement
Contributed under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.