Skip to content

feat(chat): render zero-turn option action chips in the follow-up bar - #6823

Open
rnoack1 wants to merge 1 commit into
kirodotdev:mainfrom
rnoack1:feat/zero-turn-option-actions
Open

rnoack1 wants to merge 1 commit into
kirodotdev:mainfrom
rnoack1:feat/zero-turn-option-actions

Conversation

@rnoack1

@rnoack1 rnoack1 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

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 a
busy 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

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 existing useSessionActions().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.py pins all three, and test_context_composition_contract.py's critical_rules hash 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 first option-action: line. It has no line grammar of its own: whether a line is a tag line is isStringTagLine, now exported from keepVisibleMarker.ts, which mirrors the backend's _is_string_tag_line and is pinned to it by control_tag_corpus.json. Whether a tag sits inside a code fence is inOpenFence, also exported from there. So the chip, web copy and search, and the backend strip agree on every line. OfferedAction is the one type for the offer: just { label }, since close is the only action the tag carries and anything else offers nothing.

Reply ends with Offer
<!-- option-action:close=Done -->, alone or after [OPTIONS: …], any case a close chip labelled "Done"
the tag stacked with other control tags a close chip
prose after the tag, or the tag mid-line nothing
the tag inside an unclosed code fence, indented 4+ characters, or after a fence inside a list item or blockquote nothing, shown as written
an unknown action, no =, an empty label, a > in the label, a body over 256 characters, or an unrecognised comment line after it nothing

Host wiring:

  • deriveFollowUpOptions returns followUpAction, read from the same row as the options with optionActionOf. 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. ChatInput renders the bar for an action-only offer too.
  • The close is the sidebar ✕'s own close, called from ComposerDockView. Its body moves unchanged out of the useSessionActions().close callback into an exported closeSessionAsking(dispatch, slotKey) in the same file (hooks/useSessionActions.ts), and the callback now calls it. ComposerDockView already receives dispatch and renders without a Redux provider in its tests, so it calls the function rather than the whole hook. It asks through closeConfirmPrompt when 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.
  • When the chip arms. ComposerDockView passes followUpActionNeedsSecondClick, which is closeAskFor(activeSlot) === null, read at click time. closeAskFor is the one place the close-ask rule lives; closeSessionAsking calls 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.
  • crewmateFollowUps only gains followUpAction: null on its empty result; a crewmate pane never reads the action.
  • Web copy, quote and search text drop a live tag (stripOptionActionTag in AssistantMessage.tsx and searchableText.ts), with the same output as the backend's control-tag strip.
  • docs/feature-map/README.md gains a Close-session chip row.

Chip (website/src/components/FollowUpBar.tsx, +222) and copy:

  • An ActionGroup renders after the content chips, separated by a divider in the scroll layout and on its own row in multiline, holding one danger-bordered ActionChip labelled "Close session — ".
  • Click twice to confirm. With actionNeedsSecondClick true, the first click turns the chip into a filled "Click again to close — " for 3 seconds, announced through a role="status" node, and only a second click in that window calls onAction. Otherwise it reverts. The arm, confirm and 3-second revert are the shared useArmedDelete machine (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 one invisible, 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's sourceKey, 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.
  • ActionChip closes over neither onSelect nor onSend, so no click, double-click or ▲ segment can send the label as chat text.
  • 13 locale catalogues, 2 new strings each ("Close session — {{label}}", "Click again to close — {{label}}"). The French and Russian strings use tu and ты, which frStyle and ruStyle require. en.manual.json is the English source and en-XA.json is the generated pseudolocale.

Backwards compatibility

Compatible for callers: every new prop is optional, and no locale key was renamed or removed. FollowUpDerivation gains one field, followUpAction; every in-tree reader compiles. The side chat and the embed render exactly as before, since neither passes onFollowUpAction. 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 into closeSessionAsking below the hook, plus its store import, re-added with AppDispatch. One is the critical_rules hash in test_context_composition_contract.py, re-pinned for the new rule. 13 are one send_now_2 line per catalogue, re-added with the same value plus a trailing comma because a new key follows it. 12 are in FollowUpBar.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 from CHIP_LAYOUT so the action chip can omit border-transparent) and the scroll layout's two wrapper divs. The other 18 sit in output_contract.py (the dashboard rules line, rebuilt with its own tail), options.ts, ChatInput.tsx, ComposerDockView.tsx, followUpChips.ts, ChatPage.tsx, AssistantMessage.tsx, searchableText.ts and keepVisibleMarker.ts: lines re-added to carry followUpAction, the strip call, a merged import, or the export on inOpenFence and isStringTagLine.

Tests

website/src/pages/ChatPage.composerDock.test.tsx (+33), the host wiring: the second click is asked for only where closeConfirmPrompt returns null for the active slot slot-a, the chip closes the active slot through closeSessionAsking, 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:

  • optionActionOf offers close with 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.
  • The reader accepts a line exactly when isStringTagLine does (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.
  • Web copy and search (stripOptionActionTag, then stripKeepVisibleMarker) give the backend's output for every option-action case of test/fixtures/control_tag_corpus.json, read from the file, so a grammar change on either side goes red.
  • deriveFollowUpOptions carries 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.
  • ChatInput renders 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 real ChatInput, an armed chip drops its arm when the session changes and the reply keeps its sourceKey, so one click closes nothing. It fails with actionScope={slotId} removed from ChatInput, checked as a control.

searchableText.test.ts, AssistantMessage.copyFormat.test.tsx and AssistantMessage.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:

  • Rendering. Label and data attribute, after every content chip, both layouts, the action-only row, the visible consequence, the danger border, the multiline own row and the scroll-layout pinning. Nothing extra renders without an action.
  • Exactly one click entry point. A click reaches onAction and neither onSelect nor onSend; a double click never sends (with a content-chip positive control); no ▲ segment; quickSend cannot send it.
  • Click twice to confirm. Arms then runs; keeps both labels in one grid cell so the width holds (fails with a single swapped label); reverts after the window; a third click closes nothing; one click runs when the host's close asks on its own; the host is asked at click time; a newer offer starts unarmed; another session with the same sourceKey starts unarmed (fails with the session left out of the key). All six arming tests fail with arming disabled, checked by forcing needsSecondClick off as a control (the ChatInput pass-through test fails too).

Manual verification

Run against this head:

  • tsc -p tsconfig.app.json rc=0. eslint on every changed source and test file rc=0. check_file_line_cap.py 0 failures. lint:i18n, i18n:check, lint:phantom-classes, lint:restyle-ratchet and lint:theme-colors pass.
  • The chip, host, composer-dock, arm-scope and keep-visible suites (5 files): 115 tests pass. The 78 src/i18n test files pass.
  • vitest related over every changed source file: 13290 passed, 12 failed. The same 12 fail on a clean checkout of main in 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

01

02 -- at rest, scroll layout

02

03 -- action-only row

03

04 -- armed after the first click: "Click again to close — ", same width

04

05 -- armed, scroll layout, same width as frame 02

05

06 -- armed, German

06

07 -- 320px column, a long model label wrapping in full

07

08 -- 320px pane, scroll layout: the action stacks under the strip

08

09 -- at rest, light palette

09

10 -- armed, light palette

10

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

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable): the feature-map row
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@rnoack1
rnoack1 requested review from a team and chenmingwei23 August 29, 2026 18:20
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention 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 Aug 29, 2026
@rnoack1
rnoack1 force-pushed the feat/zero-turn-option-actions branch from 55af774 to 20fbfe8 Compare August 29, 2026 19:59
@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 Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of dfa65b094077f9382188f1e0208a6fa1f5537a52 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • In light theme (09, 10), the existing content chips look grey and disabled next to the new close chip, which looks enabled. The diff doesn't touch those chips, but check whether this is how they really render before relying on these screenshots.

