Repository navigation
fix(dashboard): name the signed-in account on the Kiro sign-in card - #36595
Conversation
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: 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. Approved. The card gets the account name from the top bar's cached usage and config readings and never fetches on its own. It names an account only when the saved harness is KAS and the sign-in is current. The stale-account problem the earlier AI review lanes flagged is fixed: both places that save the harness, both ways a sign-in gets confirmed, and Sign out now also drop 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 |
4a40549 to
d3183ab
Compare
|
Dispositions for GPT 6.1 Review on 4a40549 (fixed in d3183ab):
|
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the card reads the top bar's existing usage reading, uses the same KAS ownership check the gateway uses, and clears that reading at every writer that changes the account. Notes
[DESIGN-REVIEWED] 4b9e0ab Description read[DESCRIPTION-READ] dbf821d5a965018ae5c5d5a202b3c281f1c210dfd7b0751cd0ad24d4090e467e 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 The fix stays inside the frozen Goal. The one extra is a second Show/Hide e-mail button on the card, which only repeats the popup's toggle. Notes
What this change shipsInventory (7 items) — 6 justifiedIntent: a person with several accounts at one provider can see which Kiro account the dashboard is signed in with. FIX (#36156).
[FIRST-PRINCIPLES-REVIEWED] 4b9e0ab Description read[DESCRIPTION-READ] 9455575422a175e5fd43e380a35b23f21afbe34e02fbe94e3fa5dba3bcd238af 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 correctly read every new element: the blurred e-mail, the eye toggle, the shown e-mail, and the folded line that names the account. Notes
[UX-REVIEWED] 4b9e0ab Description read[DESCRIPTION-READ] fd671d96b13962da7ba87605b2275a75454bee4c85344dd5a0093f86b7c6e891 That sha256 names everything this verdict read: the PR description, plus the 8 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 |
d3183ab to
1ffce53
Compare
|
|
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: |
1ffce53 to
ea5a446
Compare
|
|
…e Kiro sign-in card The card said only "Signed in with Google". It now names the account (email, else account name) read from the top bar usage reading, but only while the saved main harness is KAS: on any other harness that reading names kiro-cli's login, not the sign-in this card manages. A sign-in, a sign-out or a main-harness switch now drops that reading with the model list, so the card never names the previous login until the next poll. An e-mail follows the account popup's hide toggle (hidden by default), read through usePersistedBool in both places so they live-sync. Open, the card shows it blurred beside the same Show/Hide e-mail toggle the popup has; folded, it names the account only when it is visible. Fixes #36156
ea5a446 to
4b9e0ab
Compare
|
bolichen97
left a comment
There was a problem hiding this comment.
I read the whole diff on this head, and all checks are green.
- The Kiro sign-in card now names the signed-in account after the provider. The name comes from the top bar's existing
['kiro-usage']reading, observed withenabled: false, so no new request is made and nothing new leaves the host. - It is shown only while the saved main harness is KAS, which is when that reading names the vault account. On any other harness the reading names kiro-cli's login, which this card's Sign out does not touch, so nothing is shown. A test covers that case.
- An e-mail follows the account popup's hide toggle and is hidden by default. Both sides now read the same key through
usePersistedBool(key, true), so they stay in sync live. The folded heading leaves a hidden e-mail out instead of showing a blur with nothing to press. An account name (not an e-mail) is never hidden. - Every place that switches account or harness (sign-out, a new sign-in, the harness switch in two places) now also resets
['kiro-usage'], so the previous account's name is not shown until the next poll. The tests check each one. - Frontend only. No new refusal, and no new regex:
formatResetDate's pattern is existing context.
Approving.
…e Kiro sign-in card (#36595) The card said only "Signed in with Google". It now names the account (email, else account name) read from the top bar usage reading, but only while the saved main harness is KAS: on any other harness that reading names kiro-cli's login, not the sign-in this card manages. A sign-in, a sign-out or a main-harness switch now drops that reading with the model list, so the card never names the previous login until the next poll. An e-mail follows the account popup's hide toggle (hidden by default), read through usePersistedBool in both places so they live-sync. Open, the card shows it blurred beside the same Show/Hide e-mail toggle the popup has; folded, it names the account only when it is visible. Fixes #36156 (cherry picked from commit c114ed9)
…e Kiro sign-in card (#36595) The card said only "Signed in with Google". It now names the account (email, else account name) read from the top bar usage reading, but only while the saved main harness is KAS: on any other harness that reading names kiro-cli's login, not the sign-in this card manages. A sign-in, a sign-out or a main-harness switch now drops that reading with the model list, so the card never names the previous login until the next poll. An e-mail follows the account popup's hide toggle (hidden by default), read through usePersistedBool in both places so they live-sync. Open, the card shows it blurred beside the same Show/Hide e-mail toggle the popup has; folded, it names the account only when it is visible. Fixes #36156 (cherry picked from commit c114ed9)
Problem / Motivation
Goal: After signing in to Kiro, the dashboard's Kiro sign-in card says which account is signed in, not only which provider.
The Kiro sign-in card read "Signed in with Google" (or Builder ID, or IAM Identity Center) and nothing else, both in its folded heading and in the open summary. A person with more than one account at the same provider could not tell which one Kiro Crew is using.
Why it matters
Each account has its own quota and its own models. Someone who signed in with the wrong one only finds out when the credits or the model list look wrong, and the card gives no hint why.
Not a goal
What changed (motivation → approach → change)
The card only had the stored sign-in's status, and that record holds no e-mail. The top bar's usage reading already carries the account's e-mail (or account name), so the card now reads that same cached reading and names it after the provider, as
· <account>, in the folded heading and in the open summary.That reading names the stored sign-in only while the saved main harness is KAS; on kiro-cli it names kiro-cli's own login, which this card's Sign out does not remove. So the card names an account only when the saved config says KAS, and names none while the sign-in has lapsed, before the config has loaded, or before a reading names one.
A sign-in, a sign-out and a main-harness switch already drop the previous model list. They now drop the usage reading the same way, so the card never names the old login while the top bar waits for its next poll.
The account popup hides the e-mail by default, so a shared screen does not show it. The card follows the same toggle. Open, it shows a hidden e-mail blurred beside the popup's own Show/Hide e-mail button, so the card itself can reveal it. Folded, it names the account only when it is visible, since a blur with nothing to press says nothing. An account name (no e-mail) is never hidden. Both places read the toggle through the existing
usePersistedBool, which live-syncs its instances, so a press in either reaches the other at once.website/src/pages/developer/KiroSignInCard.tsxuseSignedInAccountobserves the top bar's usage reading and saved config (no fetch of its own) and the hide toggle;AccountNamerenders· <account>, blurred when hidden, with the Show/Hide e-mail button in the open summary (existing popup labels, no new strings).website/src/components/KiroAccountModal.tsxuseStateread tousePersistedBool(KIRO_ACCOUNT_EMAIL_HIDDEN_KEY, true), and the key is exported; same key, values and default.website/src/components/KasLoginGate.tsxforgetModelList) also resets['kiro-usage']; the card's Sign out does the same.website/src/pages/developer/AgentBackendTab.tsx,website/src/components/KiroPrerequisiteGate.tsxagent.acp_backend) also resets['kiro-usage'], beside the model-list reset each already does.Backwards compatibility
Compatible: the card only adds text after the existing line; no prop, route, key or stored value changes.
Removes nothing: the diff adds a name after the provider, and the popup's toggle keeps its key, values and default. One difference:
usePersistedBoolwrites the default ('1', hidden) on first mount where the popup used to leave the key unset; both read it as hidden.Tests
website/src/test/KiroSignInCard.test.tsx:['kiro-usage']is dropped (both fail without the resets).website/src/test/AgentBackendTab.test.tsxandwebsite/src/test/KiroPrerequisiteGate.agentChoice.test.tsx: the existing harness-switch tests now also check that['kiro-usage']is dropped (both fail without the resets).website/src/test/KiroAccountModal.test.tsx: its hide/show and storage case keeps every check; the first read now expects "not shown" instead of "unset", sinceusePersistedBoolwrites the default on mount.npm run typecheck, eslint (and its i18n config) on the touched files,lint:i18n,i18n:check,lint:theme-colors,lint:phantom-classes,lint:restyle-ratchet, and vitest over every test file that referencesKiroSignInCard,KiroAccountModal,KasLoginGate,KasLoginEmbedded,AgentBackendTaborKiroPrerequisiteGate(20 files, 611 tests) all pass.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Rendered the real card in Chromium from a stubbed capture page (screenshots below), before and after. Not checked in a signed-in running dashboard: minting a dashboard token is blocked by this worker's policy.
Screenshots / video
The real compact
KiroSignInCard(as the Agent harness detail shows it), dark theme, KAS as the main harness, a Google sign-in whose usage reading namesada@example.com. Rendered from a local capture page with every/apicall stubbed, so no gateway was involved. Before is main's card, after is this branch.Open, before and after (e-mail hidden, the default): after shows it blurred beside the Show email button.
Open, after, once Show email was pressed (here or in the account popup):
Folded, before, and after with the e-mail shown (hidden, the folded line reads as before):
Related Issues
Fixes #36156
Sibling sweep
Swept: git grep -n "signed_in_with'" -- website/src
Sibling: website/src/components/KiroAccountModal.tsx -- not affected -- the popup already shows the account above the provider line
Pattern harvest
Not generalizable: one card that lacked a reading another surface already had.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)