Skip to content

feat(agent-config): field editor building blocks, header and instance picker [12/21] - #333

Merged
gusfcarvalho merged 4 commits into
agent-config/11-shared-uifrom
agent-config/12-field-editors
Oct 6, 2026
Merged

gusfcarvalho merged 4 commits into
agent-config/11-shared-uifrom
agent-config/12-field-editors

Conversation

@gusfcarvalho

Copy link
Copy Markdown
Contributor

Part 12 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 reviewable on its own. Nothing is reachable in the app until layer 20 wires the Configuration tab in.

What

Field editor building blocks (useEditor, field hints/issues, key-value editor, policy sources editor), the configuration header and the instance picker.

Tests

KeyValueEditor.spec.ts; the rest is covered by the integration specs in layer 21.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 5, 2026 10:52
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a638033f-06c7-4a08-8e47-77cd25ab09ce
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Composite-field errors can be hidden, stale refreshes can conceal the selected instance, and policy trust messaging can be inaccurate.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Adds reusable agent-configuration editors, status headers, and instance-selection components.

Changes:

  • Adds field hints, issue display, policy-source, and key-value editors.
  • Adds configuration header and stale-aware instance picker.
  • Adds key-value editor tests.
File Description
useEditor.ts Provides shared editor helpers and hints.
PolicySourcesEditor.vue Edits ordered policy sources.
KeyValueEditor.vue Edits key-value configuration fields.
FieldIssues.vue Displays field validation issues.
FieldHints.vue Displays shields, differences, and reset actions.
AgentInstancePicker.vue Selects fresh or stale instances.
AgentConfigHeader.vue Shows revision and synchronization status.
KeyValueEditor.spec.ts Tests key trimming and validation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +70 to +77
watch(
() => props.selectedId,
(id) => {
if (staleItems.value.some((i) => i.inst.instanceId === id))
showStale.value = true;
},
{ immediate: true },
);
Comment on lines +61 to +62
>trusted on {{ hint(entry)!.safe }}/{{ hint(entry)!.total }} instances
· {{ hint(entry)!.label }}</span
return getAt(draft.effectiveDraft.value, ptr);
}
function issuesAt(ptr: string) {
return draft.issues.value.filter((i) => i.ptr === ptr);
ianmiell
ianmiell previously approved these changes Oct 6, 2026

@ianmiell ianmiell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: APPROVE

3 Should-fix.

Stack (gh stack 343): #322 → #323 → #324 → #325 → #326 → #327 → #328 → #329 → #330 → #331 → #332 → #333 → #334 → #335 → #336 → #337 → #338 → #339 → #340 → #341 → #342

Comment thread src/components/agents/config/editor/FieldHints.vue Outdated
Comment thread src/components/agents/config/editor/KeyValueEditor.vue Outdated
class="text-xs font-medium tracking-wide text-gray-500 uppercase dark:text-slate-400"
>Policies</span
>
<span v-if="!overridden" class="text-[0.7rem] text-gray-400"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Should-fix] UI-COMP-001 · Component convention not followed

Introduced in #333. 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 · a410bf38ee03 · rules@6be9e11b8bc6

ianmiell
ianmiell previously approved these changes Oct 6, 2026

@ianmiell ianmiell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccf-review: APPROVE

no findings.

Stack (gh stack 343): #322 → #323 → #324 → #325 → #326 → #327 → #328 → #329 → #330 → #331 → #332 → #333 → #334 → #335 → #336 → #337 → #338 → #339 → #340 → #341 → #342

gusfcarvalho and others added 4 commits October 6, 2026 11:24
… picker

Layer 12 of 21 in the stacked split of #318.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KeyValueEditor's key-case warning and the "Reset to file value" tooltip
(KeyValueEditor, FieldHints) read TOOLTIPS['agents.config.*'], per
docs/TOOLTIPS.md (UI-COMP-001).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ers part of the fleet

- AgentInstancePicker renders 25 instances a page (fresh first, stale
  ones when shown) with Previous / Next, and opens on the selected
  instance's page
- AgentConfigHeader says "Showing N of M instances" when the loaded rows
  are part of the fleet; its numbers come from the API's counts
  (instanceCount is the fleet total)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fleet counts

On a partial instance list the in-sync ratio is the API's fleet-wide
counts, which include stale instances: the header now reads "In sync:
X/Y instances (incl. stale, from the API's fleet counts)". A complete
list shows the row-based ratio as before (2/4 for the fixture fleet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccf-lisa
ccf-lisa Bot force-pushed the agent-config/12-field-editors branch from 04aa5db to ec210f9 Compare October 6, 2026 14:38
@gusfcarvalho
gusfcarvalho merged commit 95a9d65 into main Oct 6, 2026
7 checks passed
@gusfcarvalho
gusfcarvalho deleted the agent-config/12-field-editors branch October 6, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants