pub struct App {Show 24 fields
pub should_quit: bool,
pub screen: AppScreen,
pub active_pane: ActivePane,
pub input_mode: InputMode,
pub input_purpose: InputPurpose,
pub tick_count: u64,
pub bg_rx: Receiver<BackgroundResult>,
pub input_buffer: String,
pub show_theme_panel: bool,
pub show_options_panel: bool,
pub editor: Editor,
pub show_editor_panel: bool,
pub editor_list_state: ListState,
pub current_theme_index: usize,
pub theme_list_state: ListState,
pub recent_repos: Vec<RepoHistoryEntry>,
pub browser_dir: PathBuf,
pub browser_entries: Vec<PathBuf>,
pub browser_list_state: ListState,
pub browser_return_screen: AppScreen,
pub tabs: Vec<RepoTab>,
pub active_tab_index: usize,
pub pending_editor_open: Option<Vec<PathBuf>>,
pub last_auto_refresh: Instant,
/* private fields */
}Fields§
§should_quit: bool§screen: AppScreen§active_pane: ActivePane§input_mode: InputMode§input_purpose: InputPurpose§tick_count: u64§bg_rx: Receiver<BackgroundResult>Receiver for results from background tasks.
input_buffer: String§show_theme_panel: boolWhether the theme selection panel is visible.
show_options_panel: boolWhether the options panel is visible.
editor: EditorConfigured editor for opening files.
show_editor_panel: boolWhether the editor picker panel is visible.
editor_list_state: ListStateListState for the editor picker list.
current_theme_index: usizeCurrently selected theme index (0-26).
theme_list_state: ListStateListState for the theme list widget.
recent_repos: Vec<RepoHistoryEntry>Recently opened repositories loaded from persistence.
browser_dir: PathBufCurrent directory being browsed in the directory picker.
browser_entries: Vec<PathBuf>Entries in the current browser directory.
browser_list_state: ListStateList state for the directory browser.
browser_return_screen: AppScreenScreen to return to when the directory browser is dismissed.
tabs: Vec<RepoTab>Open repository tabs.
active_tab_index: usizeIndex of the currently active tab.
pending_editor_open: Option<Vec<PathBuf>>When Some, the event loop in lib.rs suspends the TUI, opens ALL listed
paths in the configured terminal editor, then resumes.
Supports both single-file (vec![path]) and multi-file (vec![a, b, c]) opens.
last_auto_refresh: InstantTimestamp of the last auto-refresh.
Implementations§
Source§impl App
impl App
Source§impl App
impl App
pub fn cycle_theme_next(&mut self)
pub fn cycle_theme_prev(&mut self)
pub fn current_theme_name(&self) -> &'static str
Sourcepub fn save_theme(&self)
pub fn save_theme(&self)
Persist the current theme selection to disk.
Sourcepub fn save_session(&self)
pub fn save_session(&self)
Persist the paths of all open tabs for session restore.
pub fn open_repo(&mut self, path: PathBuf)
pub fn refresh(&mut self)
Sourcepub fn poll_background(&mut self)
pub fn poll_background(&mut self)
Process any pending results from background tasks. Call this once per tick in the event loop.
Sourcepub fn maybe_auto_refresh(&mut self)
pub fn maybe_auto_refresh(&mut self)
Reload only the staging area (unstaged + staged diffs). Check if enough time has passed and trigger a staging refresh.
pub fn refresh_staging(&mut self)
pub fn stage_selected(&mut self)
pub fn unstage_selected(&mut self)
pub fn stage_all(&mut self)
pub fn unstage_all(&mut self)
pub fn discard_selected(&mut self)
Sourcepub fn stage_files(&mut self, paths: Vec<String>)
pub fn stage_files(&mut self, paths: Vec<String>)
Stage multiple files at once.
Sourcepub fn unstage_files(&mut self, paths: Vec<String>)
pub fn unstage_files(&mut self, paths: Vec<String>)
Unstage multiple files at once.
Sourcepub fn discard_files(&mut self, paths: Vec<String>)
pub fn discard_files(&mut self, paths: Vec<String>)
Discard changes for multiple files at once.
pub fn create_commit(&mut self)
pub fn checkout_selected_branch(&mut self)
pub fn create_branch(&mut self)
pub fn delete_selected_branch(&mut self)
pub fn stash_save(&mut self)
pub fn stash_pop_selected(&mut self)
pub fn stash_drop_selected(&mut self)
Sourcepub fn load_commit_diff(&mut self)
pub fn load_commit_diff(&mut self)
Load the file list for the currently selected commit (phase 1 of two-phase loading).
Sourcepub fn load_single_file_diff(&mut self, file_index: usize, file_path: String)
pub fn load_single_file_diff(&mut self, file_index: usize, file_path: String)
Load the diff for a single file in the selected commit (phase 2).
Sourcepub fn load_diff_for_file_index(&mut self, file_index: usize)
pub fn load_diff_for_file_index(&mut self, file_index: usize)
Load the diff for a specific file index, skipping if it is already cached.
Sourcepub fn next_diff_file(&mut self)
pub fn next_diff_file(&mut self)
Switch to the next file in the commit diff list.
Sourcepub fn prev_diff_file(&mut self)
pub fn prev_diff_file(&mut self)
Switch to the previous file in the commit diff list.
Sourcepub fn search_commits(&mut self, query: String)
pub fn search_commits(&mut self, query: String)
Close the current repository and return to the welcome screen. Search commits by query string.
Sourcepub fn load_commit_diff_by_oid(&mut self)
pub fn load_commit_diff_by_oid(&mut self)
Load the diff for a commit by its OID (used by search results).
Sourcepub fn load_commit_range_diff(&mut self)
pub fn load_commit_range_diff(&mut self)
Load the combined diff for the currently selected commit range.
pub fn close_repo(&mut self)
Sourcepub fn refresh_browser(&mut self)
pub fn refresh_browser(&mut self)
Populate browser_entries with the contents of browser_dir.
Sourcepub fn open_browser(&mut self, start: PathBuf)
pub fn open_browser(&mut self, start: PathBuf)
Open the directory browser starting from a given path.
Sourcepub fn open_settings_in_editor(&mut self)
pub fn open_settings_in_editor(&mut self)
Open the TUI settings file (tui-settings.json) in the configured editor.
If no editor is configured, shows the file path in the status bar instead.
Sourcepub fn open_selected_in_editor(&mut self)
pub fn open_selected_in_editor(&mut self)
Load the diff for a selected staging file into the diff pane. Open the currently selected staging file in the configured editor.
Sourcepub fn open_commit_files_in_editor(&mut self)
pub fn open_commit_files_in_editor(&mut self)
Open files from the commit diff file list in the configured editor.
If selected_file_indices contains 2+ items, opens all of them.
Otherwise opens just the currently focused file (commit_diff_file_index).
pub fn load_staging_diff(&mut self)
pub fn fetch_remote(&mut self)
pub fn pull_rebase(&mut self)
pub fn push_branch(&mut self)
pub fn force_push_branch(&mut self)
pub fn merge_selected_branch(&mut self)
pub fn rebase_onto_selected_branch(&mut self)
Sourcepub fn open_commit_action_popup(&mut self)
pub fn open_commit_action_popup(&mut self)
Open the commit-action popup for the currently selected commit.
Sourcepub fn execute_commit_action(&mut self, action: CommitAction)
pub fn execute_commit_action(&mut self, action: CommitAction)
Execute a fully-built CommitAction on the pending OID in the background.
Sourcepub fn open_file_history(&mut self, file_path: String)
pub fn open_file_history(&mut self, file_path: String)
Open the file-history overlay for the given repo-relative path.
Sourcepub fn open_file_blame(&mut self, file_path: String)
pub fn open_file_blame(&mut self, file_path: String)
Open the blame overlay for the given repo-relative path.
Sourcepub fn prompt_delete_file(&mut self, file_path: String)
pub fn prompt_delete_file(&mut self, file_path: String)
Prompt to delete the given working-tree file (first keypress).
Sourcepub fn confirm_delete_file(&mut self)
pub fn confirm_delete_file(&mut self)
Execute the pending file deletion (second keypress confirmation).
pub fn revert_selected_commit(&mut self)
Sourcepub fn cherry_pick_selected(&mut self)
pub fn cherry_pick_selected(&mut self)
Cherry-pick the selected commit(s) onto the current branch.
If selected_commits has 2+ entries, cherry-picks all of them in
ascending OID order (oldest first so the history is linear).
Otherwise cherry-picks only the currently focused commit.
pub fn reset_to_selected_commit(&mut self, mode: &str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl !Sync 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
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