Repository navigation
feat(agent-config): save preview with diff rows and safety tags [13/21] - #334
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
One or more issues must be addressed before approval.
Review effort: Balanced
Findings: 4
Open (4)
Element-level policy_data diffs can share a path: changing ['a', 'b', 'c'] to ['x', 'y', 'a', 'c']… · New These cells render strings without quotes, so policy_data type changes such as 42 → '42' or false →… · New A save-time 422 can include an instance absent from the earlier preview, for example one that… · New A multiline policy_data string can be replaced with a number, boolean, object or array, but this… · New
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" |
| const t = truncate(p.value); | ||
| const full = truncate(p.value, Number.MAX_SAFE_INTEGER).text; |
| const topErrors = computed<FieldError[]>(() => [ | ||
| ...props.preview.overlayErrors, | ||
| ...(props.saveErrors?.overlay ?? []), | ||
| ]); |
| diffOriginal.value = typeof row.before === 'string' ? row.before : ''; | ||
| diffModified.value = typeof row.after === 'string' ? row.after : ''; |
961f200 to
d1578a9
Compare
| <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> |
There was a problem hiding this comment.
[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
d1578a9 to
c77b9c5
Compare
c77b9c5 to
0f035d1
Compare
0f035d1 to
82533b6
Compare
82533b6 to
ca3c1c4
Compare
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>
ca3c1c4 to
7b99596
Compare

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 reviewableon 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