fix(ui): remove duplicate disabled badge and tag/hook truncation on plugin cards#3885
Open
fix(ui): remove duplicate disabled badge and tag/hook truncation on plugin cards#3885
Conversation
Signed-off-by: Shoumi <shoumimukherjee@gmail.com>
Collaborator
Author
Member
|
Thanks @shoummu1. Clean fix — removes the duplicate badge and correctly uses the config-driven session timeout. Please add the DCO |
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.
Bug-fix PR
📌 Summary
Plugin cards on the Plugins page showed the word "Disabled" twice for disabled plugins, and truncated tag and hook lists to arbitrary limits (3 tags, 2 hooks) even when space was available to render them in full.
🔗 Related Issue
Closes: #3842
🔁 Reproduction Steps
Duplicate "Disabled":
status=disabledandmode=disabledTag/hook truncation:
+N more; hooks beyond 2 showed...(N total)🐞 Root Cause
In
mcpgateway/templates/plugins_partial.html:{% else %}catch-all that rendered a "Disabled" badge for any mode that wasn'tenforce,enforce_ignore_error, orpermissive— includingmode=disabled. This duplicated the status dot's "Disabled" text.plugin.tags[:3]with an overflow+{{ plugin.tags|length - 3 }} morespan — a hardcoded limit with no relation to available card space.plugin.hooks[:2]with a...(N total)overflow span.💡 Fix Description
All changes are confined to
mcpgateway/templates/plugins_partial.html:{% else %}catch-all; the mode block now only renders a badge for the three active modes (enforce,enforce_ignore_error,permissive).mode=disabledproduces no badge — the status dot already conveys the disabled state.[:3]slice and the+N moreoverflow span; all tags render in the existingflex-wrapcontainer.[:2]slice and the...(N total)overflow span; all hooks render inline.🧪 Verification
make lintmake testmake coverage📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)