Skip to main content

App

Struct App 

Source
pub struct App {
Show 62 fields pub should_quit: bool, pub repo_info: Option<RepoInfo>, pub selected_index: usize, pub show_detail: bool, pub input_mode: InputMode, pub filter_text: String, pub filter_query: FilterQuery, pub branches: Vec<String>, pub branch_selected_index: usize, pub file_statuses: Vec<FileStatus>, pub status_selected_index: usize, pub commit_message: String, pub commit_type: Option<CommitType>, pub status_message: Option<String>, pub is_loading: bool, pub show_help: bool, pub view_mode: ViewMode, pub topology_cache: Option<BranchTopology>, pub topology_selected_index: usize, pub topology_scroll_offset: usize, pub commit_suggestions: Vec<CommitSuggestion>, pub suggestion_selected_index: usize, pub detail_scroll_offset: usize, pub detail_selected_file: usize, pub detail_diff_cache: Option<CommitDiff>, pub stats_cache: Option<RepoStats>, pub stats_selected_index: usize, pub stats_scroll_offset: usize, pub heatmap_cache: Option<FileHeatmap>, pub heatmap_selected_index: usize, pub heatmap_scroll_offset: usize, pub file_history_cache: Option<Vec<FileHistoryEntry>>, pub file_history_path: Option<String>, pub file_history_selected_index: usize, pub file_history_scroll_offset: usize, pub timeline_cache: Option<ActivityTimeline>, pub blame_cache: Option<Vec<BlameLine>>, pub blame_path: Option<String>, pub blame_selected_index: usize, pub blame_scroll_offset: usize, pub ownership_cache: Option<CodeOwnership>, pub ownership_selected_index: usize, pub ownership_scroll_offset: usize, pub stash_cache: Option<Vec<StashEntry>>, pub stash_selected_index: usize, pub stash_scroll_offset: usize, pub patch_cache: Option<FilePatch>, pub patch_scroll_offset: usize, pub filter_presets: FilterPresets, pub preset_save_slot: usize, pub preset_save_name: String, pub branch_compare_cache: Option<BranchCompare>, pub branch_compare_tab: CompareTab, pub branch_compare_selected_index: usize, pub branch_compare_scroll_offset: usize, pub relevance_mode: bool, pub working_files: Vec<String>, pub related_files_cache: Option<RelatedFiles>, pub related_files_selected_index: usize, pub related_files_scroll_offset: usize, pub layout_mode: LayoutMode, pub left_panel_ratio: u16, /* private fields */
}
Expand description

アプリケーション状態

Fields§

§should_quit: bool

アプリケーションが終了すべきかどうか

§repo_info: Option<RepoInfo>

リポジトリ情報

§selected_index: usize

選択中のイベントインデックス(filtered_indices内)

§show_detail: bool

詳細表示モード

§input_mode: InputMode

入力モード

§filter_text: String

フィルタ文字列

§filter_query: FilterQuery

パース済みフィルタクエリ

§branches: Vec<String>

ブランチ一覧

§branch_selected_index: usize

ブランチ選択インデックス

§file_statuses: Vec<FileStatus>

ファイルステータス一覧

§status_selected_index: usize

ステータス選択インデックス

§commit_message: String

コミットメッセージ

§commit_type: Option<CommitType>

選択されたコミットタイプ

§status_message: Option<String>

ステータスメッセージ(操作結果表示用)

§is_loading: bool

バックグラウンド読み込み中フラグ

§show_help: bool

ヘルプ表示フラグ

§view_mode: ViewMode

表示モード(Normal/Compact/Grid)

§topology_cache: Option<BranchTopology>

トポロジーキャッシュ

§topology_selected_index: usize

トポロジービューの選択インデックス

§topology_scroll_offset: usize

トポロジービューのスクロールオフセット

§commit_suggestions: Vec<CommitSuggestion>

コミット提案一覧

§suggestion_selected_index: usize

提案選択インデックス

§detail_scroll_offset: usize

詳細ビューのスクロールオフセット

§detail_selected_file: usize

詳細ビューで選択中のファイルインデックス

§detail_diff_cache: Option<CommitDiff>

詳細ビューのdiffキャッシュ

§stats_cache: Option<RepoStats>

統計情報キャッシュ

§stats_selected_index: usize

統計ビューで選択中の著者インデックス

§stats_scroll_offset: usize

統計ビューのスクロールオフセット

§heatmap_cache: Option<FileHeatmap>

ヒートマップキャッシュ

§heatmap_selected_index: usize

ヒートマップビューで選択中のファイルインデックス

§heatmap_scroll_offset: usize

ヒートマップビューのスクロールオフセット

§file_history_cache: Option<Vec<FileHistoryEntry>>

ファイル履歴キャッシュ

§file_history_path: Option<String>

ファイル履歴の対象ファイルパス

§file_history_selected_index: usize

ファイル履歴ビューで選択中のインデックス

§file_history_scroll_offset: usize

ファイル履歴ビューのスクロールオフセット

§timeline_cache: Option<ActivityTimeline>

活動タイムラインキャッシュ

§blame_cache: Option<Vec<BlameLine>>

Blameキャッシュ

§blame_path: Option<String>

Blame対象ファイルパス

§blame_selected_index: usize

Blameビューで選択中の行インデックス

§blame_scroll_offset: usize

Blameビューのスクロールオフセット

§ownership_cache: Option<CodeOwnership>

コードオーナーシップキャッシュ

§ownership_selected_index: usize

コードオーナーシップビューで選択中のインデックス

§ownership_scroll_offset: usize

コードオーナーシップビューのスクロールオフセット

§stash_cache: Option<Vec<StashEntry>>

Stash一覧キャッシュ

§stash_selected_index: usize

Stashビューで選択中のインデックス

§stash_scroll_offset: usize

Stashビューのスクロールオフセット

§patch_cache: Option<FilePatch>

パッチキャッシュ

§patch_scroll_offset: usize

パッチビューのスクロールオフセット

§filter_presets: FilterPresets

フィルタプリセット

§preset_save_slot: usize

プリセット保存ダイアログ: 選択中のスロット (1-5)

§preset_save_name: String

プリセット保存ダイアログ: プリセット名入力

§branch_compare_cache: Option<BranchCompare>

ブランチ比較キャッシュ

§branch_compare_tab: CompareTab

現在のタブ (Ahead/Behind)

§branch_compare_selected_index: usize

選択中のインデックス

§branch_compare_scroll_offset: usize

スクロールオフセット

§relevance_mode: bool

関連モードが有効かどうか

§working_files: Vec<String>

ワーキングツリーの変更ファイル

§related_files_cache: Option<RelatedFiles>

関連ファイルキャッシュ

§related_files_selected_index: usize

関連ファイルビューで選択中のインデックス

§related_files_scroll_offset: usize

関連ファイルビューのスクロールオフセット

§layout_mode: LayoutMode

現在のレイアウトモード

§left_panel_ratio: u16

左パネルの比率(0-100)

Implementations§

Source§

impl App

Source

pub fn new() -> Self

Source

pub fn load(&mut self, repo_info: RepoInfo, events: Vec<GitEvent>)

リポジトリ情報とイベントを設定

Source

pub fn set_repo(&mut self, repo: Repository)

キャッシュ用リポジトリを設定

Source

pub fn get_repo(&self) -> Option<&Repository>

キャッシュ済みリポジトリの参照を取得

Source

pub fn set_head_hash(&mut self, hash: String)

HEADハッシュを設定(@キージャンプ用)

Source

pub fn head_hash(&self) -> Option<&str>

HEADハッシュを取得

Source

pub fn events(&self) -> Vec<&GitEvent>

フィルタ後のイベント一覧を取得

Source

pub fn all_events(&self) -> &[GitEvent]

全イベントの参照を取得

Source

pub fn event_count(&self) -> usize

フィルタ後のイベント数を取得

Source

pub fn quit(&mut self)

qキーで終了

Source

pub fn move_up(&mut self)

選択を上に移動

Source

pub fn move_down(&mut self)

選択を下に移動

Source

pub fn move_to_top(&mut self)

先頭に移動 (gg)

Source

pub fn jump_to_head(&mut self)

HEADにジャンプ (@キー) フィルタ中でもHEADの位置に移動

Source

pub fn move_to_bottom(&mut self)

末尾に移動 (G)

Source

pub fn page_down(&mut self, page_size: usize)

ページダウン (Ctrl+d)

Source

pub fn page_up(&mut self, page_size: usize)

ページアップ (Ctrl+u)

Source

pub fn toggle_help(&mut self)

ヘルプ表示を切り替え

Source

pub fn close_help(&mut self)

ヘルプを閉じる

Source

pub fn cycle_view_mode(&mut self)

表示モードをトグル切り替え(Normal ↔ Compact)

Source

pub fn effective_layout_mode(&self, width: u16) -> LayoutMode

有効なレイアウトモードを取得(画面幅に応じて自動決定)

画面幅がSPLIT_PANEL_THRESHOLDを超え、かつlayout_modeがSplitPanelの場合に 2ペインモードが有効になる。

