Skip to content

fix(dashboard): name the signed-in account on the Kiro sign-in card - #36595

Merged
bolichen97 merged 1 commit into
mainfrom
fix/36156-signin-account-name
Nov 14, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/36156-signin-account-name

Conversation

@JLargent42

@JLargent42 JLargent42 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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.

Part Change
website/src/pages/developer/KiroSignInCard.tsx useSignedInAccount observes the top bar's usage reading and saved config (no fetch of its own) and the hide toggle; AccountName renders · <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.tsx The hide toggle moves from a one-off useState read to usePersistedBool(KIRO_ACCOUNT_EMAIL_HIDDEN_KEY, true), and the key is exported; same key, values and default.
website/src/components/KasLoginGate.tsx A confirmed sign-in (forgetModelList) also resets ['kiro-usage']; the card's Sign out does the same.
website/src/pages/developer/AgentBackendTab.tsx, website/src/components/KiroPrerequisiteGate.tsx A saved main-harness switch (Settings and setup, the two writers of agent.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: usePersistedBool writes 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:
    • on KAS, the open summary shows the e-mail blurred by default, its Show email button reveals it, and the folded heading then names it (fails against main's card);
    • an account name with no e-mail shows in the folded heading, unblurred;
    • a mounted card follows the popup toggle both ways, show then hide (fails against the first revision, which read the toggle once);
    • on the kiro-cli harness, names no account (fails against the first revision);
    • the existing sign-out and authorized-sign-in tests now also check that ['kiro-usage'] is dropped (both fail without the resets).
  • website/src/test/AgentBackendTab.test.tsx and website/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", since usePersistedBool writes the default on mount.
  • Local gates: 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 references KiroSignInCard, KiroAccountModal, KasLoginGate, KasLoginEmbedded, AgentBackendTab or KiroPrerequisiteGate (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 names ada@example.com. Rendered from a local capture page with every /api call 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.

before, open

after, open

Open, after, once Show email was pressed (here or in the account popup):

after, open, e-mail shown

Folded, before, and after with the e-mail shown (hidden, the folded line reads as before):

before, folded

after, folded, e-mail shown

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

  • 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

@JLargent42
JLargent42 requested review from a team and KiroCrewCaptain as code owners November 13, 2026 11:59
@JLargent42 JLargent42 self-assigned this Nov 13, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4b9e0ab

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: 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 ['kiro-usage']. The gateway also refuses to serve another sign-in's reading, so the refetch right after a reset can't show the old account. Moving the hide/show e-mail setting to usePersistedBool keeps the same key, values and default. Its new first-render write of the default is safe with the settings backup, because the restore runs before render. Each new behaviour and each reset has a test that would fail without it. The CI failures came from API rate limits, not from the code.

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

@JLargent42
JLargent42 force-pushed the fix/36156-signin-account-name branch from 4a40549 to d3183ab Compare November 13, 2026 13:59
@JLargent42

Copy link
Copy Markdown
Contributor Author

Dispositions for GPT 6.1 Review on 4a40549 (fixed in d3183ab):

  • fixed: the card can name a different account from the one its controls manage (KiroSignInCard.tsx:40)

The card now names an account only when the saved main harness (['kirocrewConfig'], the top bar's read) is KAS, the case where _vault_owns_usage_sync makes the usage reading the vault account. On kiro-cli or with no config loaded it names none.
Test: "names no account when the main harness is kiro-cli" fails on 4a40549, passes on d3183ab.

  • fixed: Hide email does not hide it on an already-mounted card (KiroSignInCard.tsx:38)

The popup toggle is now one store (useAccountEmailHidden, useSyncExternalStore over the same key, plus the storage event); the popup and both card spots subscribe, so a press reaches a mounted card.
Test: "follows the account popup hide toggle on a card that is already showing" fails on 4a40549, passes on d3183ab.

@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 Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The card's KAS check (configuredAcpBackend(cfg) === 'kas') is looser than the gateway's _vault_owns_usage_sync. On the relay route, when the vault holds no usable identity, the gateway names kiro-cli's login. The card only shows its signed-in state when the vault has a sign-in, and it hides the name once the sign-in lapses, so this is unlikely to show the wrong account. Keep the two checks in step if either one changes.

[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 .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 Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 — 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: 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

  • Item 4 — oversized: the card adds its own Show/Hide e-mail <button>, which repeats AccountIdentity's toggle in website/src/components/KiroAccountModal.tsx. Both write the same key. The Goal is "says which account is signed in", and a revealed name already does that wherever the popup's toggle is pressed. The folded heading already handles a hidden e-mail without a button, by not naming it.
    Subtraction: delete the withToggle branch, the Eye/EyeOff imports and the setEmailHidden call in AccountName. The open summary then follows the folded rule and shows the e-mail only when it is visible. Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (7 items) — 6 justified

Intent: a person with several accounts at one provider can see which Kiro account the dashboard is signed in with. FIX (#36156).

  1. Open sign-in summary shows "· " after the provider on KAS — justified
  2. Folded card heading shows the account when it is not hidden — justified
  3. Card e-mail is blurred by default and follows the account popup's hide toggle — justified
  4. New Show/Hide e-mail button on the card's open summary — oversized: second control for the popup's existing toggle
  5. Popup toggle now live-syncs and writes the hidden default on first mount — justified
  6. The credit reading in the top bar resets on sign-in, sign-out and harness switch — justified
  7. KIRO_ACCOUNT_EMAIL_HIDDEN_KEY exported (one consumer: the card) — justified

[FIRST-PRINCIPLES-REVIEWED] 4b9e0ab

Description read

[DESCRIPTION-READ] 9455575422a175e5fd43e380a35b23f21afbe34e02fbe94e3fa5dba3bcd238af

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 Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The blind reader did not know the folded line is tied to the hide toggle. They wrote: "I can't tell if that's because I clicked 'show' earlier, or if the folded line always shows it." This is fine for now because the folded line stays silent while the e-mail is hidden. If it confuses users, put the same blur and toggle on the folded line.

[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 .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 added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@JLargent42
JLargent42 force-pushed the fix/36156-signin-account-name branch from d3183ab to 1ffce53 Compare November 13, 2026 17:59
@JLargent42

Copy link
Copy Markdown
Contributor Author
  • fixed span=3d29d222a2f6

fixed in d3183ab: the card names an account only when the saved main harness is KAS (where the usage reading is the vault account), and the e-mail hide toggle is one shared store (useAccountEmailHidden) the popup and card both subscribe to.
Tests "names no account when the main harness is kiro-cli" and "follows the account popup hide toggle on a card that is already showing" fail on 4a40549 and pass after.

@JLargent42

Copy link
Copy Markdown
Contributor Author
  • fixed span=dcdfb2f32082

fixed in 1ffce53: the open card now puts the popup's own Show/Hide e-mail button (same labels, same shared store) beside the blurred e-mail, so the card itself reveals it; the folded line names the account only when it is visible, so it never shows a blur with nothing to press.
New screenshots in the description show open (blurred + Show), open after Show, and folded with the e-mail shown.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4b9e0ab

Verdict parsed from the review's SHA-scoped output markers for commit 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 4b9e0ab99648d679ae57efb4e5fdfe573a7f7749 false-positive: <reason, 20 to 500 characters>

@JLargent42
JLargent42 force-pushed the fix/36156-signin-account-name branch from 1ffce53 to ea5a446 Compare November 13, 2026 18:59
@JLargent42

Copy link
Copy Markdown
Contributor Author
  • fixed span=6f5aa65c0d6e

fixed in ea5a446: a confirmed sign-in (forgetModelList in KasLoginGate.tsx, both the authorized poll and the landed-on-cancel path) and the card's Sign out now reset ['kiro-usage'] beside ['available-models'], so the card never names the previous account while the top bar waits for its next poll.
The existing sign-out and authorized-sign-in tests now assert ['kiro-usage'] is dropped; both fail with the resets removed.

@JLargent42

Copy link
Copy Markdown
Contributor Author
  • fixed span=a43594b9c8cf

fixed in ea5a446: the hand-rolled store and useAccountEmailHidden are deleted; the popup (AccountIdentity), useSignedInAccount and AccountName all call usePersistedBool(KIRO_ACCOUNT_EMAIL_HIDDEN_KEY, true), with the key exported from KiroAccountModal.tsx.
No other store for kirocrew:account-email-hidden is left; stored '1'/'0' read the same as before.

…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
@JLargent42
JLargent42 force-pushed the fix/36156-signin-account-name branch from ea5a446 to 4b9e0ab Compare November 13, 2026 19:59
@JLargent42

Copy link
Copy Markdown
Contributor Author
  • fixed span=6f5aa65c0d6e

fixed in 4b9e0ab: a saved main-harness switch now resets ['kiro-usage'] in both writers of agent.acp_backend (applyBackendSwitchSideEffects in AgentBackendTab.tsx and the setup switch in KiroPrerequisiteGate.tsx), beside the model-list reset each already does.
Class swept: every transition that changes whose login the usage reading names (sign-in, sign-out, harness switch) now drops it; the two harness-switch tests assert it and fail without the resets.

@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 Nov 13, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 13, 2026

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

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 with enabled: 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.

@bolichen97
bolichen97 merged commit c114ed9 into main Nov 14, 2026
133 of 139 checks passed
@bolichen97
bolichen97 deleted the fix/36156-signin-account-name branch November 14, 2026 01:06
buluoray pushed a commit that referenced this pull request Nov 15, 2026
…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)
buluoray pushed a commit that referenced this pull request Nov 15, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After sign-in the dashboard names only the provider, not which account is signed in

3 participants