Skip to content

Make sidebar collapsible by drag#5811

Merged
ComputelessComputer merged 4 commits into
mainfrom
fix/collapsible-sidebar
Jun 30, 2026
Merged

Make sidebar collapsible by drag#5811
ComputelessComputer merged 4 commits into
mainfrom
fix/collapsible-sidebar

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Use the resizable panel collapse behavior and preserve the last expanded width when snapping closed.


Note

Low Risk
Desktop main-layout UI only; behavior is covered by new unit tests with no auth, data, or backend changes.

Overview
Users can drag the left sidebar resize handle past the minimum so the panel snaps closed, matching collapsible resizable-panel behavior instead of only using the chrome toggle.

ClassicMainBody wires the left panel as collapsible with collapsedSize 0, an imperative ref, and onCollapse that calls leftsidebar.setExpanded(false) after restoring the last expanded width via CSS variables and panel.resize. A lastExpandedLeftSidebarPanelSizeRef keeps the pre-collapse percentage so layout commits and reopening (Show sidebar) resize back to that width before toggleExpanded, without calling expand() on the handle.

Tests extend the resizable mock with forwardRef, onCollapse, and panel handle stubs, and add cases for drag-to-collapse and reopen resize.

Reviewed by Cursor Bugbot for commit ac2270b. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for old-char ready!

Name Link
🔨 Latest commit ac2270b
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a4345870249800008ff1e7a
😎 Deploy Preview https://deploy-preview-5811--old-char.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread apps/desktop/src/main/body.tsx
Comment thread apps/desktop/src/main/body.tsx Outdated
Use the resizable panel collapse behavior and preserve the last expanded width when snapping closed.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6d4c028. Configure here.

Comment thread apps/desktop/src/main/body.tsx
@ComputelessComputer ComputelessComputer merged commit c3ce2a2 into main Jun 30, 2026
10 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/collapsible-sidebar branch June 30, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant