[FIX][UI]: Make "+N more" badges clickable to expand full list in server details modal#3511
Merged
crivetimihai merged 3 commits intomainfrom Mar 10, 2026
Merged
Conversation
Member
|
Thanks @Nayana-R-Gowda. This is a nice UX improvement for #3509 — the expand-on-click behavior is intuitive. A few notes: (1) CI checks are failing — please investigate, (2) consider adding a collapse button or "Show less" option so users can toggle back, (3) no tests were added — a Playwright test for the expand behavior would be good to have. The code follows existing admin.js patterns well. |
…r details modal In the Server Details modal, the '+N more' summary badges for tools, resources, and prompts were static text. Clicking them now expands the compact view inline, replacing it with the full list for that section. Closes #3509 Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
19 Vitest/JSDOM tests covering the new '+N more' badge expansion: - Tools, resources, and prompts badges render with correct count - cursor-pointer class present on all badges - Clicking a badge expands to show the full inline list - Expanded items show display names from window mappings with ID fallback - Sections with <= maxToShow items do not render a badge - Clicking one section badge does not affect other sections Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
4cf683d to
cafad66
Compare
crivetimihai
previously approved these changes
Mar 10, 2026
Member
crivetimihai
left a comment
There was a problem hiding this comment.
Reviewed and approved.
Summary
The PR makes the static "+N more" summary badges in the server details modal clickable — clicking expands the compact view inline with the full list for tools, resources, and prompts.
Review notes
- Security: No issues — all content set via
.textContent(no XSS risk). - Performance: Fine —
innerHTML = ""for small lists is appropriate. - Logic: Correct — each section independently clears and re-renders all items on click using the same DOM structure, CSS classes, and
window.*Mappinglookups as the initial render. - Consistency: Matches existing badge patterns;
cursor-pointerwas already present on these badges. - Tests: Added 19 Vitest/JSDOM differential tests covering badge rendering, click expansion, mapping fallbacks, section isolation, and edge cases. All 861 JS tests pass.
Changes made during review
- Rebased onto main (clean, no conflicts), squashed 3 commits into 1 preserving original author.
- Added differential test file (
tests/js/admin-server-detail-badges.test.js).
Minor observations (non-blocking)
- Expansion is one-way (no collapse back) — acceptable since the modal can be closed/reopened.
- A2A Agents section doesn't use
maxToShowat all (pre-existing inconsistency, not introduced here).
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
mitica
added a commit
to mitica/mcp-context-forge
that referenced
this pull request
Mar 10, 2026
…ver details modal (IBM#3511) * fix(ui): make '+N more' badges clickable to expand full list in server details modal In the Server Details modal, the '+N more' summary badges for tools, resources, and prompts were static text. Clicking them now expands the compact view inline, replacing it with the full list for that section. Closes IBM#3509 Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(ui): add differential tests for server detail badge click-to-expand 19 Vitest/JSDOM tests covering the new '+N more' badge expansion: - Tools, resources, and prompts badges render with correct count - cursor-pointer class present on all badges - Clicking a badge expands to show the full inline list - Expanded items show display names from window mappings with ID fallback - Sections with <= maxToShow items do not render a badge - Clicking one section badge does not affect other sections Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * chore: update lockfiles, Rust plugin stubs, and manual test results Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Dumitru C <canteadumitru@gmail.com> Co-Authored-By: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Dumitru C <canteadumitru@gmail.com>
MohanLaksh
pushed a commit
that referenced
this pull request
Mar 12, 2026
…ver details modal (#3511) * fix(ui): make '+N more' badges clickable to expand full list in server details modal In the Server Details modal, the '+N more' summary badges for tools, resources, and prompts were static text. Clicking them now expands the compact view inline, replacing it with the full list for that section. Closes #3509 Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(ui): add differential tests for server detail badge click-to-expand 19 Vitest/JSDOM tests covering the new '+N more' badge expansion: - Tools, resources, and prompts badges render with correct count - cursor-pointer class present on all badges - Clicking a badge expands to show the full inline list - Expanded items show display names from window mappings with ID fallback - Sections with <= maxToShow items do not render a badge - Clicking one section badge does not affect other sections Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * chore: update lockfiles, Rust plugin stubs, and manual test results Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
Yosiefeyob
pushed a commit
that referenced
this pull request
Mar 13, 2026
…ver details modal (#3511) * fix(ui): make '+N more' badges clickable to expand full list in server details modal In the Server Details modal, the '+N more' summary badges for tools, resources, and prompts were static text. Clicking them now expands the compact view inline, replacing it with the full list for that section. Closes #3509 Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(ui): add differential tests for server detail badge click-to-expand 19 Vitest/JSDOM tests covering the new '+N more' badge expansion: - Tools, resources, and prompts badges render with correct count - cursor-pointer class present on all badges - Clicking a badge expands to show the full inline list - Expanded items show display names from window mappings with ID fallback - Sections with <= maxToShow items do not render a badge - Clicking one section badge does not affect other sections Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * chore: update lockfiles, Rust plugin stubs, and manual test results Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: NAYANA.R <nayana.r7813@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Yosief Eyob <yosiefogbazion@gmail.com>
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.
Signed-off-by: NAYANA.R nayana.r7813@gmail.com
closes #3509
💡 Fix Description
implemented: made the “+N more” summary badges clickable; clicking expands the compact view and replaces it with the full inline list for that section.
🧪 Verification
make lintmake test📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)