aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-04-08 01:49:52 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-04-08 01:51:50 +0300
commite4e14142b1d9708dd582c99555eeab342c057eba (patch)
treea66f62f0b04be63396a8026ea191de832c2f908b /src/app/state.rs
parent216aa99d5d911d6f2e16b4ebf9f1d40fc2e96474 (diff)
feat: add resizable sidebar sections
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index a0955a16..2904b206 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -476,6 +476,9 @@ pub(crate) enum DragTarget {
WorkspaceListScrollbar {
grab_row_offset: u16,
},
+ AgentPanelScrollbar {
+ grab_row_offset: u16,
+ },
PaneSplit {
path: Vec<bool>,
direction: Direction,
@@ -492,6 +495,7 @@ pub(crate) enum DragTarget {
grab_row_offset: u16,
},
SidebarDivider,
+ SidebarSectionDivider,
}
/// Active mouse drag on a split border or sidebar divider.
@@ -580,6 +584,7 @@ pub struct AppState {
pub release_notes: Option<ReleaseNotesState>,
pub keybind_help: KeybindHelpState,
pub workspace_scroll: usize,
+ pub agent_panel_scroll: usize,
// View geometry (computed before render, consumed by render + mouse)
pub view: ViewState,
pub(crate) drag: Option<DragState>,
@@ -599,6 +604,8 @@ pub struct AppState {
pub sidebar_width: u16,
pub sidebar_width_auto: bool,
pub sidebar_collapsed: bool,
+ /// Ratio of sidebar height allocated to the workspaces section.
+ pub sidebar_section_split: f32,
pub agent_panel_scope: AgentPanelScope,
pub confirm_close: bool,
pub pane_scrollback_limit_bytes: usize,
@@ -684,6 +691,7 @@ impl AppState {
release_notes: None,
keybind_help: KeybindHelpState { scroll: 0 },
workspace_scroll: 0,
+ agent_panel_scroll: 0,
view: ViewState {
sidebar_rect: Rect::default(),
workspace_card_areas: Vec::new(),
@@ -709,6 +717,7 @@ impl AppState {
sidebar_width: 26,
sidebar_width_auto: false,
sidebar_collapsed: false,
+ sidebar_section_split: 0.5,
agent_panel_scope: AgentPanelScope::CurrentWorkspace,
confirm_close: true,
pane_scrollback_limit_bytes: crate::config::DEFAULT_SCROLLBACK_LIMIT_BYTES,