Repository navigation
fix: say where to sign in on a refused kiro credential - #36888
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change fixes the regex at the cause, the rendered evidence covers the new surfaces, and the narrowed Notes
[DESIGN-REVIEWED] 75b3edc Description read[DESCRIPTION-READ] 242455325555a2bb8ec1fed654a68054418b7c9d59b74ad287da03b225bec615 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The Google and AWS marks on the sign-in buttons are a rider the description never mentions, and they bring trademark and licence surface for buttons that already carry text labels. Notes
What this change shipsInventory (9 items) — 6 justifiedIntent: A user whose Kiro sign-in is missing or refused learns where to sign in and can do it from the spot that failed. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 75b3edc Description read[DESCRIPTION-READ] dafd8ab0319e02f31c6a1e443eebe1f98ef7ba2125fec19f94f01e612b5858dd 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 read every primary Sign in control correctly, and the screenshots cover the dialog, the chat rows, Settings and the app-wide notice. Notes
[UX-REVIEWED] 75b3edc Description read[DESCRIPTION-READ] bde1da4e5af5bf67caeac5535c5dc3b0b1b3b51159fda706436d4387d75803f2 That sha256 names everything this verdict read: the PR description, plus the 27 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: |
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own. The PR does what it says. KAS's fixed "Access denied. Please check your authentication." sentence now matches the session-expiry check (one exact alternative, with tests that other "access denied" text does not match). Failed turns therefore get the sign-in tags and the request id once. The relay and Kiro CLI-only rows get a new 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 |
f3c55f6 to
7a23672
Compare
a85003d to
4d8f123
Compare
4d8f123 to
1aeb749
Compare
1aeb749 to
3e4167b
Compare
3e4167b to
9f02fcc
Compare
Human judgment recorded@CrysisDeu recorded a pre-existing release (class
This decision applies only to this commit. A new push requires a new judgment. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for this. The backend fix is small and well pinned. test_kas_access_denied_sign_in.py covers both KAS frame shapes and includes negative cases, so the new alternation cannot spread. One item blocks this head.
- Two changed controls have no screenshot, and the UX lane could not evaluate them.
KiroSignInNotice.tsx:151-154: the notice footer used to read "Open sign-in settings" and went to Settings. It now reads "Sign in" and opensKiroSignInDialogin place.KiroSignInCard.tsx:209-212: the signed-out Settings card is now a singlekiro-sign-in-openbutton.- The UX verdict on 73cc5c2 says "cannot evaluate: missing" for both. CI filed it as PASS only because the BLOCK had no Trigger or Outcome line. The CI and reviews guide says a verdict the lane cannot reach because evidence is missing is a BLOCK, never a pass.
- The body has no shot of the notice in any state. Its only Settings shot (#8) shows the dialog over a blurred page, not the card before the dialog opens. The attached shots come from 1f867d73d6 and 069af06a6e, not this head. The set the body says matches this head is not attached.
- Smallest fix: attach shots taken on this head of (a) Settings, Agent Harness, Kiro sign-in, signed out, before the dialog opens, (b) the "Kiro sign-in expired" notice, and (c) the status-unavailable notice. Then re-run the UX lane.
Optional:
transcriptRenderers.tsx:819and:864:authRequired = isAuthRequired(m)does not coverkiro_cli_sign_in. A signed-out relay row in a split pane, a Bot chat, embed or popout (noonOpenSignIn) gets the error card's Continue back, which main withheld.isAuthRequired(m) || isKiroCliSignIn(m)plus one pane test would close it.status_unavailable_detailstill says "Open sign-in settings to check your Kiro sign-in". It now sits above a "Sign in" button that opens a dialog.docs/system-specs/modules/kas-auth.md:841-851still describes the old button and the deep link.KiroSignInNotice.test.tsx:191pins the old sentence.recovery.py:318decides the row kind from the process-wide last spawn route, and this PR adds that consumer. So "pre-existing" undersells it. Tracking it in #39077 is fine.
KAS words a refused credential as "Access denied. Please check your authentication.", with no status code or expiry wording, so the turn showed that sentence alone: no place to sign in, no Sign in to Kiro button, and the request id twice. The session-expiry vocabulary now carries that exact sentence, so the row gets the harness's signed-out message, the sign-in tags and one request id. On KAS's bundled engine with no usable sign-in, the chat now offers the sign-in above the message box before a send fails. The gateway decides (chat_needs_sign_in on GET /api/kas-bundle, owner only, false when unknown), so the kiro-cli relay never sees it. The sign-in flow's logic moves into hooks/useKasLogin.ts; Settings, onboarding and the chat prompt render the same KasLoginEmbedded/ KasLoginGate views from it. getting-started.md names where to sign in. Refs #36870
73cc5c2 to
75b3edc
Compare
|
Thanks for the review. Head is now 75b3edc, still one commit; it merges cleanly with main, so no rebase. Fixed
Screenshots on this head are in the body under "This head": (a) Settings > Kiro account signed out, (b) the sign-in expired notice, (c) the status-unavailable notice, all from that harness on 75b3edc. The older shots are labelled as older heads. No images are committed. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving head 75b3edc. This review checked the backend sign-in fix (the access-denied alternation and its negative tests in test_kas_access_denied_sign_in.py), the harness tags (positive identity, KAS only for the relay branch in recovery.py), the owner gate on chat_needs_sign_in, and the cancel-on-close path in useKasLogin.ts. PR Readiness is green on this head, and every AI review lane passes on it.
Earlier change request, item by item: (1) the screenshots taken on this head are now in the body under "This head" (the signed-out Settings card, the expired notice and the status-unavailable notice), and the UX lane passes on this head, so this item is fixed. The optional Continue gap is fixed at transcriptRenderers.tsx:822, with a pane test. The notice copy and kas-auth.md are updated, and the route note is tracked in #39077.
Security: chat_needs_sign_in goes only to the owner and answers false when the store, config or route cannot be read. The new path stores no new credentials. A dialog closed while its begin request is still in flight cancels the late login and opens no tab.
Done well: the login state machine now lives in one hook, and one shared dialog uses it, instead of a copy on each surface.
The design is signed off under the standing maintainer sign-off for changes by team members.
Optional:
KiroSignInPrompt.tsx:41hides the prompt whenever a sign-in is stored, even an unusable one (expired, or its refresh was refused). The gateway still reports that the chat needs sign-in in that case. Hiding only when the stored sign-in is usable, and passingreauthto the strip, would close the gap. A test with{authenticated: true, usable: false}would pin it.- Some code from the old flow no longer runs: the
renderReauthCancelslot and its branch inKasLoginGate.tsx,cancelReauthinuseKasLogin.ts, and theopenKiroSignInnavigate callback thatErrorCardonly checks for truthiness. Deleting them and updating the two prop docs would remove the dead paths. - The Google and AWS marks, their notice block and the vite inline-limit entry are not needed for the Goal. The existing icons would do the same job.
Problem / Motivation
Goal: When a chat cannot run because the user is not signed in to Kiro, or their sign-in was refused, Kiro Crew tells them where and how to sign in, and on Kiro Crew's own engine it offers the sign-in before the first message fails. Every signed-out spot (the chat before the first message, the failed chat row, Settings and the app-level notice) shows one line and a Sign in button that opens one shared sign-in dialog (Layout 1). A signed-out chat on kiro-cli's relay shows the welcome screen's two kiro-cli commands, Check sign-in again and Sign in; on the Kiro CLI harness without the relay it shows the two commands and Check sign-in again.
A user's chat turn failed with only this, and they had no way to find the sign-in:
The sentence is KAS's fixed text for a credential the Kiro service refused (
AccessDeniedError). It names no place to sign in, the error row offers no Sign in to Kiro button, and the request id is printed twice. On a fresh install on Kiro Crew's own engine nothing says a sign-in is needed until a message fails (#32058, #36381).Why it matters
Nothing works until the user signs in, and today the error does not say how. The user said most people would not know where to sign in, would ask their crew, and the crew could not tell them either. The owner agreed that the error must say where to sign in.
Not a goal
SignInRequiredErroranswer (A signed-out prompt on Kiro Crew's own engine is not shown as a sign-in error #36443, fix: show a signed-out prompt on crew's own engine as a sign-in error #36464).What changed (motivation → approach → change)
Failed turn. Symptom: the raw access-denied sentence with no sign-in action. Cause: the sentence has no 401/403 and no expiry wording, so
_RE_SESSION_EXPIREDinacp/transport_errors.pydid not match and the turn took the unknown-error fallback. Change: one alternation for that exact sentence. The turn now takes the existing session-expiry arm, with itssign_in_needed/auth_requiredtags, and the request id is kept once, behind a copy control.One look for every signed-out spot (Layout 1). Each spot shows one line and a Sign in button. The button opens one shared dialog,
components/KiroSignInDialog.tsx, which holds the four sign-in choices, the browser wait or the device code, and cancel. It closes itself when the sign-in lands. The dialog is used by:KiroSignInPrompt, "Sign in to Kiro to start chatting");ErrorCard, "Sign in to Kiro to keep chatting");The row follows where the turn ran. The decision is made from the route the last KAS spawn recorded (
chat_turn/recovery._terminal_error_meta). That route is the process's last KAS spawn, not the failing runtime's own, so another chat's later spawn can pick the row kind;host_authon main reads it the same way, and the per-runtime fix is tracked in #39077.On kiro-cli 3.x the relay runs on Kiro Crew's sign-in when the vault holds one, and on kiro-cli's own otherwise. On older kiro-cli it uses kiro-cli's own sign-in only. So the relay row offers both ways in. A relay row is
kind: kiro_cli_sign_inwithcrew_sign_in: true. Which sign-in the relay draws is unchanged.The welcome screen's own pieces. The kiro-cli row reuses the welcome screen's status hook (
hooks/useKiroPrerequisite.ts) and its command list (components/KiroCliSignInCommands.tsx, shared withKiroPrerequisiteGate). The commands show only while that status says kiro-cli is installed and not signed in. When kiro-cli is already signed in, the relay row keeps only the Sign in button. The welcome screen is unchanged (#15-#18: no pixels differ in the setup card).Ask before a message fails (bundle route only). The gateway decides, so the dashboard never guesses the route.
GET /api/kas-bundleand the install reply gainchat_needs_sign_in. It is true only for the owner, with KAS asagent.acp_backend, whenkas_route.bundle_route_lacks_sign_in()finds the next spawn on the bundle route with no usable Kiro Crew sign-in. Whenever any of that cannot be worked out, it is false.One sign-in flow, logic in hooks. The flow's state machine moved from
KasLoginGate.tsxintohooks/useKasLogin.ts(useKasLoginFlow,useKasLoginStatus,KAS_LOGIN_STATUS_KEY).KasLoginGate.tsxonly renders it. Closing the dialog mid-sign-in cancels the pending login.The agent can answer "how do I sign in". The shipped
getting-started.mdnames the Settings path, the chat prompt andkirocrew kas login.Backwards compatibility
Compatible:
chat_needs_sign_inis a new optional field. An older gateway sends none, and the prompt stays hidden.kiro_cli_sign_inis a new row kind. An older dashboard renders it as a plain error row.KasLoginGate,KasLoginEmbedded,KasLoginFlowSlots).Reader: the chat error row and the Settings card no longer print the signed-out sentence and the Settings path inline. They show one line and the Sign in button that opens the same choices. The request id moved behind a copy control. The owner chose Layout 1 for every signed-out spot.
Tests
test/test_kas_access_denied_sign_in.pycovers these cases:sign_in_needed+auth_required, terminal, and keeps the request id once.kiro_cli_sign_in, neverauth_required.auth_required.test/test_transient_notice_parity.py: a relay row keeps itskas_signed_outnotice and gainscrew_sign_in.test/test_chat_runner_turn_error_arms.py: a Kiro CLI sign-in failure gets thekiro_cli_sign_inrow.test/test_kas_route.py::TestBundleRouteLacksSignInandtest/test_kas_bundle_api.py:chat_needs_sign_in.KiroSignInPrompt.test.tsxKiroCliSignInRow.test.tsx(commands, Check again, the relay's added Sign in, and the button kept once kiro-cli is signed in)ErrorCard.test.tsx(the request id copy kept under a translated notice)transcriptRenderers.test.tsx(the composer names the sign-in first under akiro_cli_sign_inrow; a pane with noonOpenSignInwithholds that row's Continue)KiroSignInCard*.test.tsxandKiroSignInNotice.test.tsx(the dialog)Proof: not provable -- other: this host forbids local test runs, so CI runs the suite
Manual verification
The three shots under This head in Screenshots come from head
75b3edc56af153fb7cc9433a3bbc14c4171e4793(the repo's capture harness, see there). Every other shot comes from real gateways on this branch at1f867d73d6. Head73cc5c2167carries the owner-picked redesign above, and the decision entrydocs/decisions/2026-11-18-signed-out-sign-in-prompts-do-not-name-the-engine-route.md(owner decision: #36888 (comment)), which replaces the 2026-10-30 prompt clause. Earlier, on top of main's changes: on the relay row, Check sign-in again is the one filled button and Sign in is an outlined button of the same size (#19-#26 retaken for this); the signed-out kiro-cli row keeps its own text when the status cannot name the commands (a viewer's redacted status); a sign-in dialog closed while its begin request is in flight cancels the login that request returns and opens no tab; and the unusedintroslot is removed. None of these changes a shot. Screens are the built SPA driven by Playwright. kiro-cli 3.4.0 was really signed out on every gateway (kiro-cli whoamiprinted "Not logged in").agent.acp_backend: kiro). It runs on the relay because kiro-cli has v3, and the vault is empty. Row: one line, both kiro-cli commands, Check sign-in again, and Sign in. Meta:kind: kiro_cli_sign_in, crew_sign_in: true(docs(skill): add pod CLI reference to kirocrew-commands #19-ci: harmonize and strengthen the AI code-review prompts and gates #22).kas_bundle: false) with a refused sign-in in the vault, also on the relay. The row and meta match item 4 (ci(publish-cli): serve CLI via CloudFront over dedicated dist bucket #23-feat: colorful app icons + hero banners for App Store #26).Static gates on this host: black, isort, flake8, mypy --platform linux, comment-history, brand, line cap, harness parity, docs-lint, tsc, eslint,
i18n:check, SPA build.Screenshots / video
This head (
75b3edc56af153fb7cc9433a3bbc14c4171e4793). Taken with the repo's harness,node website/scripts/capture-kiro-sign-in-notice.mjs(updated in this PR for the new copy, the in-place dialog and the signed-out Settings frame): the built SPA in headless Chromium, every/api/**call answered bywebsite/scripts/lib/stub-dashboard-api.mjs, KAS as the agent harness. All 15 frames asserted their state before writing the PNG; (a), (b) and (c) are its frames 15, 01 and 07.(a) Settings → Kiro account → Kiro sign-in, signed out, before the dialog opens: one Sign in button, no dialog.
(b) The "Kiro sign-in expired" notice: its Sign in button opens the shared dialog in place.
(c) The status-unavailable notice, with the new line "Sign in again if your Kiro sign-in stopped working, or ask the agent to look into it.", Sign in and Ask the agent.
Older heads, not this head. Owner-picked redesign (shots below from
069af06a6e; a fresh set #1–#12 at060c52c852, the same tree as head73cc5c2167for this PR's UI files, is in the worker's shot folder). Real gateways, kiro-cli 3.4.0 signed out. Before is heade152b0bbc1.A. Signed-out relay row: Check sign-in again stays the one primary, then "or", then the outlined "Use the Kiro Crew sign-in". On a phone the row stacks.
B. Sign-in dialog: Google, GitHub and AWS marks, centred, "or", company SSO last. The hint lines are main's (#34845).
C. Device code: one heading, Open sign-in page with a copy control, the code with its own copy control, one waiting line, and a back arrow in the dialog header.
Failed turn with a refused sign-in. Before (
main):After, Kiro Crew's own engine (#11):
Fresh chat while signed out on Kiro Crew's own engine. Before (
main):After (#1), the shared dialog (#2), and a device code in it (#3):
Signed-out chat on kiro-cli's relay. A saved Kiro CLI pick (#19, phone #21) and a KAS pick (#23). Sign in opens the same dialog (#24):
Settings and phone dialog, welcome screen unchanged
Related Issues
Fixes #36870. Related: #32058, #36381, #36443.
Sibling sweep
Swept: git grep -n "_RE_SESSION_EXPIRED|_is_session_expired|is_auth_failure_output" -- src/
Sibling: src/kiro_crew/acp/transport_errors.py -- changed here -- the one vocabulary every reader (formatter, transient classifier, sign-in tags, stderr latch) shares
Sibling: src/kiro_crew/agent_sdk/host_auth.py -- not affected -- its signed-out messages are reused unchanged; the engine's SignInRequiredError wording is tracked in #36464
Pattern harvest
Not generalizable: each engine error wording is a fixed sentence the vocabulary has to list once; the vocabulary is already the single shared place.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.