emdash icon indicating copy to clipboard operation
emdash copied to clipboard

[bug]: right sidebar auto-collapse behaves inconsistently depending on previous view

Open jschwxrz opened this issue 8 months ago • 1 comments

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

  1. Enable "Auto-collapse right sidebar" in Settings → Interface
  2. Navigate to a task (right sidebar opens with file changes + terminal)
  3. Click on Skills or Settings
  4. Observe: the right sidebar remains open

Compare with:

  1. Be on the Home view (right sidebar is collapsed)
  2. Click on Skills or Settings
  3. 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.

jschwxrz avatar Mar 05 '26 11:03 jschwxrz

Thx!

arnestrickmann avatar Mar 05 '26 18:03 arnestrickmann