Repository navigation
feat(chat): offer resume on a signed-out row once kiro sign-in works - #35787
bolichen97 wants to merge 1 commit into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: Resume shows up only on the newest Notes
[DESIGN-REVIEWED] 28a62d4 Description read[DESCRIPTION-READ] 3cc7c1913b64aaf60b8fd8565d7f30b6aa15014878c556b9b5ae2fe91dd87070 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK The new Resume button on the signed-out row repeats a Resume the composer already shows for that same row. It sends the same Notes
What this change shipsInventory (6 items) — 2 justifiedIntent: let a turn that failed with "Not signed in to Kiro" run again after signing in, without retyping it. ADDITION.
BlockersRow Resume duplicates the composer's sign-in Resume — duplicate of [FIRST-PRINCIPLES-REVIEWED] 28a62d4 Description read[DESCRIPTION-READ] 31ddd4a61e1ef1e3dad98ac945d437fbbaf7e25c1e63a08a62297d67978469db That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader understood Resume on the main path (shots 01 and 04) and would press it. The confusions below are notes, not defects that hold the merge. Notes
[UX-REVIEWED] 28a62d4 Description read[DESCRIPTION-READ] 630d2bbca46eac867705558d51c0af7f51e0c223f8a7ee11822c95d17faaeb02 That sha256 names everything this verdict read: the PR description, plus the 23 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
c86caa1 to
bff2b58
Compare
[operator: bolichen97] |
bff2b58 to
a5a6b74
Compare
|
self-added: yes
[operator: bolichen97] |
a5a6b74 to
8272e81
Compare
|
Rebased: main moved in src/kiro_crew/cli_commands_memory.py since this head's CI ran (00c5418 -> 6157e13); CI re-running. This head's [operator: bolichen97] |
|
self-added: yes
[operator: bolichen97] |
|
[operator: bolichen97] This PR changes only So this red is main's, not this PR's: no rerun, no push and no override for it. This PR waits for those fixes, then rebases onto the one that lands. |
Code change approver recommendation: ApproveWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. This frontend-only change adds a Resume button to the newest interrupted kas_signed_out error row once a status read taken after the row appeared says Kiro sign-in works ( 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 |
|
Review passed on this head. Please rebase onto the latest main so CI can run fresh; the approval will follow once the rebased head is green. |
After a turn failed because Kiro was not signed in, the chat row only offered the sign-in, even once the sign-in had landed, so the failed message had to be typed again. The chat page now reads the Kiro sign-in status while its turn ended on that row; once the sign-in works, the newest such row, when no later request follows it, offers Resume beside its sign-in button, which reruns the turn in the same chat. The button stays, since the status can read signed in while the engine still refuses the token. The row re-reads the status every minute while it stands, and a failed read withdraws Resume rather than trusting the earlier answer. The popout and embed frames, which carry no app-level sign-in notice, show that failure on the row, except one taken while the dashboard is offline, which the offline state already reports; a chat embedded in a dashboard page leaves it to that notice. Closes #34690
8272e81 to
28a62d4
Compare
|
Rebased: main moved in This is the rebase asked for above. The only CI reds on 8272e81 were The push also carries the fix for the GPT finding on 8272e81 (span e704535aaf87): a signed-out row that a later request follows offers no Resume and gets no sign-in read, because Resume would rerun that later request rather than the row's own. A renderer test and a page-hook test cover it, and the description has three new screenshots of that state. [operator: bolichen97] |
|
self-added: no
[operator: bolichen97] |
|
Re-sync budget reset This PR is inside its 48-hour watch window and GitHub now reports it as conflicting with [operator: bolichen97] |
Problem / Motivation
Goal: Once Kiro's own sign-in works again, a chat turn that failed with "Not signed in to Kiro" can be re-run from its own row in the same chat, without typing the message again.
A turn sent while Kiro is signed out ends on a row whose only button is Sign in and whose text says to send the message again. After the user signs in, the row still reads the same and still offers only Sign in, so the user types the first message again (older builds even said to start a new chat). The onboarding bug bash hit this on a first-run chat ("What can you do for me today?").
Why it matters
This is often the very first message a new Kiro Agent user sends. Losing it at that moment, and having to find and retype it after signing in, makes the first run feel broken.
Not a goal
kiro-cli login: Kiro's own sign-in cannot clear it, so it keeps its button.What changed (motivation → approach → change)
After a signed-out failure the row never offered Resume, because every
auth_requiredrow withholds it: a retry would hit the same wall. That stops being true once the sign-in works, but nothing looked.The chat page reads Kiro's sign-in status (
/api/kas-login, the query the sign-in card already uses) only while the chat's latest turn ended on akas_signed_outrow: a request sent after that row is the one Resume would rerun, so such a row keeps only Sign in and the page reads nothing for it. When the latest read says signed in, not expired and not lapsed, the row keeps its Sign in button and gains Resume beside it, worded "Signed in to Kiro — resume to send your message again.". Pressing Resume re-runs the turn in the same chat through the existing Continue path. The Sign in button stays because the status can read signed in while Kiro still refuses the token (a revoked session), and the read is keyed by the row, so a status fetched before the row appeared never counts. Embed and popout, which have no Sign in button, show Resume alone.The row re-reads the status every minute while it stands, so a popout signed in from another window gains Resume too. A read that fails withdraws Resume, even after an earlier read said signed in, and the next good read brings it back. The popout and embed frames (
/popout/*,/embed/*), which have no app-level sign-in notice, show that failure on the row itself: "We could not check sign-in status" with the server's sentence, throughErrorNoticeand with no agent hand-off, since the agent runs as the same Kiro sign-in the row says failed. The dashboard window leaves it to the app-level sign-in notice, which reads the same endpoint, so the row adds no second notice there; that includes a chat embedded in a dashboard page, such as an artifact's companion chat. A read that fails while the dashboard is offline (a gateway restart) is not shown as a sign-in problem:useOutageFailureleaves it to the offline state, as the app-level notice does.kiroSignedIninpage/transcriptRendering.tsxKIRO_SIGN_IN_NOTICE_POLL_MSErrorCardsignInWorksErrorCardsignInCheckErrorAgentSwitchNoticeBannerdoesuseOutageFailureon the row's readsignedInNowinkiroSignInState.tsexpired, not lapsed:usablealone reads an expired token as fine when a refresh token is storedisKasSignedOutingatewayNotice.tskiro-cli loginpages.chat.errorCard.retry_kas_signed_inwebsite/src/i18n/locales/kas-auth.mdrecords the behavior.Backwards compatibility
Compatible: two optional
ErrorCardprops, two optional renderer options and one new catalog key; every other row, and this row while signed out with a working status read, renders as before.Removes nothing: the Sign in button stays on every such row; Resume is added beside it.
Tests
website/src/test/transcriptRenderers.test.tsx: akas_signed_outrow offers no Resume while signed out, and oncekiroSignedInis true it offers Resume with the new wording and still passes the Sign in handler; the launcher form (kiro-cli login) offers no Resume even when signed in, and neither does a row a later request follows;signedInNowreads an expired token, or a refused renewal, as not signed in even whenusableis true; on a frame with no Sign in button, a failed status read renders on the row with its title and the server's sentence and no "Ask the agent".website/src/test/ErrorCard.test.tsx: withsignInWorks, the sign-in card shows the resume wording and both buttons, and each calls its own handler.website/src/pages/ChatPage.transcriptRendering.test.tsx, through the page's own hook: in an embed frame, a signed-in read draws Resume and a refetch that then fails (a 500token_store_failed) withdraws it and draws the failure notice; on the dashboard a failed read keeps Sign in and draws neither Resume nor a notice on the row; in a chat embedded in a dashboard page (/artifacts/doc-1) a failed read draws neither a notice nor Resume on the row; in an embed frame, a read that fails (Failed to fetch) while the gateway is disconnected draws no notice and no Resume, and the hook's own re-read once it is back brings Resume; in a frame whose first read says signed out, only the clock advancing by the poll interval (fake timers, no manual refetch) brings Resume once the status says signed in; a row a later request follows draws no Resume and makes no status read. Each fails on the code without its change.With
transcriptRenderers.tsxorErrorCard.tsxreverted, the Resume case in its spec fails; with the three chat files reverted, the failed-read case fails (no notice on the row); with the frame decided by theembeddedprop instead of the window path, the companion-chat case fails (the row notice is drawn). The launcher case holds on both sides by design: it pins that the launcher form is not widened. Without the latest-turn check, the two later-request cases fail (Resume offered, and the status read made). The three spec files passed 198 of 198 in three runs and in one shuffled run.Manual verification
On Linux, an isolated gateway (a temporary data home on 127.0.0.1, the default Kiro Agent backend, no Kiro sign-in) served the dashboard built from this branch, driven with Playwright in Chromium, with
/api/kas-loginanswered by the test. The first turn was typed and failed for real; that host's engine words the failure in a sentence the gateway does not file as signed out, so the one error row was rewritten to the shape the gateway stores for a Kiro signed-out failure before the page loaded.main, with the read saying signed in, the dashboard row offers only Sign in and the popout row offers nothing.POST /api/chat/slots/<slot>/continue, and the same chat gained[Continue — requested by the user]and a new agent attempt./artifacts/<slug>, the agent chat beside the document), a failed read shows the app-level banner only: the row keeps its signed-out text with no notice and no Resume (on the previous revision the row drew a second "We could not check sign-in status"); once the read said signed in, the banner cleared and the row gained Resume. The same chat opened as a popout still draws the notice on its row.main./api/kas-loginread, the app-level notice's (a page with no chat row makes the same one). Without the latest-turn check, row A offered Resume and pressing it queued a recovery turn told to finish the user's most recent request, which is B. A chat that ends on row A still offers Resume, and the press sentPOST /api/chat/slots/<slot>/continue(200).From the smoke run on this branch (popout frame, then the Resume press on the dashboard):
Then the re-read in a popout:
And from the smoke run on the current revision (popout with the gateway stopped and started again; dashboard with a failed read, then signed in):
A signed-out row followed by a later request, signed-in read, then a chat ending on that row:
And the artifact companion chat (
banneris the app-level notice,rowNoticethe row's own):Screenshots / video
Dashboard: signed out (top) and signed in (bottom), English, dark:
English, light:
Japanese, dark:
Popout frame, signed in: Resume and no Sign in button, English, dark:
English, light:
Japanese, dark:
Popout frame, top to bottom: signed out with a working read; the first read failed; a signed-in read followed by a failed refetch (Resume withdrawn), English, dark:
Japanese, dark:
Dashboard, after the sign-in read failed: the app-level banner at the top, the row with Sign in kept, no Resume and no notice of its own, English, dark:
English, light:
Japanese, dark:
An artifact's companion chat after the sign-in read failed: the app-level banner at the top and the row with its signed-out text, no notice and no Resume of its own, English, dark:
English, light:
Japanese, dark:
The same companion chat on the previous revision, which drew a second "We could not check sign-in status" on the row under the banner:
Popout frame with the gateway stopped: the offline composer and the row with no sign-in notice, English, dark:
The same outage on the previous revision, which drew a false "We could not check sign-in status / Failed to fetch" on the row:
A signed-out row followed by a later request, with the read saying signed in. Without the latest-turn check, the row offers Resume, which would rerun the later request, English, dark:
With it, the row keeps Sign in and offers no Resume, English, dark:
English, light:
Related Issues
Closes #34690
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)