Repository navigation
fix(gateways): use the prompt preview chips for the source selector - #195
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
🟢 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
marekdano
approved these changes
Oct 20, 2026
marekdano
left a comment
Contributor
There was a problem hiding this comment.
The PR looks good!
LGTM 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=tabtorole=button, witharia-pressedcovering what the arrow-key test used to. The tooltip on a source whose name does not resolve stays.Adds
gateways.details.sourcesto en-US, es-ES and pt-BR. The existingfilterSourcesstring is now the group'saria-label.select.source.mp4