Add robust server mode for coz plot - #267
Merged
Merged
Conversation
emeryberger
force-pushed
the
robust-server-mode
branch
8 times, most recently
from
February 14, 2026 20:27
aac051a to
547292a
Compare
Make `coz plot` usable in headless/remote environments and more resilient in local use: - Auto-retry port selection when preferred port is busy (tries +0..+9 then random high ports) - Detect headless environments (SSH, no X11/Wayland) and skip browser opening, printing SSH port-forwarding instructions instead - Add --no-browser flag for explicit server-only mode - Fix Ctrl-C/SIGTERM handling to shut down cleanly without deadlock Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
emeryberger
force-pushed
the
robust-server-mode
branch
from
February 14, 2026 23:52
547292a to
0f76231
Compare
Ctrl-C (SIGINT) is unreliable in some shell environments (e.g. zsh on macOS). Simply prompt for Enter, which always works via input(). Co-Authored-By: Claude Opus 4.6 <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.
Summary
--no-browserflag: Lets users explicitly start in server-only modeTest plan
coz plot— opens browser and serves on 8080 as beforeSSH_TTY=1 coz plot— prints port-forwarding hint, no browser openedcoz plot --no-browser— server starts without opening browserkill -TERM <pid>— same clean shutdown🤖 Generated with Claude Code