Skip to content

fix(chat): show a power's name, not its doubled id, on the sign-in card - #28532

Closed
munahad wants to merge 1 commit into
kirodotdev:mainfrom
munahad:fix/mcp-oauth-power-label
Closed

munahad wants to merge 1 commit into
kirodotdev:mainfrom
munahad:fix/mcp-oauth-power-label

Conversation

@munahad

@munahad munahad commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The MCP sign-in card names a Power's server the way a person would ("Figma"), not by its internal ID ("power-figma-figma").

When an MCP server comes from an installed Kiro Power whose one server shares the Power's name, the sign-in card shows the namespaced ID power-figma-figma, in code font, twice: in the sentence ("power-figma-figma requires authentication") and on the button ("Authorize power-figma-figma"). It reads like a typo or a doubled word.

Why it matters

Anyone with a Power installed sees this ID on the card, and the card is the one place they are asked to act on it. People who don't know how Powers namespace their servers can't tell what they are being asked to sign in to, or whether something is broken.

Not a goal

What changed (motivation → approach → change)

  • Symptom: the card shows power-figma-figma.
  • Cause: kiro-cli namespaces a Power's servers as power-<power>-<server> (https://kiro.dev/docs/powers/installation/), and McpOAuthBanner uses meta.server_name as the visible label in every state.
  • Change: a new mcpServerLabel() in McpOAuthBanner.tsx turns an ID of the form power-<name>-<name> into <Name> and marks it as a readable name, so the card shows it in normal semibold text instead of code font. Any other ID is returned unchanged and keeps the code font. The raw serverName still goes to OAuthRelayAffordance, so the sign-in targets the real server.

Backwards compatibility

Compatible: display-only change to the card's label; the server ID sent to the relay is unchanged.

Removes nothing: no field, key, path or function is removed; only the text shown for doubled Power IDs changes.

Tests

  • mcpServerLabel: collapses power-figma-figma to Figma, handles a hyphenated name (power-aws-docs-aws-docs), keeps non-doubled Power IDs and non-Power IDs whole.
  • McpOAuthBanner Power label: the sentence and the button say "Figma", the raw ID isn't shown, and the readable name isn't in code font; a normal ID (linear) keeps the code font.
  • Existing banner, relay, chat page, embed and app SDK renderer tests pass (127 tests across 5 files). tsc --noEmit and eslint are clean.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Rendered the card in Storybook (dark theme) with power-figma-figma, old and new versions side by side, in the needs-sign-in and signed-in states; see the screenshot below. Not yet checked in a live chat with an unsigned Figma Power.

Screenshots / video

Before (left) and after (right), needs-sign-in and signed-in states:

DROP IMAGE HERE
Screenshot 2026-11-02 at 12 46 32 PM

Related Issues

Closes #28524

Sibling sweep

Swept: grep -rlE "requires_authentication|server_name|serverName" website/src --include='*.tsx'
Sibling: website/src/pages/settings/McpManagement.tsx -- not affected -- a management list where the server ID is the identifier the user configures
Sibling: website/src/pages/overview/McpTab.tsx -- not affected -- same management-list context, the ID is the expected label

Pattern harvest

Not generalizable: a one-off display label for one namespacing scheme on one card.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
Screenshot 2026-11-02 at 12 46 32 PM
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@munahad
munahad requested review from a team and KiroCrewCaptain as code owners November 2, 2026 20:54
@munahad
munahad requested a review from dodgeblaster November 2, 2026 20:54
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of b0aee9869701ce4f990594aae148585d1769883c via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: a small, display-only change. The relay still gets the raw server id, and before/after images are attached.

Notes

  • Capitalizing only the first letter gives labels like Aws-docs, which is no more readable than the id. If kiro-cli exposes a Power's own display name, use that; otherwise keep the name in lowercase.

[DESIGN-REVIEWED] b0aee98

Description read

[DESCRIPTION-READ] 05955962e36ed586c57a2294f4b2839423b1ea28deb5860e74c5df4384e1745c

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 2, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 8b141183923e115153922f1a9d72f67cfd9f3c42 via the fork AI-review pipeline — 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

