Skip to content

fix(dashboard): return to the mcp servers list as you left it - #32347

Merged
bolichen97 merged 1 commit into
mainfrom
fix/25961-connections-sub-tab-memory
Nov 8, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/25961-connections-sub-tab-memory

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Coming back to Customize from a chat reopens the MCP Servers list the way you left it.

Builds on #25967 by @alparamonov.

Open Customize → Connections → MCP Servers, filter the list to one server and open its tool list. Click Sessions in the left pane, open a chat, then click Customize again. You land on the Services sub-tab, the filter is empty and every tool list is closed, so you click through to your server again. Opening Connections from Skills' Context Budget view (?view=budget) lands on Services too.

Why it matters

Fixing or testing an MCP server is a back-and-forth: read the next step in a chat, check the server under Customize, go back to the chat. Every return costs the same three or four clicks to find the server again, on exactly the loop where you return most often.

Not a goal

What changed (motivation → approach → change)

You now come back to the MCP Servers list as you left it, within the same browser tab.

What you set Before After
MCP Servers sub-tab lost on every return, back to Services reopened, and written back into the URL
Server filter cleared kept
Open tool lists all closed the same ones open

The sidebar's Customize entry opens a bare /capabilities. SidePanelLayout already remembers the Customize tab for that case, but the Connections sub-tab lived only in ?view=, and the list's filter and open rows lived in McpTab component state, so all three reset.

useConnectionsSubTab treats view=mcp-servers as the one value that picks a sub-tab outright. Any other URL resumes the sub-tab last shown in the browser tab, including a view that a switch from another Customize tab carries over, such as Skills' budget, so that value cannot overwrite the memory. A resumed MCP Servers is written back into the URL, the way SidePanelLayout keeps ?tab= copy-pasteable, and that write keeps the history entry's state so the phone back bar still pops. McpTab keeps its filter and open tool lists in sessionStorage, the pattern #29273 uses for the Services search. The Connections row of docs/feature-map/README.md names both.

Backwards compatibility

Compatible: a link with view=mcp-servers opens MCP Servers as before. A URL with any other view, or none, changes from always Services to the sub-tab last shown in that browser tab, which is Services in a fresh tab; no link in the codebase points at Services through view.

Removes nothing: no route, query param, export or stored key is removed; the change only adds two sessionStorage keys.

Tests

  • website/src/test/ConnectionsPage.subTabUrl.test.tsx: a last pick of Services reopens Services. Four cases drive the real SidePanelLayout: a return through a bare /capabilities lands on MCP Servers and writes view=mcp-servers back; clicking the sidebar entry while on Customize keeps MCP Servers; picking Connections from Skills' ?view=budget keeps MCP Servers; on a phone, resuming MCP Servers keeps the drill-in marker and the back bar pops.
  • website/src/test/McpTab.listViewMemory.test.tsx: the filter survives an unmount and remount; an opened tool list stays open and a closed one stays closed; an unreadable saved value is ignored.
  • With useConnectionsSubTab.ts and McpTab.tsx reverted to origin/main, six of the new tests fail: all four layout cases, the kept filter and the kept tool list.
  • Determinism: both files pass 10 of 10 shuffled runs (--sequence.shuffle, seeds 1-10).

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

Manual verification

Walked the issue's trip in a browser against this head's built dashboard (website/ tree acaf6def), with scripted Playwright and every /api call answered from fixtures, so no gateway and no data home: Customize, Connections, MCP Servers, filter alpha, open its tool list, then Sessions, open a chat, then Customize in the sidebar.

  • It reopens MCP Servers with the filter and the open tool list, and the URL reads /capabilities?tab=mcp&view=mcp-servers again.
  • Skills, Context Budget (?view=budget), then Connections keeps MCP Servers and the filter; the URL becomes /capabilities?tab=mcp&view=mcp-servers.
  • The same trip on a build of the base commit's dashboard (website/ tree cdf01403) lands on Services at /capabilities?tab=mcp.

The capture script asserted each of those states before writing its frame.

Screenshots / video

Captured from this head's website/ tree (acaf6def), dark theme (the change adds no style).

Base commit, after returning from a chat: Services is selected.

Base commit after returning from a chat: the Services sub-tab is selected

With the change, before leaving: MCP Servers filtered to alpha, its two tools open.

With the change, before leaving: MCP Servers filtered to alpha with the demo-alpha tool list open

With the change, after returning from a chat: the same list, filter and open tool list.

With the change, after returning from a chat: MCP Servers still filtered to alpha with the tool list open

With the change, Connections picked from Skills' Context Budget view: still MCP Servers, filter kept.

With the change, Connections picked from Skills' Context Budget view: MCP Servers still selected and filtered

Related Issues

Closes #25961

Sibling sweep

