Modal

Enum Modal 

Source
pub enum Modal {
Show 23 variants None, Alert { message: String, }, Loading { message: String, }, ConfirmInstall { items: Vec<PackageItem>, }, ConfirmReinstall { items: Vec<PackageItem>, all_items: Vec<PackageItem>, header_chips: PreflightHeaderChips, }, ConfirmBatchUpdate { items: Vec<PackageItem>, dry_run: bool, }, ConfirmAurUpdate { message: String, }, Preflight {
Show 26 fields items: Vec<PackageItem>, action: PreflightAction, tab: PreflightTab, summary: Option<Box<PreflightSummaryData>>, summary_scroll: u16, header_chips: PreflightHeaderChips, dependency_info: Vec<DependencyInfo>, dep_selected: usize, dep_tree_expanded: HashSet<String>, deps_error: Option<String>, file_info: Vec<PackageFileInfo>, file_selected: usize, file_tree_expanded: HashSet<String>, files_error: Option<String>, service_info: Vec<ServiceImpact>, service_selected: usize, services_loaded: bool, services_error: Option<String>, sandbox_info: Vec<SandboxInfo>, sandbox_selected: usize, sandbox_tree_expanded: HashSet<String>, sandbox_loaded: bool, sandbox_error: Option<String>, selected_optdepends: HashMap<String, HashSet<String>>, cascade_mode: CascadeMode, cached_reverse_deps_report: Option<ReverseDependencyReport>,
}, PreflightExec { items: Vec<PackageItem>, action: PreflightAction, tab: PreflightTab, verbose: bool, log_lines: Vec<String>, abortable: bool, header_chips: PreflightHeaderChips, success: Option<bool>, }, PostSummary { success: bool, changed_files: usize, pacnew_count: usize, pacsave_count: usize, services_pending: Vec<String>, snapshot_label: Option<String>, }, Help, ConfirmRemove { items: Vec<PackageItem>, }, SystemUpdate { do_mirrors: bool, do_pacman: bool, force_sync: bool, do_aur: bool, do_cache: bool, country_idx: usize, countries: Vec<String>, mirror_count: u16, cursor: usize, }, News { items: Vec<NewsFeedItem>, selected: usize, scroll: u16, }, Announcement { title: String, content: String, id: String, scroll: u16, }, Updates { entries: Vec<(String, String, String)>, scroll: u16, selected: usize, }, OptionalDeps { rows: Vec<OptionalDepRow>, selected: usize, }, ScanConfig { do_clamav: bool, do_trivy: bool, do_semgrep: bool, do_shellcheck: bool, do_virustotal: bool, do_custom: bool, do_sleuth: bool, cursor: usize, }, GnomeTerminalPrompt, VirusTotalSetup { input: String, cursor: usize, }, ImportHelp, NewsSetup { show_arch_news: bool, show_advisories: bool, show_aur_updates: bool, show_aur_comments: bool, show_pkg_updates: bool, max_age_days: Option<u32>, cursor: usize, }, PasswordPrompt { purpose: PasswordPurpose, items: Vec<PackageItem>, input: String, cursor: usize, error: Option<String>, },
}
Expand description

What: Captures all dialog state for the various modal overlays presented in the Pacsea TUI.

  • Input: Mutated by event handlers in response to user actions or background updates.
  • Output: Drives conditional rendering and behavior of each modal type.
  • Details: Acts as a tagged union so only one modal can be active at a time while carrying the precise data needed for that modal’s UI.

Variants§

§

None

No modal is currently displayed.

§

Alert

Informational alert with a non-interactive message.

Fields

§message: String

Alert message text.

§

Loading

Loading indicator shown during background computation.

Fields

§message: String

Loading message text.

§

ConfirmInstall

Confirmation dialog for installing the given items.

Fields

§items: Vec<PackageItem>

Package items to install.

§

ConfirmReinstall

Confirmation dialog for reinstalling already installed packages.

Fields

§items: Vec<PackageItem>

Packages that are already installed (shown in the confirmation dialog).

§all_items: Vec<PackageItem>

