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.
Loading
Loading indicator shown during background computation.
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: PreflightHeaderChipsHeader chip metrics for the operation.
ConfirmBatchUpdate
Confirmation dialog for batch updates that may cause dependency conflicts.
Fields
items: Vec<PackageItem>Package items to update.
ConfirmAurUpdate
Confirmation dialog for continuing AUR update after pacman failed.
Preflight
Preflight summary before executing any action.
Fields
items: Vec<PackageItem>Packages selected for the operation.
action: PreflightActionAction to perform (install/remove/downgrade).
tab: PreflightTabCurrently active preflight tab.
summary: Option<Box<PreflightSummaryData>>Aggregated summary information for versions, sizes, and risk cues.
header_chips: PreflightHeaderChipsHeader chip data shared across summary, execution, and post-summary screens.
dependency_info: Vec<DependencyInfo>Resolved dependency information (populated when Deps tab is accessed).
dep_tree_expanded: HashSet<String>Set of dependency names with expanded tree nodes (for tree view).
file_info: Vec<PackageFileInfo>File information (populated when Files tab is accessed).
file_tree_expanded: HashSet<String>Set of package names with expanded file lists (for Files tab tree view).
service_info: Vec<ServiceImpact>Service impact information (populated when Services tab is accessed).
sandbox_info: Vec<SandboxInfo>Sandbox information for AUR packages (populated when Sandbox tab is accessed).
sandbox_selected: usizeSelected 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).
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: CascadeModeCurrent 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: PreflightActionAction being executed (install/remove/downgrade).
tab: PreflightTabTab to display while executing.
header_chips: PreflightHeaderChipsHeader chip metrics displayed in the sidebar.
PostSummary
Post-transaction summary with results and follow-ups.
Fields
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
News
Arch Linux News: list of recent items with selection.
Fields
items: Vec<NewsFeedItem>Latest news feed items (Arch news, advisories, updates, comments).
Announcement
Application announcement: markdown content displayed at startup.
Fields
Updates
Available package updates: list of update entries with scroll support.
Fields
OptionalDeps
TUI Optional Dependencies chooser: selectable rows with install status.
Fields
rows: Vec<OptionalDepRow>Rows to display (pre-filtered by environment/distro).
ScanConfig
Select which scans to run before executing the AUR scan.
Fields
GnomeTerminalPrompt
Prompt to install GNOME Terminal at startup on GNOME when not present.
VirusTotalSetup
Setup dialog for VirusTotal API key.
Fields
ImportHelp
Information dialog explaining the Import file format.
NewsSetup
Setup dialog for startup news popup configuration.
Fields
PasswordPrompt
Password prompt for sudo authentication.
Trait Implementations§
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for 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