Add resizable inline right panels#2512
Conversation
- Wrap plan and diff sidebars in a shared resizer - Persist widths as ratios in local storage - Simplify sidebar layout to use full-width content
- Coalesce width ratio updates through a single commit helper - Keep the ref and React state in sync during pointer-driven resizing
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…e-fix # Conflicts: # apps/web/src/routes/_chat.$environmentId.$threadId.tsx
ApprovabilityVerdict: Needs human review This PR introduces a new resizable panel feature with non-trivial interaction logic. An unresolved review comment identifies a medium-severity bug where stored panel widths aren't validated on mount, potentially causing layout issues with the chat composer. You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate 385b32c
- Guard body style cleanup to avoid leaking resize cursor state - Keep the diff sidebar mounted when closed so width is preserved
Dismissing prior approval to re-evaluate 52721c9
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f6510cc. Configure here.
| const violatesMinimumComposerWidth = composerForm.clientWidth + 0.5 < minimumComposerWidth; | ||
|
|
||
| return !hasComposerOverflow && !overflowsViewport && !violatesMinimumComposerWidth; | ||
| }); |
There was a problem hiding this comment.
Combined panel widths unchecked on mount
Medium Severity
The ResizableRightPanel applies stored or default width ratios on mount without checking canAcceptComposerWidth. This can cause the chat composer to be clipped, overflow, or become too narrow, especially with dynamic layout changes from other panels.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f6510cc. Configure here.


What Changed
Added a reusable resizable right-panel wrapper and used it for the inline plan/tasks sidebar and inline diff panel. The panel now defaults to 40% of the available chat area, can be resized between 30% and 80%, and persists the chosen width separately for plan/tasks and diff panels.
Why
The plan/tasks sidebar was fixed-width, so users could not adjust the space split between the conversation and the right-side detail panel. A percentage-based resizer matches the requested behavior and keeps the layout proportional when the window or left sidebar changes.
UI Changes
Screen.Recording.2026-05-05.at.7.34.29.AM.mov
Checklist
Note
Low Risk
UI-only layout and localStorage key changes; composer overflow guards limit regressions, and users may need to re-adjust panel width after the switch from pixel to ratio storage.
Overview
Adds a shared
ResizableRightPanelso inline right panels (plan/tasks and diff) can be dragged between 30–80% of the chat row, default 40%, with widths saved as separate localStorage ratios (chat_plan_sidebar_width_ratio,chat_diff_sidebar_width_ratio). Resize is blocked when it would squeeze the chat composer below a minimum width.The inline plan sidebar in
ChatViewis wrapped in this panel;PlanSidebardrops the fixed340pxwidth and fills the panel. The thread route’s inline diff panel replaces the oldSidebarProvider/ resizableSidebarsetup with the same wrapper and a simpler flex layout besideSidebarInset(including removing the inline sidebar’s open-diff navigation hook).For desktop tests, a Vitest
electronalias points imports at a newelectronMockstub module.Reviewed by Cursor Bugbot for commit f6510cc. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add resizable inline right panels for plan sidebar and diff panel
ResizableRightPanel, a reusable component with a draggable handle that resizes a right panel as a ratio (30–80%) of its container, persisting the ratio tolocalStorageperstorageKey.ChatViewand the inline diff panel in the chat thread route withResizableRightPanel, replacing the previous pixel-based sidebar mechanism for the diff panel.requestAnimationFramethrottling during drag.electron.Macroscope summarized f6510cc.