Swept: git grep -nE "get\(['\"]view['\"]\)" -- website/src/pages, plus the useState-held list state of the Connections panes
Sibling: website/src/pages/overview/SkillsTab.tsx:149 -- not affected -- ?view=budget is a pushed drill-in with its own Back step, and the Skills list is its exit
Sibling: website/src/pages/OverviewPage.tsx:233 -- not affected -- a drill-in with a Back control, not a sub-tab selector
Sibling: website/src/pages/system/PerformanceTab.tsx:99 -- not affected -- a drill-down with a Back control, not a sub-tab selector
Sibling: website/src/pages/SettingsPage.tsx:262 -- not affected -- Settings Overview's view=memory is a declared drill-in that a rail pick drops on purpose
Sibling: website/src/pages/connections/ConnectionsPage.tsx:79 -- not affected -- the Services search is already kept in sessionStorage (#29273)

Pattern harvest

Rule candidate: review-prompt
Pattern: a pane keeps a sub-tab or list state only in a query param or useState on a page whose sidebar entry opens the bare route

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

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 13:17
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ffdc62a04f7507fefcf4e07582df8ae16d48b222 — 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. Issue #25961 is linked, and six of the new tests fail on base. The three pieces of remembered state are all there is to the fix, and grepping website/src found no generic session-state hook they repeat.

What this change ships

Inventory (5 items) — 5 justified

Intent: coming back to Customize from a chat lands on the MCP Servers list the way the person left it. FIX.

  1. Customize opened without view, or with another pane's view such as budget, reopens the Connections sub-tab last shown in that browser tab, not always Services — justified
  2. A resumed MCP Servers sub-tab is written back into the URL as view=mcp-servers, and the phone back-bar marker is kept — justified
  3. The MCP server filter text is kept for the browser tab across leaving and returning — justified
  4. Server tool lists that were open stay open, and closed ones stay closed, across the trip — justified
  5. The Connections row of the feature map describes the per-browser-tab memory — justified

[FIRST-PRINCIPLES-REVIEWED] ffdc62a

Description read

[DESCRIPTION-READ] 0fc7ae7c04e4871a62063f04732effc3e5c179982dc80ee9a01a7a78a7f0e753

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

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the PR adds no new control, and the screenshots show both the before and after states of the restored MCP Servers list.

Notes

  • A filter that is now kept comes back silently. MCP Servers (6) sits above a single row, and the blind reader said "nothing says '1 of 6' or 'filtered'". When the filter is on, change the heading count to "1 of 6" so a returning user doesn't think five servers are gone.

[UX-REVIEWED] ffdc62a

Description read

[DESCRIPTION-READ] 6af3b306665811922201d11bd1479d2aee84a8e217ef385877018523095fbeb7

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

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: keeping the sub-tab, filter and open tool lists in sessionStorage follows the existing SidePanelLayout and #29273 pattern, and the four attached screenshots show this revision.

Notes

  • The guide plans that route to bare /capabilities?tab=mcp (guideActions.ts:263, guidePlans.gen.ts) all start on the connections.mcp-servers-tab button, so a resumed sub-tab can't strand a guide. If someone later adds a guide or link that expects Services from a bare ?tab=mcp, it will need an explicit view value, which this PR doesn't define for Services.
  • open restores server names without checking them against the current server list. A renamed or removed server leaves a dead entry in sessionStorage. It does no harm, but trimming the list to the servers that exist would keep the stored value bounded.

[DESIGN-REVIEWED] ffdc62a

Description read

[DESCRIPTION-READ] 0565a20bde0346eb066ae6b209ef59b0ba869e809a0f4e042c580fcb4223dda1

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ffdc62a

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

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] ffdc62a

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

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

@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 13:44
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/25961-connections-sub-tab-memory branch from 08fbcbf to 2d0c756 Compare November 7, 2026 16:05
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, website/src/pages/overview/McpTab.tsx since this head went green (f289a6d -> a254f30); CI re-running.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/25961-connections-sub-tab-memory branch from 2d0c756 to 7782cd4 Compare November 7, 2026 19:01
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, website/src/pages/overview/PromptsTab.tsx since this head went green (a254f30 -> 21597a3); CI re-running. The previous head's review and policy lanes failed reading the GitHub API (rate limit), not on the change.

[operator: bolichen97]

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

Copy link
Copy Markdown
Contributor Author
  • The rendered evidence comes from another PR span=ca97567ab51a

fixed in 7782cd4: the four shots are re-captured from this head's built dashboard (scripted Playwright, every /api call answered from fixtures) and replace the #25967 images in the description.
Base commit after returning from a chat, Services selected: https://github.com/user-attachments/assets/e6693257-3097-4650-8069-6f0f440b37a5
Before leaving, MCP Servers filtered to alpha with its tool list open: https://github.com/user-attachments/assets/6f9cf801-4c2f-494f-9b2f-7a482e8166e5
After returning from a chat through the sidebar's bare /capabilities, the same list, URL back at /capabilities?tab=mcp&view=mcp-servers: https://github.com/user-attachments/assets/5792665c-b505-4e2f-adce-48c5bed22775
Connections picked from Skills' ?view=budget, still MCP Servers with the filter: https://github.com/user-attachments/assets/2581136d-9c79-4242-8f9e-7b90dd94a3b2
The capture asserted the selected sub-tab, the URL, the filter value and the open tool list before writing each frame.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/25961-connections-sub-tab-memory branch from 7782cd4 to a73309a Compare November 8, 2026 03:04
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, website/src/pages/overview/McpTab.tsx, website/src/pages/connections/ConnectionsPage.tsx, website/src/pages/connections/ConnectionsPageCard.tsx since this head went green (21597a3 -> fcfba68); CI re-running.

