refactor: split main.rs into bootstrap and tui, join workers on exit - #598
Closed
domcyrus wants to merge 1 commit into
Closed
refactor: split main.rs into bootstrap and tui, join workers on exit#598domcyrus wants to merge 1 commit into
domcyrus wants to merge 1 commit into
Conversation
- src/bootstrap.rs owns the generic privileged startup, src/tui.rs the terminal - App retains worker JoinHandles and stop() joins them with a 2 s deadline - SIGINT is handled like SIGTERM; the splash thread is gated behind Config - process_group_label moves from ui into app
Comment on lines
+474
to
+475
| "Failed to chown {} file '{}' to uid {}: {} (the file may not be writable after the root uid drop)", | ||
| label, path, target.uid, e |
This was referenced Sep 3, 2026
Owner
Author
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.
Prep for a headless front-end (PR 1 of 3).
src/bootstrap.rsowns the generic privileged startup sequence,src/tui.rsthe terminal and UI loop;main.rsis a thin dispatcherAppretains workerJoinHandles andstop()joins them with a 2 s deadline, so PCAP and PCAPNG exports flush on exitConfigprocess_group_labelmoves fromuiintoapp, removing the lastuiimport from the pipelineVerified: fmt, clippy
--all-targets --all-features -D warnings,cargo test --workspace(default and no-default-features), TUI smoke test via VHS on macOS, Linux build and lib tests in OrbStack.Note:
cargo --lockedfails on main independently of this change (Cargo.tomlpinstoml = "0.9"whileCargo.lockcarries 1.1.4 from #594); every cargo run re-resolves and downgrades toml. Worth a separate one-line fix.