Source

pub fn update_detail_for_split_panel(&mut self)

2ペインモード時に詳細パネル用のdiffを更新

選択中のコミットが変わった場合にdiffキャッシュをクリアする

Source

pub fn toggle_layout_mode(&mut self)

レイアウトモードをトグル切り替え(Single ↔ SplitPanel)

Source

pub fn adjust_panel_ratio(&mut self, delta: i16)

左パネルの比率を調整

delta: 調整値(正で拡大、負で縮小) 比率は40%から85%の範囲に制限

Source

pub fn jump_to_next_label(&mut self)

次のラベル付きコミットにジャンプ (] キー)

Source

pub fn jump_to_prev_label(&mut self)

前のラベル付きコミットにジャンプ ([ キー)

Source

pub fn selected_event(&self) -> Option<&GitEvent>

選択中のイベントを取得

Source

pub fn open_detail(&mut self)

詳細表示を開く

Source

pub fn close_detail(&mut self)

詳細表示を閉じる

Source

pub fn set_detail_diff(&mut self, diff: CommitDiff)

詳細ビューでdiffをキャッシュ

Source

pub fn detail_move_up(&mut self)

詳細ビューでファイル選択を上に移動

Source

pub fn detail_move_down(&mut self)

詳細ビューでファイル選択を下に移動

Source

pub fn detail_adjust_scroll(&mut self, visible_lines: usize)

詳細ビューのスクロール調整(表示可能行数を考慮)

Source

pub fn start_filter(&mut self)

フィルタモードを開始

Source

pub fn end_filter(&mut self)

フィルタモードを終了

Source

pub fn filter_push(&mut self, c: char)

フィルタ文字を追加

Source

pub fn filter_pop(&mut self)

フィルタ文字を削除

Source

pub fn filter_clear(&mut self)

フィルタをクリア

Source

pub fn preload_file_cache( &mut self, get_files: impl Fn(&str) -> Option<Vec<String>>, )

ファイルキャッシュをプリロード(ファイルフィルタ有効時) 注意: UIブロッキングを防ぐため、最新N件のみキャッシュする

Source

pub fn clear_file_cache(&mut self)

ファイルキャッシュをクリア

Source

pub fn file_cache_is_empty(&self) -> bool

ファイルキャッシュが空かどうか

Source

pub fn reapply_filter(&mut self)

フィルタを再適用(キャッシュ更新後に使用)

Source

pub fn repo_name(&self) -> &str

リポジトリ名を取得

Source

pub fn branch_name(&self) -> &str

ブランチ名を取得

Source

pub fn start_branch_select(&mut self, branches: Vec<String>)

ブランチ選択モードを開始

Source

pub fn end_branch_select(&mut self)

ブランチ選択モードを終了

Source

pub fn branch_move_up(&mut self)

ブランチ選択を上に移動

Source

pub fn branch_move_down(&mut self)

ブランチ選択を下に移動

Source

pub fn selected_branch(&self) -> Option<&str>

選択中のブランチ名を取得

Source

pub fn update_branch(&mut self, branch: String)

ブランチ切り替え後にリポジトリ情報を更新

Source

pub fn all_events_replace(&mut self, events: Vec<GitEvent>)

イベント一覧を置き換え

Source

pub fn filtered_indices_reset(&mut self, count: usize)

フィルタインデックスをリセット

Source

pub fn start_status_view(&mut self, statuses: Vec<FileStatus>)

ステータスビューモードを開始

Source

pub fn end_status_view(&mut self)

ステータスビューモードを終了

Source

pub fn status_move_up(&mut self)

ステータス選択を上に移動

Source

pub fn status_move_down(&mut self)

ステータス選択を下に移動

Source

pub fn selected_file_status(&self) -> Option<&FileStatus>

選択中のファイルステータスを取得

Source

pub fn update_file_statuses(&mut self, statuses: Vec<FileStatus>)

ファイルステータス一覧を更新

Source

pub fn set_status_message(&mut self, msg: String)

ステータスメッセージを設定

Source

pub fn start_commit_input(&mut self)

コミット入力モードを開始

Source

pub fn end_commit_input(&mut self)

コミット入力モードを終了

Source

pub fn select_commit_type(&mut self, commit_type: CommitType)

コミットタイプを選択

Source

pub fn commit_message_push(&mut self, c: char)

コミットメッセージに文字を追加

Source

pub fn commit_message_pop(&mut self)

コミットメッセージから文字を削除

Source

pub fn commit_message_clear(&mut self)

コミットメッセージをクリア

Source

pub fn start_loading(&mut self)

読み込み中状態を開始

Source

pub fn finish_loading(&mut self)

読み込み中状態を終了

Source

pub fn append_events(&mut self, events: Vec<GitEvent>)

イベントを追加(バックグラウンド読み込み用)

Source

pub fn start_topology_view(&mut self, topology: BranchTopology)

トポロジービューを開始

Source

pub fn end_topology_view(&mut self)

トポロジービューを終了

Source

pub fn topology_move_up(&mut self)

トポロジー選択を上に移動

Source

pub fn topology_move_down(&mut self)

トポロジー選択を下に移動

Source

pub fn topology_adjust_scroll(&mut self, visible_lines: usize)

トポロジービューの表示可能行数を設定してスクロールを調整

Source

pub fn selected_topology_branch(&self) -> Option<&str>

選択中のトポロジーブランチ名を取得

Source

pub fn filter_description(&self) -> String

フィルタクエリの説明を取得

Source

pub fn generate_commit_suggestions(&mut self)

コミット提案を生成

Source

pub fn apply_suggestion(&mut self, index: usize)

提案を適用

Source

pub fn suggestion_move_up(&mut self)

提案選択を上に移動

Source

pub fn suggestion_move_down(&mut self)

提案選択を下に移動

Source

pub fn start_stats_view(&mut self, stats: RepoStats)

統計ビューを開始

Source

pub fn end_stats_view(&mut self)

統計ビューを終了

Source

pub fn export_stats(&mut self) -> Option<String>

統計情報をエクスポート

Source

pub fn stats_move_up(&mut self)

統計ビューで選択を上に移動

Source

pub fn stats_move_down(&mut self)

統計ビューで選択を下に移動

Source

pub fn stats_adjust_scroll(&mut self, visible_lines: usize)

統計ビューのスクロール調整

Source

pub fn selected_author(&self) -> Option<&str>

選択中の著者名を取得

Source

pub fn filter_by_author(&mut self, author: &str)

著者でフィルタを適用

Source

pub fn start_heatmap_view(&mut self, heatmap: FileHeatmap)

ヒートマップビューを開始

Source

pub fn end_heatmap_view(&mut self)

ヒートマップビューを終了

Source

pub fn export_heatmap(&mut self) -> Option<String>

ヒートマップをエクスポート

Source

pub fn heatmap_increase_aggregation(&mut self)

ヒートマップの集約レベルを次へ切り替え(+キー)

Source

pub fn heatmap_decrease_aggregation(&mut self)

ヒートマップの集約レベルを前へ切り替え(-キー)

Source

pub fn heatmap_move_up(&mut self)

ヒートマップビューで選択を上に移動

Source

pub fn heatmap_move_down(&mut self)

ヒートマップビューで選択を下に移動

Source

pub fn heatmap_adjust_scroll(&mut self, visible_lines: usize)

ヒートマップビューのスクロール調整

Source

pub fn selected_heatmap_file(&self) -> Option<&str>

選択中のファイルパスを取得

Source

pub fn filter_by_file(&mut self, file_path: &str)

ファイルでフィルタを適用

Source

pub fn start_file_history_view( &mut self, path: String, history: Vec<FileHistoryEntry>, )

ファイル履歴ビューを開始

Source

pub fn end_file_history_view(&mut self)

ファイル履歴ビューを終了

Source

pub fn file_history_move_up(&mut self)

ファイル履歴ビューで選択を上に移動

Source

pub fn file_history_move_down(&mut self)

ファイル履歴ビューで選択を下に移動

Source

pub fn file_history_adjust_scroll(&mut self, visible_lines: usize)

ファイル履歴ビューのスクロール調整

Source

pub fn selected_file_history(&self) -> Option<&FileHistoryEntry>

選択中のファイル履歴エントリを取得

Source

pub fn start_timeline_view(&mut self, timeline: ActivityTimeline)

タイムラインビューを開始

Source

pub fn end_timeline_view(&mut self)

タイムラインビューを終了

Source

pub fn export_timeline(&mut self) -> Option<String>

タイムラインをエクスポート

Source

pub fn start_blame_view(&mut self, path: String, blame: Vec<BlameLine>)

Blameビューを開始

Source

pub fn end_blame_view(&mut self)

Blameビューを終了

Source

pub fn blame_move_up(&mut self)

Blameビューで選択を上に移動

Source

pub fn blame_move_down(&mut self)

Blameビューで選択を下に移動

Source

pub fn blame_adjust_scroll(&mut self, visible_lines: usize)

Blameビューのスクロール調整

Source

pub fn selected_blame_line(&self) -> Option<&BlameLine>

選択中のBlame行を取得

Source

pub fn start_ownership_view(&mut self, ownership: CodeOwnership)

コードオーナーシップビューを開始

Source

pub fn end_ownership_view(&mut self)

コードオーナーシップビューを終了

Source

pub fn export_ownership(&mut self) -> Option<String>

コードオーナーシップをエクスポート

Source

pub fn ownership_move_up(&mut self)

コードオーナーシップビューで選択を上に移動

Source

pub fn ownership_move_down(&mut self)

コードオーナーシップビューで選択を下に移動

Source

pub fn ownership_adjust_scroll(&mut self, visible_lines: usize)

コードオーナーシップビューのスクロール調整

Source

pub fn selected_ownership_entry(&self) -> Option<&CodeOwnershipEntry>

選択中のオーナーシップエントリを取得

Source

pub fn start_stash_view(&mut self, stashes: Vec<StashEntry>)

Stashビューを開始

Source

pub fn end_stash_view(&mut self)

Stashビューを終了

Source

pub fn stash_move_up(&mut self)

Stashビューで選択を上に移動

Source

pub fn stash_move_down(&mut self)

Stashビューで選択を下に移動

Source

pub fn stash_adjust_scroll(&mut self, visible_lines: usize)

Stashビューのスクロール調整

Source

pub fn selected_stash_entry(&self) -> Option<&StashEntry>

選択中のStashエントリを取得

Source

pub fn update_stash_cache(&mut self, stashes: Vec<StashEntry>)

Stash一覧を更新

Source

pub fn start_patch_view(&mut self, patch: FilePatch)

パッチビューを開始

Source

pub fn end_patch_view(&mut self)

パッチビューを終了

Source

pub fn patch_scroll_up(&mut self)

パッチビューで上にスクロール

Source

pub fn patch_scroll_down(&mut self, visible_lines: usize)

パッチビューで下にスクロール

Source

pub fn apply_preset(&mut self, slot: usize)

フィルタプリセットを適用(1-5キー)

Source

pub fn start_preset_save(&mut self)

プリセット保存ダイアログを開始(Ctrl+S)

Source

pub fn end_preset_save(&mut self)

プリセット保存ダイアログを終了

Source

pub fn preset_slot_up(&mut self)

プリセット保存: スロット選択を上に移動

Source

pub fn preset_slot_down(&mut self)

プリセット保存: スロット選択を下に移動

Source

pub fn preset_name_push(&mut self, c: char)

プリセット保存: 名前入力に文字を追加

Source

pub fn preset_name_pop(&mut self)

プリセット保存: 名前入力から文字を削除

Source

pub fn save_preset(&mut self) -> bool

プリセットを保存

Source

pub fn delete_preset(&mut self, slot: usize)

プリセットを削除

Source

pub fn start_branch_compare_view(&mut self, compare: BranchCompare)

ブランチ比較ビューを開始

Source

pub fn end_branch_compare_view(&mut self)

ブランチ比較ビューを終了

Source

pub fn branch_compare_toggle_tab(&mut self)

タブを切り替え

Source

pub fn branch_compare_move_up(&mut self)

選択を上に移動

Source

pub fn branch_compare_move_down(&mut self)

選択を下に移動

Source

pub fn branch_compare_adjust_scroll(&mut self, visible_lines: usize)

スクロールを調整

Source

pub fn selected_branch_compare_commit(&self) -> Option<&CompareCommit>

現在選択中のコミットを取得

Source

pub fn toggle_relevance_mode(&mut self)

関連モードをトグル

Source

pub fn set_working_files(&mut self, files: Vec<String>)

ワーキングファイルを設定

Source

pub fn apply_relevance_sort(&mut self)

関連スコアを計算してソート適用

Source

pub fn get_relevance_score(&self, hash: &str) -> Option<f32>

指定したハッシュの関連スコアを取得

Source

pub fn is_relevance_mode(&self) -> bool

関連モードが有効かどうか

関連ファイルビューを開始

関連ファイルビューを終了

Source

pub fn related_files_move_down(&mut self)

関連ファイルビューで下に移動

Source

pub fn related_files_move_up(&mut self)

関連ファイルビューで上に移動

Source

pub fn related_files_adjust_scroll(&mut self, visible_lines: usize)

関連ファイルビューのスクロールを調整

Trait Implementations§

Source§

impl Default for App

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Freeze for App

§

impl RefUnwindSafe for App

§

impl Send for App

§

impl !Sync for App

§

impl Unpin 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.

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, 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.