[operator: bolichen97]

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 8, 2026
Coming back to Customize from a chat opened Connections on Services,
with the MCP Servers filter empty and every tool list closed. The
sidebar's Customize entry opens a bare /capabilities, and the sub-tab
lived only in ?view= while the filter and open rows were McpTab state.

The sub-tab, the filter and the open tool lists are now kept in
sessionStorage for the browser tab, and a resumed MCP Servers is
written back into the URL. A view=mcp-servers link still opens MCP
Servers.

Builds on #25967 by @alparamonov.

Closes #25961
@bolichen97
bolichen97 force-pushed the fix/25961-connections-sub-tab-memory branch from a73309a to ffdc62a Compare November 8, 2026 08:25
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: the branch conflicted with main in docs/feature-map/README.md (main reworded the Connections row; this PR's three additions to that row were reapplied on top). No code change (range-diff =); CI re-running on ffdc62a04f. The previous head's review and policy lanes failed reading the GitHub API (rate limit), not on the change.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 8, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review checked this head. In useConnectionsSubTab.ts, view=mcp-servers still opens MCP Servers, and only that exact string is accepted from session storage. We traced the write-back against SidePanelLayout's ?tab= sync: it settles with no loop and keeps the phone back bar's push marker. The McpTab saved view is type-checked and wrapped in try/catch, and it is never rendered as HTML. Reverting each production hunk turns at least one of the new tests red, and the tests follow the determinism rules.
Done well: the tests mount the real SidePanelLayout instead of a mock, so they catch the same-flush ?tab= overwrite that the params dependency exists to beat.
Optional: in the "ignores a saved view it cannot read" test, also seed {"q":5,"open":"x"}. That pins both type guards in loadListView. Without the q guard, McpTab.tsx:766 would throw.
Optional: the Connections row in docs/feature-map/README.md says the Apply & Restart mount is on line 670. It is on line 815. This was already wrong on main.
Optional: after this merges, close #25967 as superseded and credit its author.

@bolichen97
bolichen97 merged commit 1823c3e into main Nov 8, 2026
99 checks passed
@bolichen97
bolichen97 deleted the fix/25961-connections-sub-tab-memory branch November 8, 2026 09:22
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
Coming back to Customize from a chat opened Connections on Services,
with the MCP Servers filter empty and every tool list closed. The
sidebar's Customize entry opens a bare /capabilities, and the sub-tab
lived only in ?view= while the filter and open rows were McpTab state.

The sub-tab, the filter and the open tool lists are now kept in
sessionStorage for the browser tab, and a resumed MCP Servers is
written back into the URL. A view=mcp-servers link still opens MCP
Servers.

Builds on #25967 by @alparamonov.

Closes #25961

Original author: Bolin Chen
(cherry picked from commit 1823c3e)
buluoray added a commit that referenced this pull request Nov 8, 2026
Coming back to Customize from a chat opened Connections on Services,
with the MCP Servers filter empty and every tool list closed. The
sidebar's Customize entry opens a bare /capabilities, and the sub-tab
lived only in ?view= while the filter and open rows were McpTab state.

The sub-tab, the filter and the open tool lists are now kept in
sessionStorage for the browser tab, and a resumed MCP Servers is
written back into the URL. A view=mcp-servers link still opens MCP
Servers.

Builds on #25967 by @alparamonov.

Closes #25961

Original author: Bolin Chen
(cherry picked from commit 1823c3e)
buluoray added a commit that referenced this pull request Nov 8, 2026
Coming back to Customize from a chat opened Connections on Services,
with the MCP Servers filter empty and every tool list closed. The
sidebar's Customize entry opens a bare /capabilities, and the sub-tab
lived only in ?view= while the filter and open rows were McpTab state.

The sub-tab, the filter and the open tool lists are now kept in
sessionStorage for the browser tab, and a resumed MCP Servers is
written back into the URL. A view=mcp-servers link still opens MCP
Servers.

Builds on #25967 by @alparamonov.

Closes #25961

Original author: Bolin Chen
(cherry picked from commit 1823c3e)
buluoray added a commit that referenced this pull request Nov 8, 2026
Coming back to Customize from a chat opened Connections on Services,
with the MCP Servers filter empty and every tool list closed. The
sidebar's Customize entry opens a bare /capabilities, and the sub-tab
lived only in ?view= while the filter and open rows were McpTab state.

The sub-tab, the filter and the open tool lists are now kept in
sessionStorage for the browser tab, and a resumed MCP Servers is
written back into the URL. A view=mcp-servers link still opens MCP
Servers.

Builds on #25967 by @alparamonov.

Closes #25961

Original author: Bolin Chen
(cherry picked from commit 1823c3e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Returning to Customize from a chat resets Connections to Services and clears the MCP Servers filter

2 participants