Repository navigation
feat(ui): show JSON diffs and truthful save and apply states - #47
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Repository-field suggestions are not rendered by the published editor, and an active Save can display the wrong status.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds shared JSON draft diffing, clearer Save/Apply/Preview states, schema-driven choices, and UI validation.
Changes:
- Adds Diff view and operation-state reporting.
- Adds dynamic choices and Visual JSON compatibility coverage.
- Adds Svelte checking to CI and documentation.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Runs Svelte checks. |
docs/editor-ui.md |
Documents editor behavior. |
src/config/build-json-schema.ts |
Adds provider enum metadata. |
ui/bun.lock |
Locks Svelte-check dependencies. |
ui/package.json |
Adds the Svelte check command. |
ui/src/App.svelte |
Adds Diff and operation states. |
ui/src/editor-schema.ts |
Derives draft choices. |
ui/src/styles.css |
Styles new UI elements. |
ui/src/visual-json-internal.ts |
Updates DiffView compatibility. |
ui/test/App.test.ts |
Tests editor state behavior. |
ui/test/VisualJson.test.ts |
Tests published components. |
ui/tsconfig.json |
Configures adapter type resolution. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…nto fix/editor-draft-retention-41 # Conflicts: # ui/src/App.svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Visual, Raw and Diff share the current JSON draft. Diff compares against acknowledged saved configuration. Display Save, unsaved edits, Apply progress/partial failures and current/stale Preview separately. Prioritize active Saving over unconfirmed disk status. Add real free-form provider/category inputs with current-draft datalist suggestions; retain the closed agents/claude enum for skill providers.
Closes #43. Keep the small compatibility adapter for the published Visual JSON components and fix DiffView's formatting contract. Tests exercise real numeric/boolean/array/enum editing and DiffView, plus late responses, drafts, pending Save, custom suggestions and partial outcomes. Existing Copilot findings are fixed and resolved.
Based on merged #44/#45/#46 and audited #39. Resolve UI locks by retaining audited dependencies, UI tests and svelte-check; preserve all tested JSON editor changes when aligning with main. Automatic tags/npm publication remain disabled.
Validation at
041d2dab0d58ce09c67f4937ac30eccf842b3c5e: frozen root/UI installs, lint, root/UI TypeScript, svelte-check (0 errors/warnings), 103 CLI/API/release tests + 29 UI tests, full CLI/UI build and real tarball checks pass. Final ancestry merges preserve the tested source tree. Root Bun/UI Bun/root npm audits are all 0. Exact-head CI37119195114 and Security37119195122 (audit + CodeQL) both succeed.Previous built browser checks verified Raw edits, Diff and Save. Reload confirmation interrupted automation, so subsequent browser Apply is not claimed verified; Apply states and real HTTP/API behavior are covered by automated tests. Fresh Copilot review remains unavailable from its earlier quota exhaustion.