pub struct App {Show 27 fields
pub nav: NavigationState,
pub catalog: CatalogStore,
pub search_engine: SearchEngine,
pub search_query: String,
pub search_active: bool,
pub filtered_indices: Vec<usize>,
pub subprocess_output: Vec<OutputLine>,
pub subprocess_handle: Option<SubprocessHandle>,
pub validation_gates: Vec<ValidationGate>,
pub export_state: ExportBuilderState,
pub model_policy_state: ModelPolicyBuilderState,
pub model_policy_stage: Option<ModelPolicyStage>,
pub status_message: Option<(String, Instant)>,
pub session_id: Uuid,
pub should_quit: bool,
pub no_color: bool,
pub theme_mode: ThemeMode,
pub workspace_root: PathBuf,
pub running_gate: Option<String>,
pub running_gate_start: Option<Instant>,
pub pending_subprocess: Option<Receiver<Result<SubprocessHandle>>>,
pub provider_filter: Option<String>,
pub harness_filter: Option<String>,
pub show_help_overlay: bool,
pub completion_suggestions: Vec<String>,
pub completion_index: usize,
pub dirty: bool,
}Expand description
Main application state.
Fields§
§catalog: CatalogStore§search_engine: SearchEngine§search_query: String§search_active: bool§filtered_indices: Vec<usize>§subprocess_output: Vec<OutputLine>§subprocess_handle: Option<SubprocessHandle>§validation_gates: Vec<ValidationGate>§export_state: ExportBuilderState§model_policy_state: ModelPolicyBuilderState§model_policy_stage: Option<ModelPolicyStage>Set while a model-policy subprocess (apply or chained integrity
refresh) is running; drives completion handling in tick().
status_message: Option<(String, Instant)>§session_id: Uuid§should_quit: bool§no_color: bool§theme_mode: ThemeModeResolved theme mode (Dark/Light) for the session; toggled at runtime
via the t keybinding (Req 35.6). Defaults to Dark; main overrides
it from the --theme flag / system detection.
workspace_root: PathBuf§running_gate: Option<String>Name of the currently running validation gate (for status tracking). When set, prevents concurrent execution of the same gate.
running_gate_start: Option<Instant>Timestamp when the currently running gate started (for animated indicator).
pending_subprocess: Option<Receiver<Result<SubprocessHandle>>>Pending subprocess spawn result — polled in tick() to avoid block_on inside tokio runtime.
provider_filter: Option<String>§harness_filter: Option<String>§show_help_overlay: bool§completion_suggestions: Vec<String>§completion_index: usize§dirty: boolDirty flag for async event loop — render only when true (250ms tick resets).
Implementations§
Source§impl App
impl App
pub fn new( catalog: CatalogStore, workspace_root: PathBuf, session_id: Uuid, no_color: bool, ) -> Self
Sourcepub fn handle_key_event(&mut self, key: KeyEvent)
pub fn handle_key_event(&mut self, key: KeyEvent)
Handle a key event. Dispatches based on search mode and current view.
Sourcepub fn mark_dirty(&mut self)
pub fn mark_dirty(&mut self)
Mark the app as dirty (needs rendering) — used by async event loop.
Sourcepub fn reload_catalog(&mut self)
pub fn reload_catalog(&mut self)
Reload the entire catalog from the workspace root and refresh the filtered view (Task 9.1 — live reload on filesystem change).
Best-effort: catalog load errors are surfaced via the status message but never panic, so a malformed edit keeps the previous render usable.
Sourcepub fn reload_catalog_file(&mut self, path: &Path) -> ReloadOutcome
pub fn reload_catalog_file(&mut self, path: &Path) -> ReloadOutcome
Reload a single changed catalog file in place (Task 9.1).
Returns the [ReloadOutcome] so callers (and tests) can observe whether
the file was reloaded, retained on parse error, or unchanged.
Sourcepub fn tick(&mut self)
pub fn tick(&mut self)
Tick: clear expired status messages, drain subprocess output with sanitization, and check subprocess timeout and completion.
Sourcepub fn render(&mut self, frame: &mut Frame<'_>)
pub fn render(&mut self, frame: &mut Frame<'_>)
Render the full UI — v2 primary surface: tab bar + tab body.
Sourcepub fn render_tab(&self, area: Rect, frame: &mut Frame<'_>, theme: &Theme)
pub fn render_tab(&self, area: Rect, frame: &mut Frame<'_>, theme: &Theme)
Render the active v2 operator-console tab into area (Task 11.3).
Dispatches to the v2 widgets based on self.nav.current_tab. The
Dependencies tab renders the real catalog dependency graph and Overview a
catalog summary; tabs whose live data depends on a workspace scan/index
(coverage, violations, audit) render their widget with empty data until
that pipeline is wired into the TUI flow.
Source§impl App
impl App
Sourcepub fn update_completion_suggestions(&mut self)
pub fn update_completion_suggestions(&mut self)
Update tab completion suggestions based on current export builder field.
Sourcepub fn get_provider_list(&self) -> Vec<(String, usize)>
pub fn get_provider_list(&self) -> Vec<(String, usize)>
Get provider list with counts.
Auto Trait Implementations§
impl !RefUnwindSafe for App
impl !UnwindSafe for App
impl Freeze for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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