Problem
The GTK backend keeps a SidebarPanel enum and active_panel/sidebar_visible cache fields that mirror engine.app_shell state. These exist solely because Relm4 #[watch] expressions reference model.sidebar_visible and model.active_panel == SidebarPanel::Explorer directly.
Proposed fix
Replace #[watch] expressions with engine reads:
model.sidebar_visible → model.engine.borrow().app_shell.sidebar_visible()
model.active_panel == SidebarPanel::Explorer → model.engine.borrow().active_panel_is("panel:explorer")
Then remove SidebarPanel enum, sidebar_visible, active_panel fields, and SidebarPanel::from_panel_id()/to_panel_id() helpers.
Context
Left as thin cache during #385 GTK migration (Session 375). The #[watch] expressions re-evaluate after every update() call, so borrowing the engine RefCell should be safe (no concurrent borrows at that point).
Problem
The GTK backend keeps a
SidebarPanelenum andactive_panel/sidebar_visiblecache fields that mirrorengine.app_shellstate. These exist solely because Relm4#[watch]expressions referencemodel.sidebar_visibleandmodel.active_panel == SidebarPanel::Explorerdirectly.Proposed fix
Replace
#[watch]expressions with engine reads:model.sidebar_visible→model.engine.borrow().app_shell.sidebar_visible()model.active_panel == SidebarPanel::Explorer→model.engine.borrow().active_panel_is("panel:explorer")Then remove
SidebarPanelenum,sidebar_visible,active_panelfields, andSidebarPanel::from_panel_id()/to_panel_id()helpers.Context
Left as thin cache during #385 GTK migration (Session 375). The
#[watch]expressions re-evaluate after everyupdate()call, so borrowing the engine RefCell should be safe (no concurrent borrows at that point).