Move to paginated UI for gateways, servers and agents#1955
Merged
crivetimihai merged 20 commits intomainfrom Jan 8, 2026
Merged
Move to paginated UI for gateways, servers and agents#1955crivetimihai merged 20 commits intomainfrom
crivetimihai merged 20 commits intomainfrom
Conversation
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
- Remove commented-out admin_list_gateway_ids endpoint (replaced by new implementation) - Remove console.log debug statements from admin.js tab switching logic - Add standard encoding header to migration file Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
- Fix A2A route mismatch: /admin/agents/partial → /admin/a2a/partial - Fix A2A element ID mismatch: #a2a-agents-table-body → #agents-table-body - Fix gateway selector class: .gateway-item → .tool-item for JS compatibility - Restore REST/A2A null gateway checkbox in gateway selector (page 1 only) Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
- Add selectinload for server relationships (tools, resources, prompts, a2a_agents) to prevent N+1 queries in convert_server_to_read - Add db.commit() before template rendering in servers, gateways, and a2a partial endpoints to release transactions and avoid idle-in-transaction timeouts under load Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
…ilures - Preserve existing tool visibility and team_id when updating tool from A2A agent to prevent unintentionally making private/team tools public (ToolUpdate defaults to "public" which was overriding existing settings) - Wrap tool sync in try/except to handle failures gracefully - the agent update is the primary operation and should succeed even if tool sync fails Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
- Fix gateway.last_seen template to handle both datetime objects and ISO strings (after jsonable_encoder serialization) - Fix A2A tool auth sync to use auth=AuthenticationValues(...) instead of auth_type/auth_value which are not fields on ToolUpdate schema Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
69440ac to
8152218
Compare
Member
Review Changes After RebaseThe PR was rebased onto main and the following fixes were applied during code review: 1. Code Cleanup
2. Route and Element ID Fixes
3. Database Performance & Transaction Fixes
4. A2A Agent Update Fixes
5. Template Field Name Fixes
All 4683 tests pass. Flake8, web linting, and Bandit security scans all pass. |
kcostell06
pushed a commit
to kcostell06/mcp-context-forge
that referenced
this pull request
Feb 24, 2026
* Add more partial endpoints Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Add ids and search APIs for gw, server, a2a Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Clean up APIs Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Add templates for gw, server and agent Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Update gw, agent to use htmx Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix bugs in gw loading Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix bugs in partial templates Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix agent fields in partial Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix flake8 issues Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix eslint issues Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix counts in server list Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix update and deletion of a2a tools Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * Fix test Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * pylint fixes Signed-off-by: Madhav Kandukuri <madhav165@gmail.com> * refactor: remove commented code and debug statements - Remove commented-out admin_list_gateway_ids endpoint (replaced by new implementation) - Remove console.log debug statements from admin.js tab switching logic - Add standard encoding header to migration file Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: correct route paths, element IDs, and restore null gateway option - Fix A2A route mismatch: /admin/agents/partial → /admin/a2a/partial - Fix A2A element ID mismatch: #a2a-agents-table-body → #agents-table-body - Fix gateway selector class: .gateway-item → .tool-item for JS compatibility - Restore REST/A2A null gateway checkbox in gateway selector (page 1 only) Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: add eager loading and transaction cleanup for partial endpoints - Add selectinload for server relationships (tools, resources, prompts, a2a_agents) to prevent N+1 queries in convert_server_to_read - Add db.commit() before template rendering in servers, gateways, and a2a partial endpoints to release transactions and avoid idle-in-transaction timeouts under load Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: preserve tool visibility on A2A agent updates and handle sync failures - Preserve existing tool visibility and team_id when updating tool from A2A agent to prevent unintentionally making private/team tools public (ToolUpdate defaults to "public" which was overriding existing settings) - Wrap tool sync in try/except to handle failures gracefully - the agent update is the primary operation and should succeed even if tool sync fails Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix: handle datetime string formatting and A2A tool auth sync - Fix gateway.last_seen template to handle both datetime objects and ISO strings (after jsonable_encoder serialization) - Fix A2A tool auth sync to use auth=AuthenticationValues(...) instead of auth_type/auth_value which are not fields on ToolUpdate schema Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
kcostell06
pushed a commit
to kcostell06/mcp-context-forge
that referenced
this pull request
Feb 24, 2026
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.
✨ Feature / Enhancement PR
🔗 Epic / Issue
Updates points in #1224
🚀 Summary (1-2 sentences)
Refactors admin UI tables (Gateways, Servers, A2A Agents) to use HTMX partial loading with out-of-band swaps, improving performance by eliminating N+1 queries and enabling dynamic pagination without full page reloads.
Additionally implements A2A agent to tool update and deletion logic.
📋 Key Changes
Backend (admin.py)
Frontend Templates
JavaScript (admin.js)
Service Layer (a2a_service.py, tool_service.py)
Database Schema (db.py, Alembic)
🔧 Technical Details
🧪 Checks
make lintpassesmake testpasses