All packages to install (including both installed and not installed).

§header_chips: PreflightHeaderChips

Header chip metrics for the operation.

§

ConfirmBatchUpdate

Confirmation dialog for batch updates that may cause dependency conflicts.

Fields

§items: Vec<PackageItem>

Package items to update.

§dry_run: bool

Whether this is a dry-run operation.

§

ConfirmAurUpdate

Confirmation dialog for continuing AUR update after pacman failed.

Fields

§message: String

Message explaining the situation.

§

Preflight

Preflight summary before executing any action.

Fields

§items: Vec<PackageItem>

Packages selected for the operation.

§action: PreflightAction

Action to perform (install/remove/downgrade).

§tab: PreflightTab

Currently active preflight tab.

§summary: Option<Box<PreflightSummaryData>>

Aggregated summary information for versions, sizes, and risk cues.

§summary_scroll: u16

Scroll offset (lines) for the Summary tab content (mouse scrolling only).

§header_chips: PreflightHeaderChips

Header chip data shared across summary, execution, and post-summary screens.

§dependency_info: Vec<DependencyInfo>

Resolved dependency information (populated when Deps tab is accessed).

§dep_selected: usize

Selected index in the dependency list (for navigation).

§dep_tree_expanded: HashSet<String>

Set of dependency names with expanded tree nodes (for tree view).

§deps_error: Option<String>

Error message from dependency resolution, if any.

§file_info: Vec<PackageFileInfo>

File information (populated when Files tab is accessed).

§file_selected: usize

Selected index in the file list (for navigation).

§file_tree_expanded: HashSet<String>

Set of package names with expanded file lists (for Files tab tree view).

§files_error: Option<String>

Error message from file resolution, if any.

§service_info: Vec<ServiceImpact>

Service impact information (populated when Services tab is accessed).

§service_selected: usize

Selected index in the service impact list (for navigation).

§services_loaded: bool

Whether service impacts have been resolved for the current session.

§services_error: Option<String>

Error message from service resolution, if any.

§sandbox_info: Vec<SandboxInfo>

Sandbox information for AUR packages (populated when Sandbox tab is accessed).

§sandbox_selected: usize

Selected index in the sandbox display list (for navigation - can be package or dependency).

§sandbox_tree_expanded: HashSet<String>

Set of package names with expanded dependency lists (for Sandbox tab tree view).

§sandbox_loaded: bool

Whether sandbox info has been resolved for the current session.

§sandbox_error: Option<String>

Error message from sandbox resolution, if any.

§selected_optdepends: HashMap<String, HashSet<String>>

Selected optional dependencies to install with their packages. Maps package name -> set of selected optional dependency names.

§cascade_mode: CascadeMode

Current cascade removal strategy for this session.

§cached_reverse_deps_report: Option<ReverseDependencyReport>

Cached reverse dependency report for Remove actions (populated during summary computation). This avoids redundant resolution when switching to the Deps tab.

§

PreflightExec

Preflight execution screen with log and sticky sidebar.

Fields

§items: Vec<PackageItem>

Packages being processed.

§action: PreflightAction

Action being executed (install/remove/downgrade).

§tab: PreflightTab

Tab to display while executing.

§verbose: bool

Whether verbose logging is enabled.

§log_lines: Vec<String>

Execution log lines.

§abortable: bool

Whether the operation can be aborted.

§header_chips: PreflightHeaderChips

Header chip metrics displayed in the sidebar.

§success: Option<bool>

Execution result: Some(true) for success, Some(false) for failure, None if not yet completed.

§

PostSummary

Post-transaction summary with results and follow-ups.

Fields

§success: bool

Whether the operation succeeded.

§changed_files: usize

Number of files changed.

§pacnew_count: usize

Number of .pacnew files created.

§pacsave_count: usize

Number of .pacsave files created.

§services_pending: Vec<String>

Services pending restart.

§snapshot_label: Option<String>

Snapshot label if created.

§

Help

Help overlay with keybindings. Non-interactive; dismissed with Esc/Enter.

§

ConfirmRemove

