Repository navigation
feat(proxy): cross-platform desktop GUI (opt-in), CLI stays headless & cross-platform - #186
Merged
Merged
Conversation
…ays headless Add a native desktop UI behind an opt-in `gui` feature, so the default build stays a lean, cross-platform CLI with no windowing/graphics dependencies. - gui.rs (only built with --features gui): an egui/eframe window with a live flow list (colour-coded by status/scope/tags), a request/response detail pane, a status header (listen, counts, scope, mitm, redact, rules), and a filter box using the rule engine's expression language. Reads the flow store read-only. - `offat-proxy gui` subcommand: launches the window when built with the feature; without it, prints how to enable it and points to `offat-proxy tui`. The windowing loop owns the main thread while the proxy serves on tokio workers. - view.rs: shared, always-compiled, unit-tested helpers (visible_indices, status_label, status_class) used by both the TUI and the GUI (dedup). - Makefile `proxy-gui` target; README + docs updated (cross-platform note). The CLI, terminal UI (`tui`) and MCP work identically on Linux/macOS/Windows without the `gui` feature. Verified here: default build + 57 unit tests + clippy clean; `--features gui` compiles, links and is clippy-clean; the no-gui binary handles `gui` gracefully. The window itself runs on a desktop (this CI box has no display), so GUI logic is covered via the shared view tests.
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.
Adds a cross-platform desktop GUI for the proxy, while keeping the CLI fully functional with no UI and no graphics dependencies.
Desktop GUI (egui/eframe) — opt-in
Behind a
guiCargo feature (not default).cargo build --features guienables theoffat-proxy guiwindow:The windowing event loop owns the main thread; the proxy keeps serving on tokio worker threads.
CLI stays headless and cross-platform
run,tui,mcp,ca,exportwork the same on all platforms.offat-proxy gui: it prints how to enable it and points tooffat-proxy tui(the cross-platform terminal UI).#[cfg(not(unix))]fallbacks, so the CLI compiles on Windows too.Shared, tested logic
view.rsholds always-compiled, unit-tested helpers (visible_indices,status_label,status_class) used by both the TUI and the GUI, removing duplication.Verification
cargo fmt --checkandcargo clippy --all-targetsclean.cargo build --features guicompiles and links (44 MB binary) and is clippy-clean on theguifeature.guigracefully (prints guidance, exit 0).viewtests.Docs:
proxy-rs/README.mdanddocs/proxy.mdupdated;make proxy-guitarget added.