feat(studio): edit fleets.toml in-app — CodeMirror TOML editor (ADR #19 C) - #30
Merged
Conversation
… C)
The edit half of the config panel: the operator edits the raw fleets.toml in a
CodeMirror TOML editor and saves; the change validates, persists, and hot-reloads
without a restart. Completes declare(edit) → switch → observe → reconcile.
- studio-cp: `read_bindings_text` / `write_bindings_atomic` (temp+rename) /
`save_bindings_text` — validate the text parses BEFORE writing (a bad edit
never lands on disk) and store bytes verbatim, so comments/layout survive with
no format-preserving lib. Unit tests: round-trip, reject-invalid-without-write,
missing-file-is-empty.
- oab-mcp: `fleet_config` now also returns the raw `text`; new write tool
`fleet_config_write { text }` validates + writes + hot-reloads (bindings moved
behind an RwLock; the per-cluster resolved-config memo is cleared on write).
Catalog is 10 tools.
- src-tauri: `fleet_config_write` bridge command.
- console: CodeMirror 6 TOML editor (StreamLanguage + legacy TOML mode) mounted
imperatively in a section separate from the re-rendered panel, so switching
fleets never wipes an open edit. "Edit config" opens it; Save calls the write
tool and surfaces a parse error inline; Cancel discards. 1 new render test.
Slice C of the config panel, stacked on the A+B view/switch slice. Editing is
raw-text (operator chose a TOML editor over a structured form).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Drafted by Orca (
ecs-claude) — flagging authorship (shared GitHub identity).Slice C of the config panel — in-app editing of
fleets.tomlvia a CodeMirror TOML editor. Supersedes #27, which GitHub auto-closed when its stacked base branch (feat/fleet-config-panel, #26) was squash-merged into main. Same commit, rebased onto current main (now carries #26 A+B and #28's ServiceNotFound fix).What:
studio-cp—read_bindings_text/write_bindings_atomic(temp+rename) /save_bindings_text: validate the text parses before writing (a bad edit never lands on disk), store bytes verbatim (comments/layout preserved, no format-preserving lib). Unit tests: round-trip, reject-invalid-without-write, missing-file-is-empty.oab-mcp—fleet_confignow returns the rawtext; new write toolfleet_config_write { text }validates + writes + hot-reloads (bindings behind anRwLock; per-cluster resolved-config memo cleared on write). 10 tools.src-tauri—fleet_config_writebridge command.console— CodeMirror 6 TOML editor (StreamLanguage+ legacy TOML mode), mounted imperatively in a section separate from the re-rendered panel so switching fleets never wipes an open edit. "Edit config" opens it; Save calls the write tool and surfaces a parse error inline; Cancel discards.Verification (rebased branch):
cargo check --tests -p studio-cp -p oab-mcpclean with #28 present (both sets of studio-cp changes coexist); consoletscclean,vitest22/22,vite buildOK. Rust test execution + thetauri buildare covered by CI (build-test+bundle-macos).Relates to #19; follows #26 (A+B) and #28.
🤖 Generated with Claude Code