Skip to content

fix(dashboard): return to the MCP Servers list as you left it - #25967

Closed
alparamonov wants to merge 1 commit into
kirodotdev:mainfrom
alparamonov:fix/customize-connections-memory
Closed

alparamonov wants to merge 1 commit into
kirodotdev:mainfrom
alparamonov:fix/customize-connections-memory

Conversation

@alparamonov

@alparamonov alparamonov commented Oct 29, 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.

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.

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 exactly 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 component state, so all three reset.

useConnectionsSubTab now treats view=mcp-servers as the one value that picks a sub-tab outright. Any other URL resumes the last sub-tab, including a view that a switch from another Customize tab carries over, such as Skills' budget, so that value cannot overwrite the memory. The URL is rewritten to name what is shown, re-written after SidePanelLayout's own ?tab= write in the same flush drops it, and every 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 the memories filter uses. 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 fresh tab opens Services; a return without view reopens MCP Servers and writes view=mcp-servers back; a last pick of Services reopens Services; a view that names no Connections sub-tab resumes MCP Servers and leaves the memory intact. Four cases drive the real SidePanelLayout: a return through a bare /capabilities lands on MCP Servers; clicking the sidebar entry while on Customize keeps it; 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; a fresh tab opens unfiltered; an unreadable saved value is ignored.
  • Removing each part of the change in turn (the whole change, the synchronous fallback in setTab, the URL write-back, the params dependency of the write-back, the narrowed explicit-view rule, the kept history state) turns the matching tests red.
  • 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

Ran the user's flow in headless Chrome against a test-mode gateway (fake agent backend, two stdio MCP servers demo-alpha and demo-beta): Customize → Connections → MCP Servers, filter alpha, open its tools, Sessions → New chat session, Customize. On the base commit the return lands on /capabilities?tab=mcp with Services selected. With this change it lands on /capabilities?tab=mcp&view=mcp-servers with the filter and the open tool list intact, and opening Connections from /capabilities?tab=skills&view=budget lands on the same MCP Servers list.

Screenshots / video

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

before-fix-after-return

With this change, before leaving: MCP Servers filtered to alpha, tools open.

with-fix-before-leaving

With this change, after returning from a chat: the same list.

with-fix-after-return

With this change, Connections opened from Skills' Context Budget view: still MCP Servers.

with-fix-after-skills-budget

Related Issues

Closes #25961

Sibling sweep

Swept: git grep -nE "get\(['\"]view['\"]\)" -- website/src/pages, plus the useState-held view state of the Customize panes
Sibling: website/src/pages/overview/SkillsTab.tsx:142 -- 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:218 -- not affected -- a drill-in with a Back control, not a sub-tab selector
Sibling: website/src/pages/system/PerformanceTab.tsx:97 -- not affected -- a drill-down with a Back control, not a sub-tab selector
Sibling: website/src/pages/connections/ConnectionsPage.tsx:71 -- tracked in #25962 -- the Services search box is component state and resets the same way

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

@alparamonov
alparamonov requested review from a team and KiroCrewCaptain as code owners October 29, 2026 21:21
@alparamonov
alparamonov requested a review from buluoray October 29, 2026 21:21
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of fa0771df7634b52dcc16faa1452dd012d681958f 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 control is added or changed: the PR restores the sub-tab, filter and open tool lists, and screenshots 02–04 show each state. This lane has no blind read; a same-repo run would add one.

[UX-REVIEWED] fa0771d

Description read

[DESCRIPTION-READ] c04eb900afd642c9b037d45133169d4dbae2199f4ed67a716faffc6122db1ad9

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

Copy link
Copy Markdown
Contributor

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

Premise-level review of fa0771df7634b52dcc16faa1452dd012d681958f 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 to check.

What this change ships

Inventory (7 items) — 7 justified

Intent: when someone goes from Customize to a chat and back, the MCP Servers list should be as they left it. This is a FIX (#25961).

  1. Opening Customize again without view brings back MCP Servers if that was the last sub-tab shown in this browser tab — justified
  2. On that return the URL is rewritten to view=mcp-servers, so it names the sub-tab on screen — justified
  3. A view that names no Connections sub-tab (Skills' budget) now resumes the last sub-tab instead of always showing Services; a fresh browser tab still shows Services — justified
  4. The MCP Servers filter text survives leaving and coming back — justified
  5. Tool lists that were open stay open when you come back — justified
  6. The sub-tab's URL writes keep the history entry's state, so the phone back bar can still pop — justified
  7. The feature-map Connections row describes the per-tab memory — justified

[FIRST-PRINCIPLES-REVIEWED] fa0771d

Description read

[DESCRIPTION-READ] cf8e76a4d46fb0f2ecd93bf2f1e097cddce08c11383106cafddebea3d03d528f

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

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

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

Design-Verdict: PASS

No design-level concerns: this is browser-tab-only state, an explicit view=mcp-servers link still wins, and every guide plan routed through a bare ?tab=mcp targets MCP Servers anyway.

Notes

  • /connections → /capabilities?tab=mcp (App.tsx:822) now opens the last-shown sub-tab, not always Services. Nothing in the tree depends on it opening Services, and a revert undoes it cleanly.

[DESIGN-REVIEWED] fa0771d

Description read

[DESCRIPTION-READ] 598254848a7aec7047f705289ad04fa6a5a78f73bd3425697d522f47b0a0963e

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

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

Review details

No findings. None of the three candidates holds up as a defect. Each one describes behaviour the PR chose on purpose: its own tests pin the view=budget → view=mcp-servers overwrite and the resume on a bare ?tab=mcp. The restored filter is a stated design choice, and the reader can see it in the filter box.

[OPUS-REVIEWED] fa0771d

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

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

Review details

No findings.
[GPT-REVIEWED] fa0771d

@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 Oct 29, 2026
@alparamonov

Copy link
Copy Markdown
Contributor Author

The red checks on this head come from its base, df72ee4b6, not from this change. The same tests fail on main at that commit:

I'll rebase onto main once #25944 lands, so a single re-run clears all of them.

@alparamonov
alparamonov force-pushed the fix/customize-connections-memory branch from 2ace41f to fa0771d Compare October 29, 2026 23:33
@alparamonov

Copy link
Copy Markdown
Contributor Author

Rebased onto main 1fc4b3ae9, which carries #25947 and #25944 (the fix for #25941); CI re-running.

@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 labels Oct 30, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Hold for CI: two checks are red on this head because the runs hit GitHub's API rate limit, so they never checked the diff. Reviewed head: fa0771d.

Re-running the failed jobs of those two runs should clear this. The code itself looks sound: the sub-tab resumes from sessionStorage unless the URL names view=mcp-servers, and every URL write replaces the entry and keeps its history state (

export function useConnectionsSubTab(): [ConnectionsSubTab, (tab: ConnectionsSubTab) => void] {
). The AI lanes raised nothing blocking; the Design note about /connections resuming the last sub-tab describes the intended behaviour.

— crew-pr-reviewer (r136)

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 3, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

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

bolichen97 added a commit that referenced this pull request Nov 7, 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 added a commit that referenced this pull request Nov 7, 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 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
bolichen97 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
bolichen97 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
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)
@iamwhatever

Copy link
Copy Markdown
Contributor

Thanks for this fix, @alparamonov. Closing because the same behavior has landed on main: #32347 (#32347, "fix(dashboard): return to the mcp servers list as you left it") merged and closed the linked issue #25961. If anything from this branch is still missing on main, please reopen with the gap and we will take another look.

@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision 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.

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

3 participants