[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 .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 Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of dfa65b094077f9382188f1e0208a6fa1f5537a52 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • If a prompt injection makes the model end a reply with the tag, the worst case is a chip the user must click twice to close a session that can be reopened. Clicking can't send text, so there's no gap that needs a new guard.

[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 .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 Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed dfa65b094077f9382188f1e0208a6fa1f5537a52 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] dfa65b0

@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — 🔴 BLOCK

Premise-level review of dfa65b094077f9382188f1e0208a6fa1f5537a52 via the fork AI-review pipeline — 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 does not.

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 ships

Inventory (10 items) — 9 justified

Intent: let a user close a finished session from a model-offered chip without spending an LLM turn. ADDITION.

  1. Every dashboard agent is now told to end finished replies with a close-session offer. — product shape, no recorded decision
  2. On the dashboard, the [OPTIONS:] last-line rule now allows one close-tag line after it. — justified
  3. A danger-styled "Close session — " chip appears after the option chips and goes through the sidebar ✕ close. — justified
  4. Where the close would not ask first, the chip needs a second click within 3 seconds. — justified
  5. A reply carrying only the action now shows the follow-up bar. — justified
  6. Copy, quote and search text drop the hidden tag. — justified
  7. Note rows, and replies older than a failed user turn, never offer the close. — justified
  8. Embedded and side chat panels offer no close chip. — justified
  9. Two new strings in each of the 13 locale catalogues. — justified
  10. The feature map gains a Close-session chip row. — justified

Blockers

Product-shape change without accepted RFC: the default dashboard agent now offers to close sessions — item 1
Trigger: the hunk changes _CRITICAL_RULES = (... _CRITICAL_RULES_TAIL_DASHBOARD) and adds "you may offer the user a close-session chip: end the reply with ". That rule goes into every dashboard session's prompt, with no flag. No docs/request-for-change/ entry on the base list covers a close offer written by the agent. The phrase "the owner chose that guard on this PR" is not one of the two recorded forms.
Outcome: what the default agent does when it finishes work changes for every dashboard user, and the repository has no record that anyone decided it.
Clears when: an RFC covering agent-offered session close is merged on the base with a status of accepted, in-progress, partial or implemented, followed by a push or rebase; or a maintainer posts /ai-review override first-principles dfa65b094077f9382188f1e0208a6fa1f5537a52 product-shape: <decision>.

[FIRST-PRINCIPLES-REVIEWED] dfa65b0

Description read

[DESCRIPTION-READ] 755f695b8d0b3c6d3bdb3efcdc238ee23c520fe5ef78066ec599040f5a12a3b7

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 Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed dfa65b094077f9382188f1e0208a6fa1f5537a52 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] dfa65b0

@rnoack1
rnoack1 force-pushed the feat/zero-turn-option-actions branch from 20fbfe8 to 3880319 Compare August 29, 2026 21:02
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Aug 29, 2026
@rnoack1
rnoack1 force-pushed the feat/zero-turn-option-actions branch from 3880319 to 0745bf5 Compare August 29, 2026 21:58
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Aug 29, 2026
@rnoack1
rnoack1 force-pushed the feat/zero-turn-option-actions branch from 0745bf5 to bc20046 Compare August 29, 2026 22:10
@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 Aug 29, 2026
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review (fork) — 🔴 BLOCK (blocking)

Which legitimate operations does 2e84def05736102fe76ab1bb41068225bbbfdffb newly refuse? Model proposes, scripts/deny_diff.py decides — updated in place on each push. A script-confirmed regression blocks PR readiness.

no leg reported, and this was not the nothing-to-adjudicate short circuit

Scope-Verdict: CONCERNS

