Repository navigation
feat(agents): Configuration tab on the Agents page [20/21] - #341
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Failed permission hydration currently enables optimistic admin access and triggers unauthorized key requests.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Wires agent remote configuration into the Agents page with permission-aware routing and UI.
Changes:
- Adds the Configuration tab and lazy-loaded configuration workspace.
- Gates agent navigation on
agent:readwhile retaining admin-only CRUD and key controls. - Adds coverage and stabilizes PrimeVue tab tests through automatic unmounting.
| File | Description |
|---|---|
src/components/agents/config/AgentConfigTab.vue |
Adds the configuration interface. |
src/components/agents/config/__tests__/AgentConfigTab.spec.ts |
Tests configuration states and permissions. |
src/views/admin/AgentsView.vue |
Integrates the tab and permission gates. |
src/views/__tests__/AgentsView.spec.ts |
Tests admin and reader behavior. |
src/views/LeftSideNav.vue |
Changes Agents navigation to agent:read. |
src/views/__tests__/LeftSideNav.spec.ts |
Tests non-admin Agents visibility. |
src/router/index.ts |
Changes the route permission. |
src/router/__tests__/index.spec.ts |
Tests route permission metadata. |
src/views/__tests__/AiDiagnosticsView.spec.ts |
Adds automatic wrapper cleanup. |
src/views/system-security-plans/__tests__/sspViews.spec.ts |
Adds automatic wrapper cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const permissionsReady = ref(loaded.value); | ||
| if (!permissionsReady.value) { | ||
| Promise.resolve(hydrate()) | ||
| .catch(() => undefined) | ||
| .finally(() => { | ||
| permissionsReady.value = true; | ||
| }); | ||
| } | ||
| const isAdmin = computed(() => permissionsReady.value && canManageAdmin.value); |
b7f7922 to
89bb1db
Compare
89bb1db to
0e1f629
Compare
0e1f629 to
4025803
Compare
4025803 to
6210417
Compare
6210417 to
c903644
Compare
c903644 to
c26538d
Compare
c26538d to
a26a7f6
Compare
Layer 20 of 21 in the stacked split of #318. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header's instance count is the API's fleet-wide total, not the loaded rows. Tab specs cover one instance (one list request, no paging notices) and a fleet past the page cap (fleet-wide header, paged picker, edits blocked with the cap named). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a26a7f6 to
9f0a1f8
Compare

Part 20 of 21 of the stacked split of #318 (agent remote configuration). Every layer adds the final version of its files from #318, and only imports from layers below it, so each layer passes
make reviewableon its own. Nothing is reachable in the app until layer 20 wires the Configuration tab in.What
Wires everything up:
AgentConfigTaband the Configuration tab on the Agents page. The agents route and side nav are now gated onagent:read(keys and CRUD inside the page stay behindadmin:manage).Tests
Specs for the tab, the Agents view, router and side nav;
AiDiagnosticsView.spec.tsandsspViews.spec.tsnow unmount wrappers so PrimeVue's TabList timer can't fire after teardown.Size exception
This PR is just over the 1k-line limit (about 1,030 lines, package-lock excluded) and carries the
size-exceptionlabel. The overflow is the tab-level specs for the paginated instance list (one instance makes one list request and shows no paging notice; a fleet past the page cap gets a fleet-wide header, a paged picker and blocked edits). They needAgentConfigTab, which this layer introduces.🤖 Generated with Claude Code