Skip to content

feat(chat): restart the gateway from the repeat session-start error card - #20490

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/error-card-restart-action-13791
Oct 15, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/error-card-restart-action-13791

Conversation

@bolichen97

@bolichen97 bolichen97 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When a chat's session start fails twice in a row, the user can restart the gateway from the error card itself instead of needing a terminal.

After two consecutive failed session starts the error card withholds Resume (#13746) and tells the user to run kirocrew restart in a terminal. A dashboard-only user has no button on that screen and no way to copy the command, so the card is a dead end for them.

Why it matters

Anyone who only uses the dashboard (desktop app, remote gateway, a teammate's shared box) hits a red card whose only remedy is outside the product. They are stuck until someone with a shell restarts the gateway.

Not a goal

  • Changing when the card withholds Resume, or the server's session_start_repeat refusal.
  • Changing who may call POST /api/restart (it stays owner-gated, and the gate runs before the new check).
  • Offering the restart on embed / popout / pane surfaces, which cannot drive the gateway. They keep the terminal hint.
  • Fixing the underlying slow session/new start.

What changed (motivation → approach → change)

The card is a dead end because the repeat-start branch only renders prose with a <code> chip; no host passes it an action, though api.restartGateway() already exists for Settings and Dev Fleet.

The card reuses what the product already has for both remedies. The restart is the shared RestartGatewayButton (the two-step armed control Settings → About and the speech settings use), imported unchanged from pages/settings/AboutPanelUpdateFlow.tsx, the module #20534 split out, which holds only the About panel's update actions, not the Settings page. The press runs a useMutation, so offline it stays paused and pending. Only the endpoint's 200 means accepted; any rejection is a failure: an ErrorNotice with a plain-words title, the server's sentence below, and no Ask-the-agent (noHandoffReason: that chat would need the same failing start). The owner gate's 403 says "This account can't restart the gateway.", drops the button and shows one line for whoever runs the gateway, with the command; the endpoint's cannot-run refusal (its 409 code, read with apiErrorCode) drops the button too, since pressing again meets the same refusal, and shows the terminal hint; any other failure keeps the button, with the cost line still in view, beside "Press Restart gateway again, or run kirocrew restart in a terminal." Command chips use the shared settingRef/CopyCommandButton.

/api/restart replied 200 and only then ran _restart_gateway, so a restart that could not run (an invalid launcher or interpreter path) was told only as a later progress step, which no restart control reads: this card, Settings → About and the speech settings all kept saying "restarting". The fix is at that root. src/kiro_crew/dashboard/handlers/updates.py moves those pre-drain refusals into _resolve_restart_target; the endpoint runs it after the owner gate and before its 200 and answers a refusal as a 409 with the same sentence and a machine-readable code (restart_launcher_invalid, restart_interpreter_missing), and _restart_gateway still re-checks when it commits. All three controls already show an ApiError's message, so they all get it.

website/src/pages/chat/ErrorCard.tsx gains onRestartGateway. On a repeat row it shows a new hint (what the gateway is, and that a restart interrupts everything running on it, including your other chats, while chat history is kept and a cut-off reply can be resumed afterwards), the button, then a restarting line. A real restart always pushes a restarting progress step, which arms the update reload latch, so the page reloads on reconnect and that reload ends the flow, as it does for Settings → About. website/src/pages/chat/transcriptRenderers.tsx passes it only to the repeat row; website/src/pages/chat/page/transcriptRendering.tsx (where the chat page builds its renderers since #20388) passes api.restartGateway, not on embed / popout. The new keys land in en.manual.json and the eleven shipped translations, en-XA is regenerated, the capture harness asserts the flow, and the learn-cron-dashboard.md spec describes it.

Backwards compatibility

Compatible: new optional props on ErrorCard and on the transcript renderer options; a host that does not pass them renders the same card as today, plus the copy control. RestartGatewayButton is reused as is. POST /api/restart now answers a restart that cannot run with a 409 {ok: false, error} instead of a 200 followed by an error progress step; its only callers are the dashboard's restart controls, which all show an ApiError.
Removes nothing: the terminal hint and its catalog key stay as the fallback; no endpoint, kind or key is removed or renamed; _restart_gateway keeps its own checks and messages.

Tests

  • ErrorCard.test.tsx: the shared button replaces the terminal hint and Resume stays withheld; the first press only arms; the second calls the restart once and shows the restarting line with no button; a request the gateway never answered is a failure (notice, retry hint, button kept); offline, the press waits and sends nothing; a 403 shows through an ErrorNotice alert with no hand-off, one line for whoever runs the gateway with the command chip, no terminal hint and no button; a lapsed-cookie 403, a 500 and a 409 without a cannot-run code keep the retry; the endpoint's 409 shows its reason under the title and the terminal hint, with no retry hint and no button; the chip's shared copy control copies kirocrew restart and reports a dead clipboard.
  • test_update_channel_and_restart.py: a broken launcher and a missing interpreter are each answered 409 with the restart's own sentence and carry their code, and start no restart task; the missing interpreter also releases a deferred restart, as _restart_gateway does. The restart suites (test_restart_*, test_managed_launcher_restart, owner gate, slack gateway): 541 pass.
  • transcriptRenderers.test.tsx: onRestartGateway reaches only the newest repeat row, never an older row or a single failure that still has Resume.
  • Local gates: flake8, black, mypy on updates.py, the sync-io-in-async gate, tsc -p tsconfig.app.json, eslint at CI's warning cap, gen:ui --check, i18n:check, i18n:render, i18n key / source-string checks, theme / phantom / restyle ratchets, jscpd, bundle size / chunk cycles, semgrep on the diff, docs-lint. Frontend related set: 13,447 pass; 12 fail in 7 files (DiffBlock.streaming, ArtifactDetailPage, SchedulePage.secrets, ...). The same 12 fail on a clean origin/main worktree with the same setup (a shared node_modules link that vite's fs guard denies), so they are local-environment, not this diff.

Manual verification

node website/scripts/capture-session-start-repeat.mjs against the built SPA with every /api call stubbed: all assertions pass in dark and light (older row is plain prose; newest row has the button and no Resume, and its hint names the cost; the first press arms and sends nothing; the second sends exactly one /api/restart and the button goes; a 403 shows the ErrorNotice with no hand-off and one "ask whoever runs this gateway … they can run kirocrew restart" line with its copy control, with no terminal hint, no restart hint and no button; the copy control reports its outcome; the endpoint's 409 refusal shows the titled notice, its sentence below, and the terminal hint, with no button; a 500 keeps the button, the cost line and the retry hint; the restarting frame mutes the failure prose). Not verified here: a real restart against a live gateway, including the reload it causes; the endpoint's new 409 is covered by its handler tests above.

Screenshots / video

Second failure, chat page (dark):

second failure card dark

First press arms the shared button (dark):

restart armed dark

After the second press; the failure prose above is muted once the restart is accepted (dark):

restarting dark

A refused (403) restart: ErrorNotice and one line for whoever runs the gateway, with the copyable command; no button (light):

restart refused light

The copy control after copying (dark):

command copy outcome dark

The endpoint's 409 for a restart that cannot run: the notice with its reason and the terminal hint, no button (dark):

restart server error dark

Any other failure (an unhandled 500): the notice, the cost line with what survives, the retry hint and the kept button (light):

restart retry light

Other theme

second failure card light

restart armed light

restarting light

restart refused dark

command copy outcome light

restart server error light

restart retry dark

Related Issues

Closes #13791

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners October 14, 2026 21:04
@bolichen97
bolichen97 requested a review from mbriones98 October 14, 2026 21:04
@bolichen97
bolichen97 enabled auto-merge (squash) October 14, 2026 21:04
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Check that the 409 pre-check in api_gateway_restart should run before the coalesce latch, given its clear_restart_deferral() side effect, while a restart is already in flight.

[DESIGN-REVIEWED] 40ffd17

Description read

[DESCRIPTION-READ] d7353c9f9c6b810cc06ac4990e0ef3e24abf7c2e6e639f15e3779948ee3385a6

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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 40ffd17d7f93b21aebd207fe06b616049a8a7bde — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Check one thing before merge: a real restart from the card on a live gateway, including the page reload. The author says this was not verified.

What this change ships

Inventory (8 items) — 8 justified

Intent: let a dashboard-only user get out of the repeat session-start dead end without a terminal. This is an ADDITION, and it carries one endpoint FIX that it depends on.

  1. On the chat page, the repeat-start card gets a two-step Restart gateway button in place of the terminal hint. — justified
  2. A line under the button names what a restart interrupts and what it keeps. — justified
  3. After the restart is accepted, the card shows a restarting line, hides the button and mutes the error text. — justified
  4. If the account isn't allowed to restart (owner gate 403), the card says so, drops the button and asks whoever runs the gateway to restart it. — justified
  5. If the gateway refuses a restart that cannot run (409 with a code), the card drops the button and shows the terminal hint. — justified
  6. Any other failure keeps the button and adds a "press again, or run it in a terminal" line. — justified
  7. Every kirocrew restart command chip gets a copy control, embed and popout included. — justified
  8. POST /api/restart now refuses a broken launcher or a missing interpreter with a 409 before it answers 200, so Settings → About, the speech settings, Dev Fleet and the Tailnet card now see that refusal as an error. — justified

[FIRST-PRINCIPLES-REVIEWED] 40ffd17

Description read

[DESCRIPTION-READ] 57006907b5fbd45ad06ea84af6c3539023a44f04119bc4af57bbb6e3ea3de7a2

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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

The blind reader understood "Restart gateway" but rated it only "a guess", and the failure states show raw server text they could not read.

Watch

  • The primary button reads correctly but uncertainly. The blind reader said it "restarts that service", rated that "a guess", and would only "probably click it" after the warning about other chats made them hesitate. Severity: medium. The control is rare but disruptive, and it is the only way forward on this card. The cost line already carries the right meaning. Front-loading the safety half ("Chat history is kept") may settle the hesitation.
  • Failure details are raw server text, shown with no translation. The detail is e.message from ApiError, so the user sees strings like "500 Internal Server Error Server got itself in trouble" or "Cannot restart: invalid Python executable path". The reader said "no idea what the reason means". It is also the only thing that explains why shot-06 has no retry button and shot-07 does. Severity: medium, because it decides whether pressing again is worthwhile. Fix: keep the title in plain words and add one plain sentence per path. For example, the cannot-run path could say "This install can't restart itself", with the server text demoted below it.
  • The 403 copy names a person the user can't identify. "Ask whoever runs this gateway" left the reader saying "I can't tell whether I'm the owner". Severity: low, since only a non-owner on a shared gateway sees it. Fix: say "the person who started this Kiro Crew gateway (its owner)".

Suggestions

  • In restart_gateway_retry_hint, the instruction "Press Restart gateway again" sits right above that same button. Cut the line to "Or run {{command}} in a terminal."

[UX-REVIEWED] 40ffd17

Description read

[DESCRIPTION-READ] 48b8ed5467583a6d2037781e30a816fbb3301ac6c340bdb90f097eb283d201b5

That sha256 names everything this verdict read: the PR description, plus the 17 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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 40ffd17

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

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

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 40ffd17d7f93b21aebd207fe06b616049a8a7bde and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 40ffd17

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 14, 2026
@bolichen97
bolichen97 force-pushed the fix/error-card-restart-action-13791 branch from 6a5ae9f to f791f56 Compare October 14, 2026 22:30
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Dispositions for the round-1 findings on 6a5ae9f75d. All are fixed in f791f56be4.

  • First Principles, duplicate copy control - fixed. The local CopyCommandButton and its three restart_command_copy* keys are gone. The chip now renders the shared components/settingRef/CopyCommandButton with text={command}.
  • First Principles, duplicate restart confirm - fixed. The useConfirm modal and its restart_gateway, restart_gateway_confirm_title and restart_gateway_confirm_body keys are gone. The card renders the shared RestartGatewayButton, moved as-is from pages/settings/AboutPanel.tsx to components/RestartGatewayButton.tsx so the chat page does not import the Settings panel. AboutPanel and SttSettings import it from the new path. The hint now carries the cost line ("A restart stops every running chat") that the modal body used to.
  • Opus, errors-use-error-notice (ErrorCard.tsx:437) - fixed. The refusal renders through <ErrorNotice variant="inline" askAgent>. Test: shows a server refusal through ErrorNotice ....
  • GPT, page-layout-pattern (ErrorCard.tsx:357, :441) - fixed. Both raw <button>s are gone: the restart is RestartGatewayButton (a Btn primary), and the copy is the shared copy control.
  • GPT advisory, offline restart (ErrorCard.tsx:409) - fixed. The press is a useMutation({ mutationFn: onRestartGateway }), so offline it stays paused and pending. Test: while offline it waits instead of claiming a restart it never sent.
  • UX, evidence gaps - fixed. Added frames for the copy control on the command chip (04-restart-refused-*, 05-command-copy-outcome-*) and for the refused restart (04-restart-refused-*), in both themes.
  • UX suggestions - fixed. The hint now leads with the action ("Restart the gateway to fix this. ..."). "The dashboard" is now "This page".
  • UX watch, restarting line never ends (advisory, same as the Design watch item) - no code change this round. A real restart drops the socket and the page reconnects, then the card re-renders from the reloaded transcript. Checking that end state needs a live gateway, which this box cannot run, so it is listed as not verified in the PR body.

@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 Oct 14, 2026
@bolichen97
bolichen97 force-pushed the fix/error-card-restart-action-13791 branch from f791f56 to f23e82b Compare October 14, 2026 23:51
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Dispositions for the round-2 findings on f791f56be4. Fixed in f23e82b6ad.

  • GPT, errors-use-error-notice (ErrorCard.tsx:361, a rejected request reported as restarting) - fixed. /api/restart replies before it restarts (api_gateway_restart sleeps 0.25 s so the response flushes first), so only its 200 means the restart was accepted. Every rejection now goes through ErrorNotice with the terminal hint, and the retry stays. Test: a request the gateway never answered is a failure, not a restart ....
  • UX blocker, button stays after a refusal - fixed. A 403 (the owner gate) drops the button. Any other failure keeps it, because a transport or 5xx failure can clear. Tests: a 403 refusal ... drops the button ... and another server error keeps the retry. Frame 04-restart-refused-*.
  • UX blocker, the card explains itself twice - fixed. On a failure the terminal hint replaces the restart hint, so only one explanation shows. The harness asserts it.
  • UX blocker, vague "stops every running chat" - fixed. The cost line now gives the number: "A restart also stops 2 other running chats; you can resume them after." With no other chats it says "No other chat is running". ChatPage counts from the full slot list. The line is a registered plural (pluralKeys.json) with each locale's CLDR forms. Test: names how many other chats the restart stops. Frame 01-second-failure-card-*, with two stubbed running slots.
  • UX watch, armed-state contrast in light theme - no change in this PR. That colour belongs to the shared RestartGatewayButton (--warn on --warn-fg). This PR moves the button and does not restyle it, so Settings shows the same colour.
  • UX suggestion, "usually under a minute" - not adopted. A restart drains running sessions first (_restart_gateway), so I have no measured duration to state.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Oct 15, 2026
@bolichen97
bolichen97 force-pushed the fix/error-card-restart-action-13791 branch from f23e82b to 125f55e Compare October 15, 2026 01:25
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Dispositions for the round-3 findings on f23e82b6ad. Fixed in 125f55eec2, which is rebased onto main after #20534 split AboutPanel.

  • First Principles (target=first-principles), unreachable restart_gateway_impact_unknown - fixed. The branch is deleted, and its key is removed from all 12 locales and en-XA. RestartGatewayAction now takes otherRunningChats: number as required. ErrorCard offers the restart only when the host passes both onRestartGateway and a count, and keeps the terminal hint otherwise. Test: without a count it keeps the terminal hint ....
  • Opus advisory, lapsed-cookie 403 (ErrorCard.tsx:374) - fixed. refused is now status === 403 && !e.authRequired. Test: a lapsed-cookie 403 (authRequired) keeps the button ....
  • UX blocker, "gateway" unexplained and a scary cost line - fixed. The hint now names it in user terms: "Restart the gateway (the background service that runs every chat) to fix this." The cost line now says the other chats can be resumed: "A restart also interrupts 2 other running chats; you can resume each one once the gateway is back." Frame 01-second-failure-card-*.
  • UX watch, dead-end "Ask the agent" on the refusal - fixed. The notice uses noHandoffReason, the documented form for this case. An Ask-the-agent chat would need the same failing session start.
  • UX watch, "owner" unexplained - fixed. A 403 adds "Ask whoever runs this gateway to restart it." Frame 04-restart-refused-*.
  • UX evidence gap, the non-403 failure - fixed. Added frame 06-restart-server-error-*, a 500 with the notice and the terminal hint, button kept, in both themes.
  • UX suggestion, the restarting line - fixed. It now reads "Restarting the gateway. Send your message again once this page reconnects."
  • Rebase note - refactor(settings): split AboutPanel, ChatPanel and McpManagement #20534 had already moved RestartGatewayButton into pages/settings/AboutPanelUpdateFlow.tsx. This PR no longer moves it. It imports it from there, and that module pulls in only shared components, the api client and the store. The chunk-cycle gate reports no cycles (910 chunks).

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 15, 2026
@bolichen97
bolichen97 force-pushed the fix/error-card-restart-action-13791 branch from 125f55e to f3307b9 Compare October 15, 2026 02:17
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • 409 detail is server jargon span=90636c7eb6ac

outcome: rebutted
The card already does what the fix asks: the plain title carries the meaning, the server's sentence stays as secondary detail, and the user-facing next step is the terminal hint with its command and copy control (the button is gone because a second press would meet the same refusal). The sentence is kept because it is the diagnostic an operator searches for.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • The 409 code and its two values add nothing span=5ac6a7ea43a0

outcome: rebutted
The field is required, not optional: the repository's error-code contract (test/test_error_code_contract.py, run by the Static Ratchet Gate) fails a new non-2xx JSON body without a code. It failed on d529789 for exactly this 409 ('updates.py: missing_code 8 -> 9'). Removing the field reds that required gate. With the field present, branching on it (not on status 409) is the contract's stated purpose: callers switch on code, not on status or prose. Two values name two different repairs (launcher vs interpreter) for the operator; the card treating both alike is correct, since both make a second press fail.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Raw HTTP text under the retry title span=e0600d8ec427

outcome: rebutted
That line is secondary detail under the plain-words title, kept because it is what the gateway actually said and what an operator searches for. The shot-07 text is aiohttp's own body for an unhandled exception, the real string a user would see, not invented copy. The user-facing meaning and next step are carried by the title, the cost line and the retry hint.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • The two failure states share one headline span=42825336ca41

outcome: rebutted
Both outcomes are the same fact: the gateway did not restart. They differ in the next step, and each state shows exactly one next step under the headline: the terminal hint where a second press would meet the same refusal, the retry hint beside the button where it can work. A second headline for the same fact would make the user compare titles instead of reading the step.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Primary button rated a guess span=3860cf3a6c23

outcome: rebutted
The button is the shared two-step RestartGatewayButton used by Settings → About and the speech settings: the first press only arms it and says so, and nothing restarts until the second. That arming step answers 'starts or asks to confirm first' on the first press; changing the shared control's label is outside this PR.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Open the cost hint with the action and keep it scannable span=cc4d0568766b

outcome: rebutted
The hint already opens with the action: 'Restart the gateway (the background service that runs every chat) to fix this;'. It then says why a plain retry fails, the cost, and what survives. The gloss is kept because earlier rounds of this review asked what 'the gateway' is. A reorder would churn eleven shipped translations for no change in meaning.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Use 'the gateway owner' in the refused hint span=df08513de476

outcome: rebutted
Same item as spans 2ca77e770f42, 54a5f9fe8e3f and 064cf715064d. The title says 'This account can't restart the gateway.', not 'owner'. 'The gateway owner' is the gate's internal role; the viewer cannot look it up in the dashboard, while 'whoever runs this gateway' points at the person who can run the command the line gives them.

@bolichen97
bolichen97 force-pushed the fix/error-card-restart-action-13791 branch from ce8374f to 6f41be0 Compare October 15, 2026 09:50
@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 Oct 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • 'Restart gateway' read correctly but with low confidence span=932ab58440ba

outcome: rebutted
The review itself calls the hesitation reasonable: the restart does interrupt every chat, and the line says so, then says what survives (history kept, a cut-off reply can be resumed). The control is the shared two-step RestartGatewayButton, whose first press only arms it, so a hesitant reader can press once safely and read the armed state before anything restarts.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • After a 409, the terminal hint reads as old text span=fd25d63a57a1

outcome: rebutted
Every sentence in it is still true after the 409: resuming would still run the same failing start, and the terminal is the one way left to restart. It is the card's established terminal hint (the same line embeds and popouts show), so the 409 state needs no new catalog key in eleven translations. The plain title and the server sentence directly above it say that this press did not restart the gateway.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • 'send your message again below' to 'in the message box' span=a26b8aa75605

outcome: rebutted
The composer is directly below the card and is the only place a message is sent; after the reload the transcript ends at this card, so 'below' points at it. The change would touch eleven shipped translations for a friction the reviewer rates as a suggestion.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • 'whoever runs this gateway' to 'the person who installed Kiro Crew on this machine' span=9da0aa765ab8

outcome: rebutted
Same item as spans 2ca77e770f42, 54a5f9fe8e3f, 064cf715064d and df08513de476. The proposed wording is wrong in the case that produces this card: a refused viewer is on a gateway someone else runs, often on a remote host or as a service, so the installer may not be who runs it, and 'this machine' would point at the viewer's own computer.

@bolichen97
bolichen97 force-pushed the fix/error-card-restart-action-13791 branch from 6f41be0 to 40ffd17 Compare October 15, 2026 10:38
@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 Oct 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Primary button reads correctly but uncertainly span=a7df66387521

outcome: rebutted
Same item as spans 932ab58440ba and 3860cf3a6c23. The reader understood what it does; the hesitation comes from the true cost, which the line must state. The shared two-step button's first press only arms it, so a hesitant reader can press once and read the armed state before anything restarts.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Failure details are raw server text span=36af14cd75f9

outcome: rebutted
Same item as spans e0600d8ec427 and 90636c7eb6ac. The server sentence is secondary detail under a translated plain-words title, and each state's translated next step (terminal hint, or retry hint beside the button) is what the user acts on. The sentence is kept untranslated on purpose: it is the diagnostic an operator searches for, and the 409 now also carries a code for the card to branch on.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • The 403 copy names a person the user can't identify span=08959866ce68

outcome: rebutted
Same item as spans 2ca77e770f42, 54a5f9fe8e3f, 064cf715064d, df08513de476 and 9da0aa765ab8, same answer: the dashboard is not told who runs the gateway, so the card names the role by what that person can do, and gives them the command. The review rates it low severity.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • Cut 'Press Restart gateway again' from the retry hint span=00e1a0f5f000

outcome: rebutted
The 'press again' half came from an earlier UX round on this PR, so the line says the button can still work. Without it, the line beside a failure reads as 'use the terminal instead', which tells the user the button is pointless when a second press can succeed.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

Design punchline (40ffd17), the pre-check running before the coalesce latch while a restart is in flight:

  • The pre-check's only side effect, clear_restart_deferral(), happens only when the interpreter is gone. In that case the in-flight restart's own _resolve_restart_target call makes the same refusal and the same clear. So a duplicate click changes nothing the in-flight attempt was not already going to do.
  • Its answer is then the true one: that in-flight restart is going to refuse with the same sentence, so a 409 now is more accurate than already_in_progress.
  • When the interpreter is present the pre-check has no side effect, and the latch answers the duplicate exactly as before.
  • Running it before the latch keeps the latch check and the task it records in one synchronous step, with no await between them, so two requests cannot both pass the latch.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 15, 2026

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

Approved by a maintainer after reading the review lanes: every lane is clean on this head, and the automated triage held it only on a size, path, category or doc rule.

@chenmingwei23
chenmingwei23 merged commit 05dcd43 into main Oct 15, 2026
106 of 108 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/error-card-restart-action-13791 branch October 15, 2026 15:43
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error card: in-dashboard restart action when a session start fails repeatedly

3 participants