Confirmation dialog for removing the given items.

Fields

§items: Vec<PackageItem>

Package items to remove.

§

SystemUpdate

System update dialog with multi-select options and optional country.

Fields

§do_mirrors: bool

Whether to update Arch mirrors using reflector.

§do_pacman: bool

Whether to update system packages via pacman.

§force_sync: bool

Whether to force sync databases (pacman -Syyu instead of -Syu).

§do_aur: bool

Whether to update AUR packages via paru/yay.

§do_cache: bool

Whether to remove caches (pacman and AUR helper).

§country_idx: usize

Index into countries for the reflector --country argument.

§countries: Vec<String>

Available countries to choose from for reflector.

§mirror_count: u16

Requested mirror count to fetch/rank.

§cursor: usize

Cursor row in the dialog (0..=4)

§

News

Arch Linux News: list of recent items with selection.

Fields

§items: Vec<NewsFeedItem>

Latest news feed items (Arch news, advisories, updates, comments).

§selected: usize

Selected row index.

§scroll: u16

Scroll offset (lines) for the news list.

§

Announcement

Application announcement: markdown content displayed at startup.

Fields

§title: String

Title to display in the modal header.

§content: String

Markdown content to display.

§id: String

Unique identifier for this announcement (version string or remote ID).

§scroll: u16

Scroll offset (lines) for long content.

§

Updates

Available package updates: list of update entries with scroll support.

Fields

§entries: Vec<(String, String, String)>

Update entries with package name, old version, and new version.

§scroll: u16

Scroll offset (lines) for the updates list.

§selected: usize

Selected row index.

§

OptionalDeps

TUI Optional Dependencies chooser: selectable rows with install status.

Fields

§rows: Vec<OptionalDepRow>

Rows to display (pre-filtered by environment/distro).

§selected: usize

Selected row index.

§

ScanConfig

Select which scans to run before executing the AUR scan.

Fields

§do_clamav: bool

Whether to run ClamAV (clamscan).

§do_trivy: bool

Whether to run Trivy filesystem scan.

§do_semgrep: bool

Whether to run Semgrep static analysis.

§do_shellcheck: bool

Whether to run ShellCheck on PKGBUILD/.install.

§do_virustotal: bool

Whether to run VirusTotal hash lookups.

§do_custom: bool

Whether to run custom suspicious-pattern scan (PKGBUILD/.install).

§do_sleuth: bool

Whether to run aur-sleuth (LLM audit).

§cursor: usize

Cursor row in the dialog.

§

GnomeTerminalPrompt

Prompt to install GNOME Terminal at startup on GNOME when not present.

§

VirusTotalSetup

Setup dialog for VirusTotal API key.

Fields

§input: String

User-entered API key buffer.

§cursor: usize

Cursor position within the input buffer.

§

ImportHelp

Information dialog explaining the Import file format.

§

NewsSetup

Setup dialog for startup news popup configuration.

Fields

§show_arch_news: bool

Whether to show Arch news.

§show_advisories: bool

Whether to show security advisories.

§show_aur_updates: bool

Whether to show AUR updates.

§show_aur_comments: bool

Whether to show AUR comments.

§show_pkg_updates: bool

Whether to show official package updates.

§max_age_days: Option<u32>

Maximum age of news items in days (7, 30, or 90).

§cursor: usize

Current cursor position (0-5 for toggles, 6-8 for date buttons).

§

PasswordPrompt

Password prompt for sudo authentication.

Fields

§purpose: PasswordPurpose

Purpose of the password prompt.

§items: Vec<PackageItem>

Packages involved in the operation.

§input: String

User input buffer for password.

§cursor: usize

Cursor position within the input buffer.

§error: Option<String>

Error message if password was incorrect.

Trait Implementations§

Source§

impl Clone for Modal

Source§

fn clone(&self) -> Modal

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Modal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Modal

Source§

fn default() -> Modal

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Modal

§

impl RefUnwindSafe for Modal

§

impl Send for Modal

§

impl Sync for Modal

§

impl Unpin for Modal

§

impl UnwindSafe for Modal

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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