pub struct App {Show 30 fields
pub screen: Screen,
pub apply: bool,
pub kind: SetupKind,
pub skip_piper: bool,
pub remote: Option<String>,
pub install_ssh_key: bool,
pub bin_dir: Option<PathBuf>,
pub release_tag: Option<String>,
pub step_state: ListState,
pub logs: Vec<String>,
pub status_lines: Vec<String>,
pub overview_text: String,
pub panel_lines: Vec<Line<'static>>,
pub modal: Option<Modal>,
pub pending_reboot_offer: bool,
pub help_open: bool,
pub message: String,
pub cli_local: String,
pub box_cli: BoxCliView,
pub cli_current: bool,
pub surfaces: Option<SurfaceProbeReport>,
pub overview_extra: String,
pub probe_tx: Sender<RemoteProbeOutcome>,
pub probe_rx: Receiver<RemoteProbeOutcome>,
pub probe_inflight: bool,
pub reboot_rx: Option<Receiver<RebootEvent>>,
pub reboot_inflight: bool,
pub reboot_cancel: Arc<AtomicBool>,
pub fetch_rx: Option<Receiver<FetchEvent>>,
pub fetch_inflight: bool,
}Expand description
Mutable TUI session: screens, setup list, logs, modals, and background probe/fetch/reboot.
Fields§
§screen: Screen§apply: bool§kind: SetupKind§skip_piper: bool§remote: Option<String>§install_ssh_key: bool§bin_dir: Option<PathBuf>§release_tag: Option<String>§step_state: ListState§logs: Vec<String>§status_lines: Vec<String>§overview_text: String§panel_lines: Vec<Line<'static>>§modal: Option<Modal>§pending_reboot_offer: boolAfter save-token confirm, offer reboot when remote apply installed payload.
help_open: bool§message: String§cli_local: StringLocal TUI / tip CLI long version (LONG_VERSION).
box_cli: BoxCliViewLast known box CLI status (remote). Starts as BoxCliView::Probing.
cli_current: boolBox CLI matches cli_local (remote mode). Local mode always true.
surfaces: Option<SurfaceProbeReport>Last full surface probe (SSH/CLI/API/MCP).
overview_extra: StringExtra Overview lines from doctor/status snapshot.
probe_tx: Sender<RemoteProbeOutcome>Sender half for background remote probes.
probe_rx: Receiver<RemoteProbeOutcome>Receiver polled on the UI thread.
probe_inflight: boolTrue while a remote probe thread is still running.
reboot_rx: Option<Receiver<RebootEvent>>Background reboot progress.
reboot_inflight: boolTrue while a reboot SSH thread is still running.
reboot_cancel: Arc<AtomicBool>Set by Esc to stop the reboot wait thread.
fetch_rx: Option<Receiver<FetchEvent>>Background single-tab fetch (f).
fetch_inflight: boolImplementations§
Source§impl App
impl App
Sourcepub fn new(cli: &Cli) -> Self
pub fn new(cli: &Cli) -> Self
Build app state from clap flags and kick off local refresh or remote probe.
Sourcepub fn refresh_panel_text(&mut self)
pub fn refresh_panel_text(&mut self)
Rebuild colored panel lines for the active surface tab.
Sourcepub fn rebuild_remote_steps(&mut self, setup: Option<&SetupStatusReport>)
pub fn rebuild_remote_steps(&mut self, setup: Option<&SetupStatusReport>)
Rebuild the setup list from an optional box status report (or placeholders).
Sourcepub fn select_smart_step(&mut self)
pub fn select_smart_step(&mut self)
Select the first pending setup row (prefer s0 when box CLI is stale).
Sourcepub fn set_pipeline_kind_local(&mut self, kind: SetupKind)
pub fn set_pipeline_kind_local(&mut self, kind: SetupKind)
Switch full/minimal pipeline locally without SSH; refresh UI text.
Sourcepub fn remote_opts(&self) -> Option<RemoteOptions>
pub fn remote_opts(&self) -> Option<RemoteOptions>
Build [RemoteOptions] from current host / key / bin-dir settings.
Sourcepub fn start_remote_probe(&mut self)
pub fn start_remote_probe(&mut self)
Spawn a background remote probe if none is already running.
Sourcepub fn poll_probe(&mut self)
pub fn poll_probe(&mut self)
Apply any completed background probe without blocking.
Sourcepub fn apply_remote_probe(&mut self, outcome: RemoteProbeOutcome)
pub fn apply_remote_probe(&mut self, outcome: RemoteProbeOutcome)
Apply a finished remote probe outcome (success or unreachable error).
Sourcepub fn apply_remote_probe_ok(&mut self, _host: &str, ok: RemoteProbeOk)
pub fn apply_remote_probe_ok(&mut self, _host: &str, ok: RemoteProbeOk)
Merge a successful remote probe into box CLI, surfaces, and setup rows.
Sourcepub fn open_host_editor(&mut self)
pub fn open_host_editor(&mut self)
Open the OpenSSH Host text modal.
Sourcepub fn apply_host_edit(&mut self, host: &str)
pub fn apply_host_edit(&mut self, host: &str)
Apply a host edit and start a remote probe for the new host.
Sourcepub fn install_ssh_key_action(&mut self)
pub fn install_ssh_key_action(&mut self)
Run opt-in ssh-copy-id when --install-ssh-key was set.
Sourcepub fn run_surface_enter(&mut self)
pub fn run_surface_enter(&mut self)
Enter-key action for the current surface tab (SSH host, CLI sync, reboot).
Sourcepub fn arm_reboot_confirm(&mut self)
pub fn arm_reboot_confirm(&mut self)
Show the reboot confirmation modal.
Sourcepub fn do_reboot(&mut self, sudo_password: String)
pub fn do_reboot(&mut self, sudo_password: String)
Start background sudo reboot with the collected password.
Sourcepub fn poll_reboot(&mut self)
pub fn poll_reboot(&mut self)
Drain reboot worker events into logs and modal state.
Sourcepub fn fetch_current_tab(&mut self)
pub fn fetch_current_tab(&mut self)
Background-fetch the active surface tab (f key).
Sourcepub fn ensure_surfaces_shell(&mut self)
pub fn ensure_surfaces_shell(&mut self)
Ensure a placeholder [SurfaceProbeReport] exists before partial fetches.
Sourcepub fn poll_fetch(&mut self)
pub fn poll_fetch(&mut self)
Drain single-tab fetch results into surfaces and panels.
Sourcepub fn resolve_confirm_yes(&mut self)
pub fn resolve_confirm_yes(&mut self)
Accept the current confirm modal (run step, install, reboot, save token).
Sourcepub fn resolve_confirm_no(&mut self)
pub fn resolve_confirm_no(&mut self)
Decline the current confirm modal (skip install bits or cancel).
Sourcepub fn maybe_offer_reboot_after_token(&mut self)
pub fn maybe_offer_reboot_after_token(&mut self)
After token save, offer reboot when a remote apply installed payload.
Sourcepub fn run_s0_sync(&mut self)
pub fn run_s0_sync(&mut self)
Upload / sync the CLI agent to the box (s0).
Sourcepub fn refresh_local(&mut self)
pub fn refresh_local(&mut self)
Refresh setup list, overview text, and embedded surface probes.
Sourcepub fn run_remote_cli(
&mut self,
rest: &[&str],
use_sudo: bool,
ecosystem: EcosystemInstallChoice,
)
pub fn run_remote_cli( &mut self, rest: &[&str], use_sudo: bool, ecosystem: EcosystemInstallChoice, )
Run argv on the box via the remote runner; handle token/reboot prompts.
Sourcepub fn make_ctx(&self) -> HostContext
pub fn make_ctx(&self) -> HostContext
Build a [HostContext] from apply mode, pipeline kind, and skip-piper.
Sourcepub fn selected_step_id(&self) -> Option<String>
pub fn selected_step_id(&self) -> Option<String>
Step id of the highlighted setup-list row, when any.
Sourcepub fn push_log(&mut self, line: impl Into<String>)
pub fn push_log(&mut self, line: impl Into<String>)
Append a timestamped log line (keeps the last 500).
Sourcepub fn clear_logs(&mut self)
pub fn clear_logs(&mut self)
Clear the in-memory log buffer.
Sourcepub fn next_screen(&mut self)
pub fn next_screen(&mut self)
Move to the next tab for the current local/remote mode.
Sourcepub fn prev_screen(&mut self)
pub fn prev_screen(&mut self)
Move to the previous tab for the current local/remote mode.
Sourcepub fn select_screen(&mut self, screen: Screen)
pub fn select_screen(&mut self, screen: Screen)
Jump to a tab and close help.
Sourcepub fn run_selected(&mut self)
pub fn run_selected(&mut self)
Run the highlighted setup step (confirm when destructive + apply).
Sourcepub fn execute_step(&mut self, id: &str)
pub fn execute_step(&mut self, id: &str)
Execute one setup step locally or remotely, then refresh.
Sourcepub fn run_all(&mut self)
pub fn run_all(&mut self)
Run the full pipeline; prompt for ecosystem installs when applying full.
Sourcepub fn run_full_pipeline_with_ecosystem(
&mut self,
remote: bool,
ecosystem: EcosystemInstallChoice,
)
pub fn run_full_pipeline_with_ecosystem( &mut self, remote: bool, ecosystem: EcosystemInstallChoice, )
Run all pipeline steps with the chosen ecosystem install set.
Sourcepub fn run_backup_etc(&mut self)
pub fn run_backup_etc(&mut self)
Timestamped /etc backup on the local host (apply gate applies).
Sourcepub fn show_disk_backup_status(&mut self)
pub fn show_disk_backup_status(&mut self)
Probe disk-backup readiness and switch to the Logs tab.
Auto Trait Implementations§
impl !Sync for App
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more