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: Approved This PR refactors sidebar resize functionality into a reusable ResizableRightPanel component while simplifying existing code (net -131 lines). Changes are purely client-side UI with no security, auth, or backend implications. You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate 385b32c
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 8a193e5. Configure here.
| onCloseDiff: () => void; | ||
| onOpenDiff: () => void; | ||
| renderDiffContent: boolean; | ||
| }) => { |
There was a problem hiding this comment.
Inline diff panel loses "keep mounted" optimization on close
Medium Severity
The refactored DiffPanelInlineSidebar returns null when !diffOpen, fully unmounting the diff panel on every close. The old code used renderDiffContent (backed by shouldRenderDiffContent = diffOpen || hasOpenedDiff) to keep the content mounted even when the sidebar was visually hidden, preserving scroll position, view state, and the DiffWorkerPoolProvider worker pool. Now shouldRenderDiffContent is computed but unused in the inline path (it's only used in the sheet path at line 171), and toggling the diff panel repeatedly tears down and recreates the worker pool and component tree.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8a193e5. 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 change that adds pointer-driven resizing and localStorage persistence; risk is limited to potential layout/interaction regressions on different screen sizes or pointer devices.
Overview
Adds a reusable
ResizableRightPanelwrapper that lets inline right-side panels be drag-resized (default 40% width, clamped to 30–80%) and persists the chosen width ratio to localStorage.Updates the chat plan/tasks sidebar and the inline diff viewer to use this shared resizer, switching the plan sidebar to fill its container (
w-full) and simplifying the inline diff layout by removing the previousSidebarProvider/pixel-based resizing approach.Reviewed by Cursor Bugbot for commit e03ecba. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add resizable inline right panels for the diff and plan sidebars
ResizableRightPanel, a new component that lets users drag-resize a right panel. Width is stored as a ratio (default 40%, min 30%, max 80%) and persisted to localStorage.ResizableRightPanelwith width persisted underchat_plan_sidebar_width_ratio._chat.$environmentId.$threadId.tsxto useResizableRightPanel, replacing the previous pixel-based min/max constraints andSidebarProviderimplementation.PlanSidebarin sidebar mode now usesw-fullinstead of a fixedw-[340px]to fill its resizable container.diff=1open; open/close is controlled solely bydiffOpen.Macroscope summarized e03ecba.