Skip to content

fix(gateways): hide source selector for single-source virtual servers - #192

Merged
marekdano merged 2 commits into
mainfrom
6445-virtual-server-source-selector
Oct 20, 2026
Merged

marekdano merged 2 commits into
mainfrom
6445-virtual-server-source-selector

Conversation

@marekdano

Copy link
Copy Markdown
Contributor

Closes IBM/mcp-context-forge#6445

Summary

The virtual server details panel showed the "All sources | " tab row even when every component came from a single MCP server, where it offers nothing to choose between. The selector now renders only when the server has more than one source. With several sources it keeps the existing tab style.

Changes

  • VirtualServerDetailsPanel.tsx: render the source tabs only when sourceTabs.length > 1; drop the now-unused sourcesLoading flag.
  • VirtualServerDetailsPanel.test.tsx: add a Vitest case asserting no selector for a single source.
  • e2e/virtual-servers.spec.ts: add a Playwright case for filtering components by source when there are several.

Behaviour notes

  • The tab row no longer appears while sources are still loading, so single-source servers don't flash a tab row before it disappears.
  • Multi-source styling is unchanged (still the segmented tabs, not the Prompt-preview chip style).

One source
Screenshot 2026-10-15 at 11 30 30

Multiple sources
Screenshot 2026-10-15 at 11 47 50

  The virtual server details panel showed the "All sources | <server>"
  tabs even when every component came from one MCP server, where the
  selector offers nothing to choose between. Render it only when there
  is more than one source.

  The tab row no longer appears while sources are still loading, which
  avoids a flash of tabs on single-source servers.

  Adds Vitest coverage for the single-source case and a Playwright test
  for filtering components by source when there are several.

Signed-off-by: Marek Dano <mk.dano@gmail.com>

@vishu-bh vishu-bh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

solid implementation and specific files changed

@a-effort a-effort left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!
#195 adds the second half of IBM/mcp-context-forge#6445

@marekdano
marekdano merged commit 576102f into main Oct 20, 2026
5 checks passed
@marekdano
marekdano deleted the 6445-virtual-server-source-selector branch October 20, 2026 08:35
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.

Virtual server drawer source selection

3 participants