Skip to content

[FIX][UI]: Make "+N more" badges clickable to expand full list in server details modal#3511

Merged
crivetimihai merged 3 commits intomainfrom
bug/ui-tools-not-visible-more-tools-3509
Mar 10, 2026
Merged

[FIX][UI]: Make "+N more" badges clickable to expand full list in server details modal#3511
crivetimihai merged 3 commits intomainfrom
bug/ui-tools-not-visible-more-tools-3509

Conversation

@Nayana-R-Gowda
Copy link
Copy Markdown
Collaborator

@Nayana-R-Gowda Nayana-R-Gowda commented Mar 6, 2026

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

Check Command Status
Lint suite make lint Pass
Unit tests make test Pass

📐 MCP Compliance (if relevant)

  • Matches current MCP spec
  • No breaking change to MCP clients

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

@crivetimihai crivetimihai changed the title In the Server Details modal the UI showed a compact “+N more” badge for associated [FIX][UI]: Make "+N more" badges clickable to expand full list in server details modal Mar 7, 2026
@crivetimihai crivetimihai added enhancement New feature or request ui User Interface COULD P3: Nice-to-have features with minimal impact if left out; included if time permits labels Mar 7, 2026
@crivetimihai crivetimihai added this to the Release 1.1.0 milestone Mar 7, 2026
@crivetimihai
Copy link
Copy Markdown
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.

@crivetimihai crivetimihai self-assigned this Mar 7, 2026
Nayana-R-Gowda and others added 2 commits March 10, 2026 11:59
…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>
@crivetimihai crivetimihai force-pushed the bug/ui-tools-not-visible-more-tools-3509 branch from 4cf683d to cafad66 Compare March 10, 2026 12:03
crivetimihai
crivetimihai previously approved these changes Mar 10, 2026
Copy link
Copy Markdown
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

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

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.*Mapping lookups as the initial render.
  • Consistency: Matches existing badge patterns; cursor-pointer was 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 maxToShow at all (pre-existing inconsistency, not introduced here).

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai merged commit 0e2d560 into main Mar 10, 2026
56 checks passed
@crivetimihai crivetimihai deleted the bug/ui-tools-not-visible-more-tools-3509 branch March 10, 2026 12:18
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

COULD P3: Nice-to-have features with minimal impact if left out; included if time permits enhancement New feature or request ui User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][UI]: Unable to see all tools when clicking "+N more tools" in tools selector

2 participants