Skip to content

Edit the configuration while services run; restart only on a changed apply - #20

Merged
andrewchen5678 merged 6 commits into
mainfrom
edit-while-running
Sep 24, 2026
Merged

andrewchen5678 merged 6 commits into
mainfrom
edit-while-running

Conversation

@andrewchen5678

@andrewchen5678 andrewchen5678 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Edit Config (Ctrl+E) opens the editor while the proxy and services keep running.
  • Apply (Ctrl+Enter) validates and saves, then restarts everything only if the parsed configuration differs from the running one — comment/formatting-only edits restart nothing. While stopped the button is Start All.
  • Cancel (Escape) replaces Reload from disk: it discards unsaved edits and returns to the service list.
  • Save works while running and only writes the file.
  • Removed the read-only config view and Stop All & Edit Config / Ctrl+Shift+E; Ctrl+R no longer reloads the editor.
  • Manager::apply() returns Started / Restarted / Unchanged; save_config no longer refuses while running (StillRunning removed); Routes lists the running configuration.
  • Logs/Routes tabs are unavailable only while services are stopped.

Tests

  • cargo fmt, cargo clippy --all-targets -- -D warnings, cargo test (73 passed)
  • Manager and window tests cover edit-while-running, Cancel discarding edits (running and stopped), unchanged apply (same PID), changed apply (restart on the new port)
  • ci/unix/e2e.sh passes on the labwc session, with cancel, unchanged-apply and changed-apply steps

🤖 Generated with Claude Code

Andrew Chen and others added 6 commits September 24, 2026 16:19
…apply

Edit Config opens the editor without stopping anything. Apply validates and
saves it, then restarts the proxy and services only if the parsed
configuration differs from the running one (comment and formatting edits do
not count); while stopped the same button is Start All. Save no longer
requires stopping. The read-only view and Stop All & Edit Config (with
Ctrl+Shift+E) are gone, and the Routes tab lists the running configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cancel (Escape) discards unsaved edits and returns to the service list; it is
shown only while running, since the editor is the only view while stopped.
Ctrl+E now only opens the editor, and Ctrl+R no longer reloads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cancel (Escape) always discards unsaved edits and returns to the service
list, independent of the run state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropping the first listener lets the OS hand the same port out again; the
changed configuration would then match the running one and not restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewchen5678
andrewchen5678 merged commit a1bda8b into main Sep 24, 2026
3 checks passed
@andrewchen5678
andrewchen5678 deleted the edit-while-running branch September 24, 2026 23:59
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.

1 participant