Repository navigation
perf(dashboard): bulk permissions endpoint eliminates N+1 API calls (#359) - #360
Merged
Merged
Conversation
…359) Adds GET /api/agents/permissions-edges that returns all permission edges in a single query, filtered by accessible agents at SQL level. Frontend now makes 1 API call instead of N per-agent calls, reducing dashboard load time from ~15s to ~3-5s with 12+ agents. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates fetchPermissionEdges() documentation to reflect new bulk GET /api/agents/permissions-edges endpoint replacing N per-agent calls. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates test-runner.md with TestBulkPermissionEdges (5 tests): - Structure, empty case, granted permissions, edge fields, auth Co-Authored-By: Claude Opus 4.5 <[email protected]>
9 tasks done
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.
Summary
GET /api/agents/permissions-edgesbulk endpoint returning all permission edges in a single queryfetchPermissionEdges()now makes 1 API call instead of N per-agent callsChanges
src/backend/db/permissions.py—get_all_permission_edges()with SQL-level filteringsrc/backend/database.py— Expose method on db objectsrc/backend/routers/agents.py—GET /permissions-edgesendpoint (before/{name}catch-all)src/frontend/src/stores/network.js— Replace N fetches with 1 bulk calltests/test_agent_permissions.py— 5 tests for bulk endpointExpected Impact
available_agentspayloadTest Plan
pytest tests/test_agent_permissions.py::TestBulkPermissionEdges -vCloses #359
🤖 Generated with Claude Code