[bug]: right sidebar auto-collapse behaves inconsistently depending on previous view
Bug Description
When the auto-collapse right sidebar setting (interface.autoRightSidebarBehavior) is enabled, the right sidebar does not consistently collapse on non-task views. The behavior depends on which view the user was previously on.
Steps to Reproduce
- Enable "Auto-collapse right sidebar" in Settings → Interface
- Navigate to a task (right sidebar opens with file changes + terminal)
- Click on Skills or Settings
- Observe: the right sidebar remains open
Compare with:
- Be on the Home view (right sidebar is collapsed)
- Click on Skills or Settings
- Observe: the right sidebar stays collapsed (correct)
Actual vs Expected Behavior
Actual: The right sidebar stays open when navigating from a task to Skills/Settings, but stays collapsed when navigating from Home to Skills/Settings.
Expected: The right sidebar should consistently collapse on all non-task views (Home, Skills, Settings, project home) regardless of which view the user came from.
emdash Version
0.4.25
Operating System
macOS 26.3
Additional Context
The auto-collapse logic in usePanelLayout only checks for showHomeView and "repo home page" (project selected + no active task). It doesn't account for Skills or Settings as non-task views, so the sidebar remains in whatever state it was in when leaving a task.
Thx!