Skip to content

Fix left sidebar default width#5841

Merged
ComputelessComputer merged 1 commit into
mainfrom
fix/sidebar-default-width
Jul 1, 2026
Merged

Fix left sidebar default width#5841
ComputelessComputer merged 1 commit into
mainfrom
fix/sidebar-default-width

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Keep the untouched left sidebar default tied to the rendered body width and cover startup resize behavior with a regression test.


Note

Low Risk
Localized desktop shell layout logic with guarded default-size tracking; no auth, data, or API changes.

Overview
Fixes the classic main left sidebar so its default/min/max panel percentages stay tied to the rendered body width (via getBoundingClientRect), not just window.innerWidth on first paint.

On mount and when the body resizes (resize + ResizeObserver), syncDefaultLeftSidebarPanelSize recomputes constraints from ~200px defaults and calls panel.resize only while the user is still at the untouched default. Manual resize or drag turns off that tracking; handlePanelLayout also ignores intermediate layouts until a pending programmatic resize settles (epsilon compare).

Tests mock body width and rAF to cover startup settle, window resize, ignoring stale onLayout values, and syncing after the sidebar panel appears when leaving onboarding.

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

@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit 6c0e3ec
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a450a57943e3000086c8c41

@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 2 potential issues.

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 d4f5dde. Configure here.

Comment thread apps/desktop/src/main/body.tsx
Comment thread apps/desktop/src/main/body.tsx
Keep the untouched left sidebar default tied to the rendered body width and cover startup resize behavior with a regression test.
@ComputelessComputer ComputelessComputer force-pushed the fix/sidebar-default-width branch from d4f5dde to 6c0e3ec Compare July 1, 2026 12:38
@ComputelessComputer ComputelessComputer merged commit 7b2a78e into main Jul 1, 2026
10 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/sidebar-default-width branch July 1, 2026 12:59
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