TIGHTENING: The action-chip block ladder in ActionGroup/ActionChip (website/src/components/FollowUpBar.tsx) plus the strict OptionAction enum contract (website/src/app-sdk/protocol/options.ts) -- it refuses one threat: a one-click close chip silently discarding the user's unsent work, per the hunk "An action chip is BLOCKED while it is true ... close tears the composer down, and the composer's local state is the only copy" and the ladder "picked.size > 0 ? 'picks' : composerCaptureInFlight ? 'captureInFlight' : composerHasUnsentWork ? 'unsentWork' : actionBlockedBySlot === 'other-window' ? ... : actionBlockedBySlot === 'unverifiable' ? ... : actionBlockedBySlot ? 'unsentWorkElsewhere' : null". The type hunk additionally pins that an unrecognised action is "DROPPED at parse time, never dispatched".

ADJUDICATED: 0 candidates, 0 confirmed newly-refused
No hunk in this change reaches the tool-call deny composite — the diff touches only website/src (a protocol type, a React component, locale JSON, a test file), and none of the four checks (path fence, sensitive-command tier, exfiltration shapes, rule catalog) reads any of it. Every shell row would classify identically at d7330c1 and 2e84def by construction, so I submitted an empty golden_paths array rather than spend slots on rows that cannot flip. Zero confirmed regressions here is a statement about the classifier's reach, not evidence the tightening is well-scoped — hence CONCERNS, not PASS.

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 ActionGroup (FollowUpBar.tsx). Call path: the model emits [OPTION-ACTIONS: close=<label>] → parsed into an OptionAction → the composer host (the owner of composerHasUnsentWork, composerCaptureInFlight, and the slot-registry read behind actionBlockedBySlot) passes them to FollowUpBar → ActionGroup computes blockReason → a non-null reason paints the chip aria-disabled and ActionChip.fire() returns before onAction, so the breadcrumb-write-then-deleteSlot dispatch never runs. No shell command line reaches this path, so the classifier can settle nothing about it. The candidate legitimate inputs I would have submitted, in prose:

  • A user clicking close with a genuinely empty composer while the slot registry reports unverifiable — the type hunk names this "the fail-closed answer, not 'none'", so a stale or unreachable other-window entry (a window that crashed or lost its heartbeat) blocks the one-click close for a user who has no draft anywhere. The copy promises "this notice clears on its own"; nothing in this diff enforces that expiry, so a permanently stale entry would permanently cost this user the chip. This is the narrowing I can argue but not confirm, and the main reason for CONCERNS.
  • A user clicking close mid-dictation whose intent is precisely to abandon the recording — captureInFlight blocks with no override; recovery is cancel-then-click, which the visible copy does state.
  • A user clicking close over a whitespace-only or intentionally abandoned draft — whether that counts as "unsent work" is decided by the host that supplies composerHasUnsentWork, which is not in this diff, so the boundary lives in a caller a follow-up PR wires (the test file says these props "are fed by a PR that is not open yet").
  • A future non-close member of [OPTION-ACTIONS:] — dropped at parse time by the strict enum; fail-safe by design, and the parser itself is not in this diff, only the type contract.
    No instruction embedded in the diff, comments, locale strings, or tests attempts to direct this review; the elaborate comments are rationale prose, reported here as data only.

[SCOPE-REVIEWED] 2e84def

@dwu96

dwu96 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

🤖 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:

  • The PR states "This PR is now the tip of a stack and does not typecheck on its own", needing OptionAction and the slot composer registry from earlier units, and closes with "which is expected for a stacked PR and is why it is not ready for review yet". That settles it for automation: the 21 red checks (Frontend Lint & Type Check, Frontend Tests shards 1/3/4, Frontend Coverage Merge, Build Wheel, both Build Desktop legs, E2E, E2E Gateway Boot, four backend shards) are the declared consequence of the missing dependencies, not defects a fixer can repair on this branch. Design Review says the same from the other side and is a hard BLOCK: "this revision doesn't compile against its base … OptionAction and utils/slotComposerRegistry.ts don't exist in the base (verified), so no one can render this revision to judge its shape", with the fix "land fix(marker): parse same-line [OPTIONS:] pairs in the web grammar #10924–feat(chat): add composer work, side drafts and slot succession helpers #10926 first, rebase". Which units land in which order is your staging call.
  • First Principles is a hard BLOCK on an undeclared deletion, and its remedy is a subtraction from your own diff: against "Scope is now the chip UI only" and "Nothing was discarded", all 13 locale catalogs delete useKeyboardShortcuts.close_this_session while the live consumer at website/src/hooks/useKeyboardShortcuts.ts:1028 is untouched here and in every open dependency (fix(marker): temper every opener in the [OPTIONS streaming probe #10923–feat(chat): add a visible-only mode to the slot note endpoint #10927), so merging the declared stack in order leaves every locale's shortcut-close confirm rendering a raw key. It asks that the 13 deletions move to the PR that rewrites the hook. It also asks that 325 strings across 25 keys with zero counted consumers (useOptionActionDispatch.*, close_unsent_confirm*, resume_*, cleanup_unsent_confirm, close_old_session_failed*) each ship with the PR that first consumes them, and that the eslint.i18n.config.js exemption naming src/app-sdk/protocol/optionMarker.ts move to fix(marker): parse same-line [OPTIONS:] pairs in the web grammar #10924, since this diff does not add that file. Deciding how the stack is re-cut is not a change automation may make for you.
  • UX is a third BLOCK and cannot evaluate at all: no attachment shows the new close chip in any state — not at rest, not greyed with its action_unavailable_short_* reason note, not as the sole content of an action-only row. It also flags two concrete locale defects worth fixing while you are in there: register mixing inside one surface (fr pairing "désélectionne tes options" with "envoyez ou effacez d'abord", de pairing "Sende oder verwirf" with "Senden oder verwerfen Sie", bn and hi mixing তুমি/আপনি and तुम/आप across sibling strings), and garbled Bengali in close_not_recorded ("খোলা উর্নারের রয়েগে") plus a malformed "অাপনার" in close_old_session_failed.

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 pr-no-autofix label.

@rnoack1

rnoack1 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@dwu96 — your review was written against 2026-09-19 and the branch has been re-cut since. Re-verified every item at the current head 54fb52006b6a56a6f90c0cf4492d04546f77046f; four of the five are now fixed in code, so I am not re-fixing them. Evidence below, all at that sha.

1. "Does not typecheck on its own" / the 21 red checks — fixed.
OptionAction is declared locally at website/src/components/FollowUpBar.tsx:23 (action: 'close' at :25), UnsentWorkSource at :32. The file contains zero import statements for app-sdk/protocol/options.ts or utils/slotComposerRegistry.ts — the only textual match is a rationale comment at :11 explaining the deliberate local declaration. CI agrees at this head: 81 checks SUCCESS, including Frontend Lint & Type Check and every shard you listed (Frontend Tests 1/3/4, Frontend Coverage Merge, Build Wheel, both Build Desktop legs, E2E, E2E Gateway Boot, all four backend shards). The branch is self-contained and compiles against main.

2. The undeclared useKeyboardShortcuts.close_this_session deletion — fixed.
Nothing deletes it. close_this_session still resolves in every catalogue at this head (2 occurrences in de.json), and the key appears 0 times anywhere in the diff. website/src/hooks/useKeyboardShortcuts.ts is not among the diff's 15 files, so the consumer at :1028 is unaffected. The diff's only 23 deletions are 10 rewritten lines in FollowUpBar.tsx plus 13 send_now_2 lines re-added with a trailing comma — no catalogue key is removed.

3. The 325 strings / 25 zero-consumer keys — fixed. All five families are gone from the diff: useOptionActionDispatch 0, close_unsent_confirm 0, resume_ 0, cleanup_unsent_confirm 0, close_old_session_failed 0.

4. The eslint.i18n.config.js exemption naming optionMarker.ts — fixed. That file is not among the diff's 15 files, and optionMarker occurs 0 times. The diff is now 15 files: FollowUpBar.tsx, one test, and 13 locale catalogues.

Also fixed: the branch was CONFLICTING with its base 430 commits behind; it is now MERGEABLE with no conflict.

5. The locale defects you relayed from UX. The two concrete ones are out of scope at this head: close_not_recorded and close_old_session_failed both occur 0 times in the diff, so the garbled খোলা উর্নারের রয়েগে and the malformed অাপনার are not this PR's to repair. The fr pairing you cited is gone too — désélectionne tes options and envoyez ou effacez d'abord are 0 in the diff and 0 in the base.

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: de.md §4 "Use du, not Sie… Imperative: Speichere, Wähle aus", and likewise fr.md §4 (tu), ru.md §4 (ты), hi.md §4 (तुम), bn.md §5 (তুমি). My new strings use those guides' own example forms; the formal siblings are inherited base debt (verwerfen Sie occurs 2× in the base de.json). frStyle.test.ts carries a diff-scoped register gate — armed only when CI supplies I18N_BASE_REF — and I measured it both ways: as shipped it passes, and rewriting one value into the formal form fails it with × [changed-values] addresses the reader as tu, never vous. So "align to the catalog's established register" cannot land as stated. There is a register-neutral middle path (impersonal/infinitive, explicitly endorsed by fr.md:75, ru.md:82, hi.md:89), but that is a copy decision across five languages and I have left it for @rnoack1.

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 user-attachments URL — which only the author can mint. The description and title also still describe the older revision (they claim the stacked/non-compiling state and an i18n lint-config change that no hunk backs), so they contradict the diff above.

Copy link
Copy Markdown
Contributor

PR triage (2026-10-05): OVERLAPPING, needs a rebase, keep open

I read the full diff at head 54fb520 against merge base a830383: 15 files, +1241/−23. The changed files are FollowUpBar.tsx, a new FollowUpBar.actions.test.tsx, and 13 locale catalogs. I compared it with origin/main at af1eb61.

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 action.

Rebase needed: the branch is dirty against main. Running git merge-tree reports a content conflict in website/src/components/FollowUpBar.tsx. The cause is later main commits to that file: #13043, #14568, #14887 and #15359.

Recommendation: REBASE + MERGE-DISCUSSION. Rebase onto current main, and agree a land order with the owners of #7157, #12551 and #12829 for the shared FollowUpBar prop surface. Two items from earlier reviews are still open:

  • The title and description still describe the earlier stacked, non-compiling revision.
  • There are still no screenshots for the UX and Design gates.

@Zedmor

Zedmor commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Code change approver recommendation: A person should decide

Automated, not a person, and not a review: a maintainer still decides.

decider-v3c@217fe607 · p_defect 0.2 · router R0 (approves only when p_defect <= 0.10, on changes of at most 400 changed lines) · head 0174478e16 · 2401 changed lines

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.

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: 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 closeSessionAsking so the ✕ and the chip share it. A busy session or the confirm-before-closing setting still opens the dialog; otherwise the chip needs a second click within 3 seconds. Drafts survive a close (stated in closeConfirmPrompt.ts). The tag parser reuses the shared tag-line and code-fence checks that mirror the backend strip, and the `[OPTIONS:]` marker only has to end its own line, so option chips still parse with the tag after them. A note row never offers a close, and once a newer user request has failed nothing older offers one. Embedded and side-chat panels get no chip. The longer dashboard rules stay a fixed constant in the trusted list, so the check that recognises that block still matches; the hash is re-pinned and the channel rules are unchanged. Copy, quote and search strip the tag. Tests cover the parser, derivation, wiring, arming and strips, and every CI check passed. The Security Scope BLOCK is about an earlier commit.

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 2ed440de36 · 1234 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the careful work here. One item blocks merge on this head.

  1. 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 the option-action:close tag. That changes what a first-class agent does by default, and .github/review-prompts/first-principles.md treats 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/ on main has no close-chip RFC. #37053 adds one, but its status is draft and 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 deleteSlot only through closeSessionAsking, which is the sidebar close body moved over unchanged. So the busy-session confirm still runs, and it runs again on the second click.
  • ActionChip closes over neither onSelect nor onSend, so the label can never be sent as chat text.
  • The tag reader reuses isStringTagLine and inOpenFence.
  • test_option_action_producer.py runs every example tag through the real backend strip.

Optional:

  • The Goal says "one click". With default settings (confirmCloseSession is 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 === null turns no test red. A ComposerDockView test with a tagged reply would cover it.
  • ComposerDockView wires the chip with no embedded check, so embedded ChatPage panels (the app SDK ChatPanel and ArtifactChatPanel) show it too. The body says only the main chat page gets it. You could either gate it on !embedded or correct the scope in a PR comment.

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

Thanks for the follow-up work. One item still blocks merge on this head.

  1. src/kiro_crew/context_assembly/output_contract.py:190-197: _DIFF_RULE_DASHBOARD now 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/ on main still has no close-chip RFC. #37053 is still status: draft and 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:192 still says "a one-click close" (see the notes below).
  • Optional, no test for the host wiring: fixed. ChatPage.composerDock.test.tsx:198-212 covers followUpActionNeedsSecondClick and the embedded case.
  • Optional, embedded panels showed the chip: fixed. ComposerDockView.tsx:844 passes embedded ? 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 it agent_ipc_client.py is above the 80% per-file floor on main. 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, because ChatPane.tsx:467 uses 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 KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up work. One item still blocks merge on this head.

  1. src/kiro_crew/context_assembly/output_contract.py:190-197: the new paragraph in _DIFF_RULE_DASHBOARD reaches _CRITICAL_RULES for 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.md treats 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/ on main has no close-chip RFC. #37053 is still status: draft and 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:192 still says "a one-click close".
  • Optional, no test for the host wiring: fixed. ChatPage.composerDock.test.tsx now covers the second-click rule and the embedded case.
  • Optional, embedded panels showed the chip: fixed. ComposerDockView.tsx:844 passes embedded ? 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:192 says to put the tag "after any [OPTIONS:] line", but the existing rule at :251 says the [OPTIONS:] line must have nothing after it. A model that follows the stricter rule puts the tag above it, and findTag then offers no chip. A short carve-out in the :251 rule, 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:467 and :503 and at searchableText.ts:38 have 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:402 onward and crewmateChips.ts:65 could be dropped. #36804 is already in the merge base, and nothing reads the action that the crewmate change keeps.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up push. One item still blocks merge on this head.

  1. output_contract.py:190-198: the new paragraph in _DIFF_RULE_DASHBOARD reaches _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.md treats 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/ on main has no close-chip RFC. #37053 is still status: draft and 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-253 still says "NOTHING after it".
  • Optional, call-site tests for the copy, quote and search strips: fixed. The AssistantMessage.copyFormat, AssistantMessage.quote and searchableText tests now cover a reply that ends in the tag.
  • Optional, drop the test_agent_ipc_client.py and crewmateChips.ts edits: the test edit is gone. The one-line crewmateChips.ts change stays because FollowUpDerivation needs 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-253 itself (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:]. Then findTag offers 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, an inject row with meta.noteSession) now offers the chip, and no test covers it. Removing || action there turns no test red. Should a note from another session be able to offer to close this one?
  • The body says the composerShape.ts move keeps ChatInput.tsx under 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 KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up push. One item still blocks merge on this head.

  1. context_assembly/output_contract.py:190-197: the new paragraph in _DIFF_RULE_DASHBOARD reaches _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 the option-action:close tag, and nobody has recorded that decision. .github/review-prompts/first-principles.md counts 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/ on main has no close-chip RFC. #37053 is still status: draft and 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_DASHBOARD now 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.ts move 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-level assert turns a future rewording of the tail rule into an import failure for every test that imports this module, and python -O strips it. test_the_dashboard_last_line_rule_allows_the_close_tag_after_options already fails if the replace stops matching, so the assert could go.
  • ChatInput.tsx:1025: no test pins actionScope={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 KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up push. Everything optional from the last round is fixed. One item still blocks merge on this head.

  1. src/kiro_crew/context_assembly/output_contract.py:190-197: the new paragraph in _DIFF_RULE_DASHBOARD goes into _CRITICAL_RULES for every dashboard session of the default agent, with no opt-in. If this head merges, the default agent starts ending finished work with the option-action:close tag, and the follow-up bar shows a danger-styled close chip. Nobody has recorded that decision. .github/review-prompts/first-principles.md counts 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. main has no close-chip RFC under docs/request-for-change/. #37053 still says status: draft and 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 assert in output_contract.py: fixed. The assert is gone, and the test still pins the replace.
  • Optional, pin actionScope={slotId}: fixed. ChatInput.followUpActionScope.test.tsx drives the real ChatInput.
  • 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-71 still describes the label as "Closes this session" inside one truncating span. The shipped label is "Close session" and it wraps. FollowUpBar.tsx:864-867 also 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 above closeAskFor, so closeSessionAsking at :521 has no doc of its own. Moving the block down one function fixes the hover.
  • website/src/test/optionActionHost.test.tsx:101-113 copies five backend strip cases by hand. Reading test/fixtures/control_tag_corpus.json the way keepVisibleMarker.test.ts does would make a grammar change on either side go red.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the rebase. This head is a patch-identical rebase of 2ed440d, so the one blocking item from the last review still stands.

  1. context_assembly/output_contract.py:190-197: the new paragraph in _DIFF_RULE_DASHBOARD goes 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. main has no close-chip RFC under docs/request-for-change/, #37053 is still status: draft and not merged, and no head has an /ai-review override first-principles comment. 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-71 and the earlier-layout narration at FollowUpBar.tsx:864-867: not done yet.
  • Optional, the doc block above closeAskFor in website/src/hooks/useSessionActions.ts:507-516 that belongs to closeSessionAsking: not done yet.
  • Optional, read test/fixtures/control_tag_corpus.json in website/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-112 and FollowUpBar.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_VARIANTS except _CRITICAL_RULES would make it match its name and cover the sub-agent variant too.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up push. Every optional item from the last round is fixed. One item still blocks merge on this head.

  1. src/kiro_crew/context_assembly/output_contract.py:190-197 and :319-327: the new paragraph in _DIFF_RULE_DASHBOARD and the loosened dashboard [OPTIONS:] last-line rule both go into _CRITICAL_RULES for 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. main has no close-chip RFC under docs/request-for-change/. #37053 is still status: draft and not merged. No head has an /ai-review override first-principles comment. 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-71 and FollowUpBar.tsx:864-867: fixed.
  • Optional, the doc block above closeAskFor in useSessionActions.ts: fixed. Each function now has its own doc block.
  • Optional, read control_tag_corpus.json in optionActionHost.test.tsx: fixed. The test reads the shared corpus and checks that it found rows.
  • Optional, the stale label wording in FollowUpBar.tsx:110-112 and FollowUpBar.actions.test.tsx:40-42: fixed.
  • Optional, make test_no_other_surface_is_taught_the_close_tag loop 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 mocked closeConfirmPrompt in ChatPage.composerDock.test.tsx:66 ignores its slot argument. So pointing closeAskFor at a different slot turns no test red. You could have the mock record the slot key and assert that it is slot-a.
  • output_contract.py:319-324: the dashboard tail is built with str.replace on a copied literal. A test pins it, but splitting _CRITICAL_RULES_TAIL into 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.

This branch has not been deployed

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

Labels

fork Pull request from a fork (external contributor) needs-author-decision PR blocked on author input readiness: checking Automated validation is still running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants