From e9547a8e0de21d0ce81867b06511b68def16aff2 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 26 Apr 2026 04:01:01 +0300 Subject: feat: refine live config lifecycle --- src/app/state.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/app/state.rs') diff --git a/src/app/state.rs b/src/app/state.rs index a51a72e7..971b1476 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -578,6 +578,13 @@ pub struct KeybindHelpState { pub scroll: u16, } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum SidebarWidthSource { + ConfigDefault, + Persisted, + Manual, +} + /// All application state — pure data, no channels or async runtime. /// Testable without PTYs or a tokio runtime. pub struct AppState { @@ -594,6 +601,9 @@ pub struct AppState { pub request_new_workspace: bool, pub request_new_tab: bool, pub request_reload_config: bool, + /// Set when the headless server should ask attached clients to reload + /// their client-local sound config from disk. + pub request_client_sound_config_reload: bool, /// Set when UI interaction requested a clipboard write that must be /// handled by the outer App/event loop instead of directly from AppState. pub request_clipboard_write: Option>, @@ -626,6 +636,7 @@ pub struct AppState { pub prefix_mods: KeyModifiers, pub default_sidebar_width: u16, pub sidebar_width: u16, + pub sidebar_width_source: SidebarWidthSource, pub sidebar_width_auto: bool, pub sidebar_collapsed: bool, /// Ratio of sidebar height allocated to the workspaces section. @@ -719,6 +730,7 @@ impl AppState { request_new_workspace: false, request_new_tab: false, request_reload_config: false, + request_client_sound_config_reload: false, request_clipboard_write: None, creating_new_tab: false, requested_new_tab_name: None, @@ -757,6 +769,7 @@ impl AppState { prefix_mods: KeyModifiers::CONTROL, default_sidebar_width: 26, sidebar_width: 26, + sidebar_width_source: SidebarWidthSource::ConfigDefault, sidebar_width_auto: false, sidebar_collapsed: false, sidebar_section_split: 0.5, -- cgit v1.2.3