Repository navigation
fix(mcp-gateway): render a refused share through ErrorNotice - #25660
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The documented What this change shipsInventory (4 items) — 3 justifiedIntent: when the gateway refuses an MCP server share, the user sees it as an error and can hand it to the agent. FIX.
[FIRST-PRINCIPLES-REVIEWED] d895a90 Description read[DESCRIPTION-READ] b71f4d4be9c49b6913f39d784e45c2e885bed66ff8963952cd086a097bd6d65c That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The change reuses the existing [DESIGN-REVIEWED] d895a90 Description read[DESCRIPTION-READ] 3be21433fece25c07a95e4a169721daef0ee306495e2215beefdd9eb453f16c6 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the copy and link are unchanged, and the restyle and "Ask the agent" hand-off are visible in shots 01–03. The blind reader read the hand-off correctly. Notes
[UX-REVIEWED] d895a90 Description read[DESCRIPTION-READ] fe1d08df773ca77a65e64bd3112d551eca5470038b3d7da8ed5975186097e209 That sha256 names everything this verdict read: the PR description, plus the 6 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: |
A share the gateway refused is a launch LaunchApprovals.admit() rejected, so it is an error surface, but the MCP Servers list drew it in a hand-written warn box with no agent hand-off. Render it through ErrorNotice: the restart hint and the MCP Management link ride in the footer, the hand-off is on, and it stays off while the page holds staged edits (the link still opens a new tab then). The capture harness follows the link to its current Settings > Developer path.
20110dc to
d895a90
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved on behalf of the watch holder (bolichen). Design and First Principles pass on this head, UX skipped or pass, no conflict, no open change request.
Backports parts 2-4 of the 0.11.0 insider list (#25665, #25666, #25667) onto release/0.11.0. Parts 0-1 landed in e379f74 (#25663, #25664). - fix(desktop): say why a pop-out cannot open instead of blaming the browser (#23922) (cherry picked from commit 99c2474) - fix(crew): list a crewmate's own script and command schedules (#24023) (cherry picked from commit d2d8d14) - fix(mcp-gateway): show a refused share outside Developer Mode (#23917) (cherry picked from commit c612613) - fix(apps): negative-cache failed app.json fetches in the store listing (#23925) (cherry picked from commit 455e8ec) - fix(power): say that Windows Modern Standby can still sleep on lock (#18259) (cherry picked from commit 0480058) - fix(chat): show nothing in the transcript when the context cap trims (#24492) (cherry picked from commit 1411fcc) - fix(frontend): seed settings rows from the served config during render (#24625) (cherry picked from commit e198b63) - fix(schedule): keep the empty-folder chip rename open and return focus after it (#23904) (#24632) (cherry picked from commit 9f51b91) - feat(website): swipe to dismiss the notification banner on mobile (#24674) (cherry picked from commit e4fad39) - fix(agent): drop a gateway-inherited scratch temp before an agent spawn (#24645) (cherry picked from commit 1f28708) - fix(dashboard): tell the crewmate about unresolved fields, draw no stale band (#24069) (cherry picked from commit f9d8e19) - fix(mcp-gateway): never pool a credential vendor (#24672) (cherry picked from commit 2464225) - fix(acp): keep MCP tools direct on KAS when the spec grants no tool_search (#24297) (cherry picked from commit ddc1fea) - fix(crew): move a working icon avatar as one still image so it cannot tear (#24678) (cherry picked from commit e062153) - fix(crew-mode): keep a crewmate's own chat on the conductor (#24894) (cherry picked from commit 7582829) - fix(memory): name a damaged memory.db instead of restore advice (#24567) (cherry picked from commit efe7624) - fix(env): search Builder Toolbox's Windows bin dir for agent binaries (#24563) (cherry picked from commit 686d39a) - fix(discord): re-admit bot-opened threads after a gateway restart (#21776) (cherry picked from commit 072a37b) - fix(web): keep a hidden model hidden after a harness switch respells its id (#24564) (cherry picked from commit 501f455) - fix(gateway): say the gateway is running once boot finishes (#25029) (cherry picked from commit 02627ec) - fix(mcp): say why an mcp.json settings file could not be read (#22169) (#24572) (cherry picked from commit ed75593) - fix(mcp-gateway): render a refused share through ErrorNotice (#25660) (cherry picked from commit d895a90) - fix(crew): write a crewmate's hidden welcome and check-ins in the user's language (#24966) (cherry picked from commit d5a76e6) - feat(crew-mode): move every used crewmate to its conductor on upgrade (#24954) (cherry picked from commit 76e89ae) - fix(hooks): Reads mode auto-approves Kiro Crew's own read-only MCP tools (#24910) (cherry picked from commit d8f2038) - fix(members): list crewmates the person created, even with an empty chat (#24987) (cherry picked from commit 163652b) - feat(cron): let a script cron feed its crewmate's Dashboard page (#24692) (cherry picked from commit 959b35a) - fix(kas): honour a server's autoApprove through the derived permissions (#25106) (cherry picked from commit 073c83a) - fix(chat): keep a scrolled-up reader still when a reprice clamps them (#24591) (cherry picked from commit 9a73292) - fix(security): restore every allowed link on a host, not only identical ones (#20487) (cherry picked from commit b161144) - fix(website): swipe the mobile notification banner up to dismiss it (#25151) (cherry picked from commit e68a716) - test: carry the _card_outcomes helper #24910's tests read (cherry picked from commit 9df4d01) The #24987 decision entry is new on this branch, so its Evidence lines now link the owner restatement and the maintainer approval on #24987 instead of describing them. Main keeps its shipped (immutable) copy.
Problem / Motivation
Goal: A refused MCP share shows as a real error, with the "Ask the agent" hand-off.
On Customize > Connections > MCP Servers, a server set to share whose launch the gateway refused was shown in a hand-written warn box (
role="status") with no agent hand-off. GPT 6.1 flagged it on the 0.11.0 backport #25643 under the blockingerrors-use-error-noticerule.Why it matters
The refusal comes from
LaunchApprovals.admit()rejecting the launch, reported asshare_refusedby/api/mcp-gateway/status. That is a failure. WithoutErrorNoticethe user gets no hand-off and no structured error context, so it is a dead end.Not a goal
ErrorNotice.What changed (motivation → approach → change)
Symptom: a hand-written box, no hand-off → cause: #23917 drew the refusal by hand → change:
McpShareRefusedNoticerenders it throughErrorNotice. The "N servers set to share are not shared" sentence is the message. The restart hint and the Review in MCP Management link go in the footer, unchanged.askAgentis on, and it stays off while the page holds staged edits (stagedChanges), where the link also keeps opening a new tab, so the hand-off cannot drop them. The capture harnessscripts/capture-21058-mcp-share-refused.mjswaits for the link's current path,/settings/developer/mcp-pool(moved in #24810).Backwards compatibility
Compatible: same props, same test id (
mcp-share-refused), same text and link.Removes nothing: the box is restyled and gains a hand-off; nothing it showed is dropped.
Tests
src/test/McpShareRefusedNotice.test.tsx: two new tests. The refusal hasrole="alert"and the hand-off; withstagedChangesthere is no hand-off.vitest runover it and the McpTab suites: 6 files, 100 passed.tsc --noEmitand eslint are clean.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Shot from the real built SPA with
/api/**stubbed (node scripts/capture-21058-mcp-share-refused.mjs).Screenshots / video
Refused share, now an error notice with the hand-off (dark, then light):
The status-read failure notice, unchanged:
Related Issues
Follow-up to #23917. Found on #25643.
Sibling sweep
Swept: git grep -n 'role="status"' -- website/src/pages/overview/
Siblings: none -- the other overview role="status" boxes show progress, success or warnings, not a failed request
Pattern harvest
Not generalizable:
errors-use-error-noticealready covers this class; the miss was one call site in review.Checklist
Contribution License Agreement
Contributed under the project's Apache-2.0 license.