feat(monitor): attach dashboards to a background proxy - #134
Draft
srnnkls wants to merge 1 commit into
Draft
Conversation
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
Running the proxy as a service currently loses the interactive monitor: the TUI owns the listener, while plain mode does not collect monitor history. This adds
claude-code-proxy monitorto attach a dashboard to an existing proxy. Closing that dashboard leaves inference and other dashboards running.serve --no-monitormode and handle Ctrl-C/SIGTERM with graceful service shutdown.GET /monitor, restricted to actual loopback peers. Immutable read models carry elapsed durations and computed rates without reconstructing process-local clocks.qand Ctrl-C detach; dropping a dashboard cancels its polling task.The existing integrated
servedashboard keeps its shutdown behavior. History remains in memory and resets on service restart. Remote hosts can be reached through an SSH port forward. The attached dashboard needs no provider credentials and has no server mutation or shutdown endpoint.This branch is based directly on upstream
mainand is independent of #133.Validation
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo build --all-targets.cargo test --all-targets, including snapshot serialization, loopback access checks, multiple viewers, detach/reattach, polling failure/recovery, cancellation, and incompatible protocol handling.q, reattach and quit with Ctrl-C, verify HTTP health after each detach, then verify clean SIGTERM shutdown.Also ran the edition and Clippy fixers. Validation uses local mock servers; it makes no live provider requests.