Nothing blocks: this is a display-only fix for a reported issue (#28524), and nothing else already does the job. A grep of website/src and src/kiro_crew for power- finds no existing helper that names a Power.

What this change ships

Inventory (3 items) — 3 justified

Intent: let a person see which Power's server they are signing in to, shown by its name rather than a doubled internal ID. This is a FIX.

  1. The sign-in card's sentence and button show "Figma" instead of power-figma-figma, for an ID whose name repeats after power- — justified
  2. That readable name is in normal semibold text instead of code font, in all four card states — justified
  3. A new exported helper, mcpServerLabel, is used by the card and by the tests — justified

[FIRST-PRINCIPLES-REVIEWED] 8b14118

Description read

[DESCRIPTION-READ] 2beb7dec8eae35ee1e669988d3a89d8693deabff6a04dd987ac45c6459a940ee

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 2, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of 8b141183923e115153922f1a9d72f67cfd9f3c42 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

No blocker found. The screenshots show the new label in both the sign-in and signed-in states. Because this is a fork, no first-time reader has seen it. Pushing the branch to this repository would run that check.

Notes

  • mcpServerLabel turns a hyphenated Power name into text like "Aws-docs requires authentication" and "Authorize Aws-docs". That reads like a different kind of typo. Replacing hyphens with spaces and capitalizing each word would give "Aws Docs".
  • No screenshot shows the label in the expired or replaced states. They use the same labelClass span, so I don't treat this as a gap. A single still of one of them would confirm it.

[UX-REVIEWED] 8b14118

Description read

[DESCRIPTION-READ] f5dd306d7d162f85f758f97941366d53bffdd17548102153003fd9c33b40be21

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 8b141183923e115153922f1a9d72f67cfd9f3c42 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 8b14118

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 8b141183923e115153922f1a9d72f67cfd9f3c42 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8b14118

@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 3, 2026
A Power whose one server shares its name gets the namespaced id power-<name>-<name> (e.g. power-figma-figma), which the card printed as-is in code font. Show the name once, capitalized, in normal text. Other ids keep their full id and the code font; the relay still gets the raw id.

Closes kirodotdev#28524
@munahad
munahad force-pushed the fix/mcp-oauth-power-label branch from b0aee98 to 8b14118 Compare November 3, 2026 17:45
@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: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 3, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

[operator: bolichen97] Continuing this in #32821; thanks for the start.

bolichen97 added a commit that referenced this pull request Nov 8, 2026
…rd (#32821)

A Power whose one server shares its name gets the namespaced id
power-<name>-<name> (power-figma-figma), which the MCP sign-in card
printed as-is, in code font, in the sentence and on the button. Show
that name once, capitalized, in normal text. Every other id keeps its
full id and the code font, and the relay still gets the raw id.

Builds on #28532 by munahad.

Closes #28524

Co-authored-by: munahad <344993864+munahad@users.noreply.github.com>
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
…rd (#32821)

A Power whose one server shares its name gets the namespaced id
power-<name>-<name> (power-figma-figma), which the MCP sign-in card
printed as-is, in code font, in the sentence and on the button. Show
that name once, capitalized, in normal text. Every other id keeps its
full id and the code font, and the relay still gets the raw id.

Builds on #28532 by munahad.

Closes #28524

Co-authored-by: munahad <344993864+munahad@users.noreply.github.com>
(cherry picked from commit 7951d1f)

Original author: @bolichen97
buluoray added a commit that referenced this pull request Nov 8, 2026
…rd (#32821)

A Power whose one server shares its name gets the namespaced id
power-<name>-<name> (power-figma-figma), which the MCP sign-in card
printed as-is, in code font, in the sentence and on the button. Show
that name once, capitalized, in normal text. Every other id keeps its
full id and the code font, and the relay still gets the raw id.

Builds on #28532 by munahad.

Closes #28524

Co-authored-by: munahad <344993864+munahad@users.noreply.github.com>
(cherry picked from commit 7951d1f)

Original author: @bolichen97
buluoray added a commit that referenced this pull request Nov 8, 2026
…rd (#32821)

A Power whose one server shares its name gets the namespaced id
power-<name>-<name> (power-figma-figma), which the MCP sign-in card
printed as-is, in code font, in the sentence and on the button. Show
that name once, capitalized, in normal text. Every other id keeps its
full id and the code font, and the relay still gets the raw id.

Builds on #28532 by munahad.

Closes #28524

Co-authored-by: munahad <344993864+munahad@users.noreply.github.com>
(cherry picked from commit 7951d1f)

Original author: @bolichen97
@iamwhatever

Copy link
Copy Markdown
Contributor

Thank you for this fix. The same change has since landed on main in #32821 (merge commit 7951d1f), which also closed issue #28524. The MCP sign-in card now shows the Power's readable name, so I'm closing this PR as superseded. If you see a case #32821 misses, please open a new issue or PR.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP sign-in card shows the internal Power ID ("power-figma-figma") instead of a readable name

4 participants