pub struct Model {Show 60 fields
pub screen: Screen,
pub focus: Focus,
pub previous_focus: Option<Focus>,
pub reviews: Vec<ReviewSummary>,
pub current_review: Option<ReviewDetail>,
pub threads: Vec<ThreadSummary>,
pub current_thread: Option<ThreadDetail>,
pub all_comments: HashMap<String, Vec<Comment>>,
pub current_diff: Option<ParsedDiff>,
pub current_file_content: Option<FileContent>,
pub file_cache: HashMap<String, FileCacheEntry>,
pub highlighter: Highlighter,
pub highlighted_lines: Vec<Vec<HighlightSpan>>,
pub list_index: usize,
pub list_scroll: usize,
pub file_index: usize,
pub sidebar_index: usize,
pub sidebar_scroll: usize,
pub collapsed_files: HashSet<String>,
pub diff_scroll: usize,
pub diff_cursor: usize,
pub expanded_thread: Option<String>,
pub filter: ReviewFilter,
pub sidebar_visible: bool,
pub diff_view_mode: DiffViewMode,
pub diff_wrap: bool,
pub pending_editor_request: Option<EditorRequest>,
pub pending_comment_request: Option<CommentRequest>,
pub inline_editor: Option<InlineEditor>,
pub pending_comment_submission: Option<PendingCommentSubmission>,
pub command_palette_input: String,
pub command_palette_selection: usize,
pub command_palette_commands: Vec<CommandSpec>,
pub command_palette_mode: PaletteMode,
pub visual_mode: bool,
pub visual_anchor: usize,
pub comment_input: String,
pub comment_target_line: Option<u32>,
pub width: u16,
pub height: u16,
pub layout_mode: LayoutMode,
pub theme: Theme,
pub pre_palette_theme: Option<String>,
pub config: UiConfig,
pub thread_positions: RefCell<HashMap<String, usize>>,
pub max_stream_row: Cell<usize>,
pub line_map: RefCell<HashMap<usize, i64>>,
pub cursor_stops: RefCell<Vec<usize>>,
pub search_input: String,
pub search_active: bool,
pub repo_path: Option<String>,
pub editor_name: String,
pub flash_message: Option<String>,
pub should_quit: bool,
pub needs_redraw: bool,
pub last_list_scroll: Option<(Instant, i8)>,
pub last_sidebar_scroll: Option<(Instant, i8)>,
pub pending_review: Option<String>,
pub pending_file: Option<String>,
pub pending_thread: Option<String>,
}Expand description
Application state
Fields§
§screen: Screen§focus: Focus§previous_focus: Option<Focus>§reviews: Vec<ReviewSummary>§current_review: Option<ReviewDetail>§threads: Vec<ThreadSummary>§current_thread: Option<ThreadDetail>§all_comments: HashMap<String, Vec<Comment>>§current_diff: Option<ParsedDiff>Parsed diff for the currently selected file
current_file_content: Option<FileContent>File content for context when no diff available
file_cache: HashMap<String, FileCacheEntry>Cache for all files in the review stream
highlighter: HighlighterSyntax highlighter
highlighted_lines: Vec<Vec<HighlightSpan>>Cached highlighted lines for current diff (indexed by display line)
list_index: usizeSelected index in review list
list_scroll: usizeScroll offset in review list
file_index: usizeSelected file index in sidebar
Selected index in the flat sidebar tree
Scroll offset for sidebar tree
collapsed_files: HashSet<String>Files whose thread children are collapsed
diff_scroll: usizeScroll offset in diff pane
diff_cursor: usizeLine cursor position in diff pane (stream row index)
expanded_thread: Option<String>Currently expanded thread ID
filter: ReviewFilterReview list filter
Show sidebar in overlay mode
diff_view_mode: DiffViewModeDiff view mode (unified or side-by-side)
diff_wrap: boolWrap diff lines when enabled
pending_editor_request: Option<EditorRequest>Pending editor launch request
pending_comment_request: Option<CommentRequest>Pending comment-via-$EDITOR request (Shift+A)
inline_editor: Option<InlineEditor>Inline comment editor state (a)
pending_comment_submission: Option<PendingCommentSubmission>Comment ready for persistence (from inline editor submit)
command_palette_input: String§command_palette_selection: usize§command_palette_commands: Vec<CommandSpec>§command_palette_mode: PaletteMode§visual_mode: boolWhether visual line selection mode is active (Shift+V)
visual_anchor: usizeAnchor stream row where visual mode was entered
comment_input: String§comment_target_line: Option<u32>§width: u16§height: u16§layout_mode: LayoutMode§theme: Theme§pre_palette_theme: Option<String>Theme name before opening the picker (for revert on Esc)
config: UiConfig§thread_positions: RefCell<HashMap<String, usize>>Thread positions captured during rendering (thread_id → stream_row)
max_stream_row: Cell<usize>Total stream rows from the last render pass (for cursor clamping)
line_map: RefCell<HashMap<usize, i64>>Diff line mapping captured during rendering: stream_row → new-side line number.
Populated for every diff line (including all wrapped rows).
cursor_stops: RefCell<Vec<usize>>Sorted list of stream rows that are valid cursor stops (one per logical item). Populated during rendering; used by cursor navigation to skip wrapped/padding rows.
search_input: String§search_active: bool§repo_path: Option<String>§editor_name: String§flash_message: Option<String>Shown in the help bar area until the next keypress.
should_quit: bool§needs_redraw: boolFlag indicating the view needs a full redraw
last_list_scroll: Option<(Instant, i8)>§pending_review: Option<String>§pending_file: Option<String>§pending_thread: Option<String>Implementations§
Source§impl Model
impl Model
Sourcepub fn filtered_reviews(&self) -> Vec<&ReviewSummary>
pub fn filtered_reviews(&self) -> Vec<&ReviewSummary>
Get filtered reviews based on current filter and search query
Sourcepub fn files_with_threads(&self) -> Vec<FileEntry>
pub fn files_with_threads(&self) -> Vec<FileEntry>
Get unique files from threads and the diff file cache for the sidebar.
Sourcepub fn threads_for_current_file(&self) -> Vec<&ThreadSummary>
pub fn threads_for_current_file(&self) -> Vec<&ThreadSummary>
Get threads for the currently selected file
Sourcepub fn visible_threads_for_current_file(&self) -> Vec<&ThreadSummary>
pub fn visible_threads_for_current_file(&self) -> Vec<&ThreadSummary>
Get threads that are visible in the current diff (all threads for the file)
Build a flat list of sidebar items: files with their threads as children
Sourcepub const fn list_visible_height(&self) -> usize
pub const fn list_visible_height(&self) -> usize
Get the visible height for the review list (accounting for chrome)
Sourcepub fn sync_active_file_cache(&mut self)
pub fn sync_active_file_cache(&mut self)
Sync current file fields from the file cache
Auto Trait Implementations§
impl !Freeze for Model
impl !RefUnwindSafe for Model
impl Send for Model
impl !Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.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, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more