feat(ui): persist admin table filters across HTMX pagination and part…#3204
Closed
crivetimihai wants to merge 2 commits intomainfrom
Closed
feat(ui): persist admin table filters across HTMX pagination and part…#3204crivetimihai wants to merge 2 commits intomainfrom
crivetimihai wants to merge 2 commits intomainfrom
Conversation
10 tasks
Contributor
|
Hi @crivetimihai thanks for reopening this! I've verified the code, everything looks good, intact and matching my original changes. Ready for review whenever you get the chance. Thanks! |
…ial refresh Closes #2992 Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
5963f21 to
cfe1c11
Compare
Collaborator
|
@omorros - can you please resolve conflicts? |
10 tasks
Contributor
|
Conflicts should be solved on the new pr now! @marekdano |
Collaborator
|
Closing this PR. A new PR has been created to cover this fix #3647 |
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.
🔗 Related Issue
Closes #2992
📝 Summary
Persist admin table filters (search text, tag filters, "show inactive" toggles) across
HTMX pagination clicks and partial refreshes for all 6 admin tables.
Root cause:
pagination_controls.htmlloadPage()built HTMX request URLs usingtemplate-baked
query_params(static Jinja2 values). When pagination controls wererendered before a search, clicking page 2 dropped the active filters.
Changes:
pagination_controls.html—loadPage()now reads live namespacedq/tagsfrom the browser URL (source of truth written by
updatePanelSearchStateInUrl),overriding stale template-baked values.
admin.js— Addedhtmx:afterSettlelistener that rehydrates search inputs fromURL state after content swaps. Added
updateFilterStatus()for visible filtered rowcount text.
admin.html— Addedaria-live="polite"status spans next to all 6 table searchbars (servers, tools, resources, prompts, gateways, a2a-agents).
🏷️ Type of Change
🧪 Verification
| Check | Command | Status
|
|---------------------------|--------------------|--------------------------------------
-----------------|
| JS tests (vitest) |
npx vitest run| 583/584 pass (1 pre-existing localemismatch) |
| Unit tests |
make test| 12,349/12,355 pass (6 pre-existingstdio failures) |
| Lint suite |
make lint| N/A — no Python files changed|
| Coverage ≥ 80% |
make coverage| N/A — no Python files changed|
✅ Checklist
make black isort pre-commit)📓 Notes (optional)
Files changed (3):
mcpgateway/templates/pagination_controls.html{table}_q/{table}_tagsfrom URL inloadPage()mcpgateway/static/admin.jsupdateFilterStatus()+htmx:afterSettlemcpgateway/templates/admin.htmlaria-livestatus spans on all 6 table