Skip to content

feat(agent-config): save preview with diff rows and safety tags [13/21] - #334

Merged
gusfcarvalho merged 2 commits into
agent-config/12-field-editorsfrom
agent-config/13-save-preview
Oct 6, 2026
Merged

gusfcarvalho merged 2 commits into
agent-config/12-field-editorsfrom
agent-config/13-save-preview

Conversation

@gusfcarvalho

Copy link
Copy Markdown
Contributor

Part 13 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

The save preview: review rows, safety tags, diff rows and SavePreviewPanel (YAML and merge diff of the overlay against the effective config).

Tests

SavePreviewPanel.spec.ts.

🤖 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: 190f91cc-6bfe-47b7-8384-e0aa82653321
  • 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

One or more issues must be addressed before approval.

Review effort: Balanced
Findings: 4 Medium severity

Open (4)
What changed in this PR

Adds reusable save-preview components for agent configuration overlays, ahead of later Configuration-tab integration.

Changes:

  • Adds per-instance diffs, validation feedback, and save controls.
  • Introduces diff rows and safety badges.
  • Adds save-preview component tests.
File Description
src/​components/​agents/​config/​editor/​SavePreviewPanel.vue Updated as part of this pull request.
src/​components/​agents/​config/​editor/​SafetyTag.vue Updated as part of this pull request.
src/​components/​agents/​config/​editor/​DiffRows.vue Updated as part of this pull request.
src/​components/​agents/​config/​__tests__/​SavePreviewPanel.spec.ts Updated as part of this pull request.

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

</tr>
<tr
v-for="row in rows"
:key="row.path"
Comment on lines +61 to +62
const t = truncate(p.value);
const full = truncate(p.value, Number.MAX_SAFE_INTEGER).text;
Comment on lines +342 to +345
const topErrors = computed<FieldError[]>(() => [
...props.preview.overlayErrors,
...(props.saveErrors?.overlay ?? []),
]);
Comment on lines +405 to +406
diffOriginal.value = typeof row.before === 'string' ? row.before : '';
diffModified.value = typeof row.after === 'string' ? row.after : '';
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

1 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

<table class="w-full text-left text-xs" data-test="diff-rows">
<tbody>
<tr v-if="!rows.length">
<td class="py-1 text-gray-500">No differences.</td>

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 #334. 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 · 4d276dd210ce · 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 2 commits October 6, 2026 11:25
Layer 13 of 21 in the stacked split of #318.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the apply summary says how many instances the API's bounded preview
  omitted (omitted-instances): a save still validates against them
- 422 errors of instances without a preview panel (an omitted one, or
  one that reported after the preview) are listed under "Other
  instances": they block Save, so they must be visible

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccf-lisa
ccf-lisa Bot force-pushed the agent-config/13-save-preview branch from ca3c1c4 to 7b99596 Compare October 6, 2026 14:38
@gusfcarvalho
gusfcarvalho merged commit 18b647e into main Oct 6, 2026
7 checks passed
@gusfcarvalho
gusfcarvalho deleted the agent-config/13-save-preview 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