Skip to content

fix(gateways): use the prompt preview chips for the source selector - #195

Merged
vishu-bh merged 3 commits into
mainfrom
6445-source-selector-chips
Oct 21, 2026
Merged

vishu-bh merged 3 commits into
mainfrom
6445-source-selector-chips

Conversation

@a-effort

@a-effort a-effort commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #192, which hides the source selector when a virtual server has one source. This does the other half of IBM/mcp-context-forge#6445: when there is more than one source, use the pattern established in Prompt preview.

The segmented tablist becomes a Sources heading over a row of chips, matching PromptDetailsPanel.

Plain buttons replace the tablist, so the roving tabindex and its arrow-key handler are gone and each chip takes its own tab stop. The unit and e2e assertions move from role=tab to role=button, with aria-pressed covering what the arrow-key test used to. The tooltip on a source whose name does not resolve stays.

Adds gateways.details.sources to en-US, es-ES and pt-BR. The existing filterSources string is now the group's aria-label.

select.source.mp4

  The multi-source selector was a segmented tablist. #6445 asks for the
  pattern established in Prompt preview, so it becomes a Sources heading
  over a row of chips: aria-pressed buttons, secondary when selected and
  outline otherwise, in a wrapping row.

  Buttons replace the tablist, so the roving tabindex and its arrow-key
  handler go and each chip takes its own tab stop. The unit and e2e
  assertions move from role=tab to role=button.

Signed-off-by: Anna Effort <anna.effort@ibm.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in the focused UI, translation, or test changes; tests were not executed.

No open issues 🎉

What changed in this PR

Updates the multi-source virtual server selector to match Prompt preview’s chip pattern, complementing #192’s single-source hiding behavior.

Changes:

  • Replaces source tabs with labeled buttons exposing aria-pressed.
  • Adds the Sources heading in English, Spanish, and Portuguese.
  • Updates unit and end-to-end assertions for the chip interface.
File Description
src/​i18n/​locales/​pt-BR/​gateways.json Adds Portuguese Sources label.
src/​i18n/​locales/​es-ES/​gateways.json Adds Spanish Sources label.
src/​i18n/​locales/​en-US/​gateways.json Adds English Sources label.
src/​components/​gateways/​VirtualServerDetailsPanel.tsx Replaces source tabs with chips and a heading.
src/​components/​gateways/​VirtualServerDetailsPanel.test.tsx Updates filtering, selection, and single-source assertions.
e2e/​virtual-servers.spec.ts Checks chip visibility, selection, and filtering.

Review effort: Balanced

@a-effort a-effort self-assigned this Oct 20, 2026
Base automatically changed from 6445-virtual-server-source-selector to main October 20, 2026 08:35

@marekdano marekdano 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.

The PR looks good!

LGTM 🚀

@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.

LGTM 🚀

@vishu-bh
vishu-bh merged commit be7a15b into main Oct 21, 2026
5 checks passed
@vishu-bh
vishu-bh deleted the 6445-source-selector-chips branch October 21, 2026 14:12
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.

4 participants