Skip to main content

App

Struct App 

Source
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: bool

After save-token confirm, offer reboot when remote apply installed payload.

§help_open: bool§message: String§cli_local: String

Local TUI / tip CLI long version (LONG_VERSION).

§box_cli: BoxCliView

Last known box CLI status (remote). Starts as BoxCliView::Probing.

§cli_current: bool

Box CLI matches cli_local (remote mode). Local mode always true.

§surfaces: Option<SurfaceProbeReport>

Last full surface probe (SSH/CLI/API/MCP).

§overview_extra: String

Extra 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: bool

True while a remote probe thread is still running.

§reboot_rx: Option<Receiver<RebootEvent>>

Background reboot progress.

§reboot_inflight: bool

True 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: bool

Implementations§

Source§

impl App

Source

pub fn new(cli: &Cli) -> Self

Build app state from clap flags and kick off local refresh or remote probe.

Source

pub const fn is_remote(&self) -> bool

True when a remote OpenSSH host is configured.

Source

pub fn refresh_panel_text(&mut self)

Rebuild colored panel lines for the active surface tab.

Source

pub fn s0_line(&self) -> String

Setup-list row for remote CLI sync (s0).

Source

pub fn rebuild_remote_steps(&mut self, setup: Option<&SetupStatusReport>)

Rebuild the setup list from an optional box status report (or placeholders).

Source

pub fn select_smart_step(&mut self)

Select the first pending setup row (prefer s0 when box CLI is stale).

Source

pub fn set_pipeline_kind_local(&mut self, kind: SetupKind)

Switch full/minimal pipeline locally without SSH; refresh UI text.

Source

pub fn remote_opts(&self) -> Option<RemoteOptions>

Build [RemoteOptions] from current host / key / bin-dir settings.

Source

pub fn refresh(&mut self)

Refresh local status or start a background remote probe.

Source

pub fn start_remote_probe(&mut self)

Spawn a background remote probe if none is already running.

Source

pub fn poll_probe(&mut self)

Apply any completed background probe without blocking.

Source

pub fn apply_remote_probe(&mut self, outcome: RemoteProbeOutcome)

Apply a finished remote probe outcome (success or unreachable error).

Source

pub fn apply_remote_probe_ok(&mut self, _host: &str, ok: RemoteProbeOk)

Merge a successful remote probe into box CLI, surfaces, and setup rows.

Source

pub fn open_host_editor(&mut self)

Open the OpenSSH Host text modal.

Source

pub fn apply_host_edit(&mut self, host: &str)

Apply a host edit and start a remote probe for the new host.

Source

pub fn install_ssh_key_action(&mut self)

Run opt-in ssh-copy-id when --install-ssh-key was set.

Source

pub fn run_surface_enter(&mut self)

Enter-key action for the current surface tab (SSH host, CLI sync, reboot).

Source

pub fn arm_reboot_confirm(&mut self)

Show the reboot confirmation modal.

Source

pub fn note(&mut self, msg: impl Into<String>)

Set the footer status message.

Source

pub fn do_reboot(&mut self, sudo_password: String)

Start background sudo reboot with the collected password.

Source

pub fn poll_reboot(&mut self)

Drain reboot worker events into logs and modal state.

Source

pub fn fetch_current_tab(&mut self)

Background-fetch the active surface tab (f key).

Source

pub fn ensure_surfaces_shell(&mut self)

Ensure a placeholder [SurfaceProbeReport] exists before partial fetches.

Source

pub fn poll_fetch(&mut self)

Drain single-tab fetch results into surfaces and panels.

Source

pub fn resolve_confirm_yes(&mut self)

Accept the current confirm modal (run step, install, reboot, save token).

Source

pub fn resolve_confirm_no(&mut self)

Decline the current confirm modal (skip install bits or cancel).

Source

pub fn maybe_offer_reboot_after_token(&mut self)

After token save, offer reboot when a remote apply installed payload.

Source

pub fn run_s0_sync(&mut self)

Upload / sync the CLI agent to the box (s0).

Source

pub fn refresh_local(&mut self)

Refresh setup list, overview text, and embedded surface probes.

Source

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.

Source

pub fn make_ctx(&self) -> HostContext

Build a [HostContext] from apply mode, pipeline kind, and skip-piper.

Source

pub fn selected_step_id(&self) -> Option<String>

Step id of the highlighted setup-list row, when any.

Source

pub fn push_log(&mut self, line: impl Into<String>)

Append a timestamped log line (keeps the last 500).

Source

pub fn clear_logs(&mut self)

Clear the in-memory log buffer.

Source

pub fn next_screen(&mut self)

Move to the next tab for the current local/remote mode.

Source

pub fn prev_screen(&mut self)

Move to the previous tab for the current local/remote mode.

Source

pub fn select_screen(&mut self, screen: Screen)

Jump to a tab and close help.

Source

pub fn run_selected(&mut self)

Run the highlighted setup step (confirm when destructive + apply).

Source

pub fn execute_step(&mut self, id: &str)

Execute one setup step locally or remotely, then refresh.

Source

pub fn run_all(&mut self)

Run the full pipeline; prompt for ecosystem installs when applying full.

Source

pub fn run_full_pipeline_with_ecosystem( &mut self, remote: bool, ecosystem: EcosystemInstallChoice, )

Run all pipeline steps with the chosen ecosystem install set.

Source

pub fn run_backup_etc(&mut self)

Timestamped /etc backup on the local host (apply gate applies).

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more