Repository navigation
feat(dashboard): show a session's MCP servers still connecting - #35564
Conversation
Code change approver recommendation: A person should decideWhy: the decider raised 2 possible problems and estimates a 55% chance that this change introduces a defect; a person should check them. The pill is implemented and tested correctly, but it reads Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
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 |
d667f21 to
35a195d
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: two additive payload keys feed a self-hiding pill, and the report already republishes between turns, so the pill can clear without another message being sent. Notes
[DESIGN-REVIEWED] aeccf49 Description read[DESCRIPTION-READ] 69a8c79ecd6e70a4b1cdd14e5465e464434d8c5f9b2d3420dbc18c78baa31464 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. One part goes beyond the Goal: the open pill's "Not counted" group repeats states that the session-options MCP view already shows. Notes
What this change shipsInventory (9 items) — 8 justifiedIntent: let a person see that a new chat's MCP servers are still starting, so a missing tool doesn't read as broken. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] aeccf49 Description read[DESCRIPTION-READ] ca16443a6b5ae57e177729c6d0aa10c2120381a71a8786ffcee8353307a28df2 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the open pill once every server has connected (check mark instead of spinner) and the "Some servers are not tracked" line. Both are states the diff adds, and no screenshot shows either. Evidence gaps
Notes
[UX-REVIEWED] aeccf49 Description read[DESCRIPTION-READ] 3ebe2591128bfb391dee33bd1d3181d9af77e3f8ae09ae59f9aa405d79f2d675 That sha256 names everything this verdict read: the PR description, plus the 14 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: |
35a195d to
8d3ab4e
Compare
buluoray
left a comment
There was a problem hiding this comment.
Approve on 8d3ab4e. This adds a small "N of M MCP servers ready" pill above the composer while a session's MCP servers are still connecting, and a list of each server's state when it is opened. The two fixes from the last review are in. The types facade now exports McpSessionStates, and the two French strings use a narrow no-break space before the colon. Both guard tests now pass. Since that review, the open list also fades at its bottom edge while more rows sit below the fold, the same cue the model picker and the MCP browser use. The fade is visual only. It does not change what a screen reader hears, and it goes away once the list is scrolled to the end. A new test covers this, and it fails when the fade is removed. One small gap remains. No test checks that the fade updates when rows are added or removed without a scroll; the code handles that case by observing the rows' own box. The red backend and Windows checks on this head hold only the two tests that are already red on main. None of them comes from this change, which touches no backend file. Decisive lines: website/src/types/index.ts:71, website/src/i18n/locales/fr.json:13408-13409, website/src/pages/chat/McpLoadingBar.tsx:80, website/src/pages/chat/McpLoadingBar.tsx:132-139, website/src/test/McpLoadingBar.test.tsx ("fades its bottom edge only while rows sit below the fold")
8d3ab4e to
b4548c1
Compare
b4548c1 to
9c8412b
Compare
While any of a session's MCP servers is still connecting, the chat draws one small pill in the status stack above the composer: "N of M MCP servers ready". It follows the session's MCP report and is gone when nothing is connecting. Opened, it lists the servers it counts, then the ones it does not (failed, waiting for authorization, switched off, left out by policy), each as what it is. The report's payload carries what the pill reads, in the same change: `states` (the not-ready servers by state, `not_ready()` as lists) and `states_omitted` (`left_out`: not zero when the report is partial, which the pill says in words, without a number). A report without `states` draws nothing, and so does a Bot's chat.
9c8412b to
aeccf49
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved at the owner's request. The deep review of this head is still running, and anything it finds will be posted here as a follow-up.
Problem / Motivation
Goal: While a chat session's MCP servers are still connecting, the dashboard chat shows one small indicator that says how many are ready, and stops showing it by itself once none is connecting.
A chat's first message does not wait for every MCP server the agent declares (#35245), so for a while a new session has fewer tools than it will have. With many servers that is tens of seconds: 60 servers took about 35 s to connect in the measurements on #35245. Nothing in the chat says so. A person who asks for a tool in that window is told it is not available, and cannot tell "still starting" from "broken" or "not configured". The one place that lists a session's servers is the session-options menu's MCP view, which is closed by default and does not say that anything is on its way.
Why it matters
Whether a chat feels ready is what a person sees, not only how fast the servers connect. Kiro CLI's terminal shows one dim row with a spinner while setup is in flight and hides it when nothing is loading; the dashboard shows nothing, so the same wait reads as a missing tool. This affects every user with MCP servers of their own, on the first message of every new chat, and more the more servers they have.
Not a goal
docs/decisions/2026-10-09-crewmate-chat-draws-messages-only.md).ChatEmbed) and the crew chat window.What changed (motivation → approach → change)
While a session's MCP servers are still connecting, the chat shows a small pill above the composer, "N of M MCP servers ready", and hides it when none is connecting. A person can open it to see each server's state.
The pill and the data it reads ship together. The session's MCP report already knows what is true of each server and stays current after the session starts (#35722, on main). This PR hands that reading to the dashboard in two payload keys and draws it. The chat receives the report over the slot-scoped
mcp_report_updateevent and keeps it on the slot; the pill reads it there, with no request and no new event.Scope: the "Not a goal" line about the report stands for the report's own work, which is #35722. The backend change here is two lines in
payload().src/kiro_crew/acp/mcp_session_report.py(payload())states, the not-ready servers by state (not_ready()as lists), andstates_omitted(left_out), which is not zero when the report is partial.website/src/pages/chat/McpLoadingBar.tsxmcp_report.states.connectingnames a server. Click or Enter opens the list.website/src/lib/mcpSessionReport.ts(mcpSessionLoading)website/src/types/index.chat.ts,types/index.tsstatesandstates_omittedon the report type, both optional; the types facade re-exports the new type.ComposerDockView.tsx,ChatPane.tsxwebsite/src/i18n/locales/(12 catalogs +en-XA)pages.chat.mcpLoadingBar.docs/feature-map/README.md,docs/system-specs/modules/acp-client.md,src/kiro_crew/docs/dashboard.mdEvery name the diff adds has a writer and a reader:
statesandstates_omitted: written byMcpSessionReport.payload(), read bymcpSessionLoading, which reads the second only as "the report is partial".connecting,needs_sign_in,failed,disabled,registry_dropped): written bynot_ready()on main, read bymcpSessionLoading.McpSessionStates, the two optional report fields and the eight catalog strings: read bymcpSessionReport.tsandMcpLoadingBar.tsx.The rules it follows:
states(an agent backend that does not report it) draws nothing: a server nobody has heard from is "unreported", which is not "loading". When the report is partial, the pill says "Some servers are not tracked" and gives no number:states_omittedtotals what each of the report's lists left out, so it is not a number of servers.motion-safe. A screen reader hears one sentence when it appears; the count is the button's own name, not a live region.src/kiro_crew/acp/mcp_session_report.pyis 1,582 lines with this change (1,580 on main), under the 1,600-line working target.Backwards compatibility
Compatible: the payload gains two keys and changes none, and the two fields are optional on the dashboard's type, so a report without them renders exactly what it renders on main.
Removes nothing: the diff adds two payload keys, a component, a reader function, two optional type fields, catalog keys and doc lines.
Tests
Backend, the payload:
test/test_mcp_report_arrival_fold.py::TestNotReady::test_the_payload_carries_the_states_and_what_the_report_left_outpins both keys:statesisnot_ready()as lists and follows a status frame;states_omittedis 0 while every server is tracked and 2 once two are past the report's bound.test/test_mcp_session_report.pyandtest/test_mcp_session_report_wiring.pyhold the two keys.Frontend,
website/src/test/McpLoadingBar.test.tsx(28 tests):states, all connected, or only failed / sign-in / switched-off / left-out servers.mcp_report_update, goes away when the last server connects, when it fails instead, and when a reset clears the report; one catalog sentence (en-XA); digits in the app language (bn).aria-controlsnames it; the second group's label and accessible name; stays open after the last server connects and goes once closed; goes away even while open when a reset clears the report, and the next session in that slot starts closed; fades its bottom edge only while rows sit below the fold; starts closed in another session; says so in words, without a number, when the report does not track every server.motion-safe:animate-spinand never a bareanimate-spin; the status sentence has no digits, is not replaced when the count changes, and the count is outside every live region.mcpSessionLoading: nostatesmeans nothing connecting; a not-ready state wins over a staleready; wire data that is not a list of names is ignored.ChatPage.statusStackLayering.test.tsxpins the new bar's layer with the stack's other children.ChatPage.composerDock.test.tsxstubs it like its siblings.Determinism:
npx vitest run src/test/McpLoadingBar.test.tsx --sequence.shuffle --sequence.seed=<2001..2010> --retry=0passed 10 of 10 runs, 28 tests each (Linux). The file uses no timer, clock, sleep or network: state changes are store dispatches insideact, the scroll-edge test sets the scroller's metrics by hand and fires one scroll event, and the language is set back to English after each test. The backend test builds reports in memory and folds frames by hand; it has no clock and no wait.Manual verification
Run on an isolated gateway built from this branch (fresh data home, loopback only, stopped after the run), one real chat turn, 1280x800, nothing injected. Three stand-in MCP servers beside the four built-in ones: one that connects at once, one that takes 20 s, one that exits at start.
late-tools"Connecting", five servers "Started in this session", and under "Not counted: 1"broken-tools"Failed to start in this session"The 30-server recording below is from an earlier run of the same pill on a local join with the report change, before that change merged: the pill appeared at "18 of 34", followed 17 report pushes one server at a time, and left by itself at 21.0 s.
In the mock shots (closed, open with every state) the report frame is delivered to the page over its own dashboard socket by the capture script, because no real server set produces a failed, a sign-in, a switched-off and a left-out server at once; the chat, the reply and the component are real.
Screenshots / video
Before: the status stack above the composer is empty while servers connect.
Fed by a real gateway built from this branch: one server still connecting, one that failed to start.
Fed by a real gateway, 30 public servers: the pill appears, counts up, opens into its list, closes, and leaves by itself.
live-30-servers.webm
Mock report, closed:
Mock report, open, every state at once: the counted servers first, the others under "Not counted".
Dark theme, and the whole page
Related Issues
Part of #35513
Reads the report that #35722 made current (#35509). Follows #35245.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)