feat(agent-config): shared configuration UI pieces [11/21] - #332
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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
The constants omit an API reason code and incorrectly describe read-only users’ access to overlay secrets.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds shared, currently unwired UI components for displaying agent configuration, status, provenance, locked keys, and YAML.
Changes:
- Adds reusable configuration badges, notices, labels, and YAML viewer.
- Adds agent configuration vocabulary and tooltips.
- Adds focused component and constants tests.
| File | Description |
|---|---|
src/config/tooltips.ts |
Adds agent configuration tooltips. |
src/components/agents/config/ProvenanceBadge.vue |
Displays configuration provenance. |
src/components/agents/config/LockedKeysPanel.vue |
Shows host-managed configuration keys. |
src/components/agents/config/InstanceStatusChip.vue |
Displays instance synchronization status. |
src/components/agents/config/InstanceModeNotice.vue |
Explains instance mode, failures, and warnings. |
src/components/agents/config/constants.ts |
Defines configuration labels and notices. |
src/components/agents/config/ConfigYamlViewer.vue |
Adds read-only YAML copy/download support. |
src/components/agents/config/ConfigPill.vue |
Adds a shared status-pill primitive. |
src/components/agents/config/CodeLabel.vue |
Maps API codes to readable labels. |
src/components/agents/config/__tests__/LockedKeysPanel.spec.ts |
Tests mode defaults. |
src/components/agents/config/__tests__/InstanceModeNotice.spec.ts |
Tests notices and rejection details. |
src/components/agents/config/__tests__/constants.spec.ts |
Tests API vocabulary mappings. |
src/components/agents/config/__tests__/ConfigYamlViewer.spec.ts |
Tests YAML rendering and actions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /** R57: overlays are readable by every agent:read holder. */ | ||
| export const OVERLAY_SECRETS_NOTICE = | ||
| 'Overlays are stored as written and are readable by everyone who can view agents. Do not type secrets here: use a ${env:NAME} placeholder in a plugin config value, which the agent resolves on its own host.'; |
| export const CHANGE_REASON_LABELS: Record<string, string> = { | ||
| 'locked-key': 'Locked key (set locally only)', | ||
| logging: 'Logging setting', | ||
| 'data-only': 'Data only', | ||
| 'reduces-scope': 'Reduces scope', | ||
| 'already-used': 'Source already used by this agent', | ||
| 'trusted-source': 'Trusted source', | ||
| 'untrusted-source': 'Untrusted source', | ||
| 'local-source-not-allowed': 'Local sources are not allowed on this host', | ||
| 'new-local-source': 'New local source', | ||
| 'overridable-config-flag': 'Overridable config key', | ||
| 'config-not-overridable': 'Config key not overridable', | ||
| 'new-env-reference': 'Reads a new host environment variable', | ||
| 'forbidden-env-reference': 'Forbidden environment variable', | ||
| }; |
b0181cf to
1b28d8a
Compare
| data-test="locked-keys" | ||
| > | ||
| <h4 class="mb-1 text-sm font-semibold text-gray-900 dark:text-slate-200"> | ||
| <i class="pi pi-lock mr-1 text-xs text-gray-400" />Set on the agent host |
There was a problem hiding this comment.
[Should-fix] UI-COMP-001 · Component convention not followed
Introduced in #332. text-gray-400/text-gray-500 with no dark: variant; 745 of 823 such class attributes in the repo pair them with dark:text-slate-*.
Why: Mixed patterns make components harder to maintain; there are no auto-imports.
Fix: Add the matching dark:text-slate-400/dark:text-slate-500 variant, as the neighbouring components do.
ccf-review · bee707cd31ce · rules@6be9e11b8bc6
|
|
||
| // ---- Classify reasons (API A1.6, classify.go) ---- | ||
|
|
||
| export const CHANGE_REASON_LABELS: Record<string, string> = { |
There was a problem hiding this comment.
[Nit] reenables-plugin has no label
Introduced in #332. The API's change reason reenables-plugin is missing from CHANGE_REASON_LABELS, so the review dialog renders the raw code.
Why: Every other API change reason has a readable label.
Fix: Add 'reenables-plugin': 'Re-enables a plugin disabled on the host'.
Severity basis: no rule matched; decision tree: none of the tree questions.
ccf-review · 6cd11bd5f4de · rules@6be9e11b8bc6
1b28d8a to
c55821f
Compare
c55821f to
09b5c11
Compare
09b5c11 to
f48c3b3
Compare
f48c3b3 to
9936f1e
Compare
Layer 11 of 21 in the stacked split of #318. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce renders "shows no rejection details for an applied instance" only asserted absences, so it passed with no notice at all (CORE-TEST-002). It now first expects the notice and its mode badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9936f1e to
dc03cc2
Compare

Part 11 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
Small shared UI pieces: constants, pills, code labels, provenance badges, instance status chips, the read-only YAML viewer, the locked-keys panel, the instance-mode notice, and the agent-config tooltip strings.
Tests
Specs for constants, YAML viewer, locked keys and instance-mode notice.
🤖 Generated with Claude Code