feat(web): reset right panel width on double click - #11219
cmaciasjimenez wants to merge 2 commits into
Conversation
Double-clicking the right panel's resize handle restores its default width and clears the persisted width, matching the app sidebar's rail.
Drop the sidebar cross-references and the notes that restate what the code already says.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe resizable width hook now supports double-click reset. The reset removes the persisted width, restores ChangesPanel width reset
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to Double-click reset is reachable from the resize handle and clears the saved width as intended. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
thanks for the contribution, @cmaciasjimenez! at @extoci’s request, this is superseded by #12395, which reimplements the double-click width reset on current main while preserving the newer per-thread width handling. you are credited as a co-author on the replacement commit and in the new pr description. closing this conflicting version in favor of that replacement. |
Reimplement the behavior proposed in pingdotgg#11219 on the current per-thread resize hook. Co-authored-by: cmacias <cmacias@teldat.com> Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
What Changed
Why
The right panel can be dragged to any width but had no way back to the default, so a mis-drag is a one-way door. The left sidebar's rail has had double-click-to-reset since #6320; this brings the right panel to parity and matches VS Code / Cursor.
The reset lives in
useResizableWidthrather than in the handle, so every surface built onPreviewPanelShellpicks it up — the thread right panel, the pull requests panel, and the preview/device panels — each restoring its own default and clearing its own storage key. It clears the stored width instead of overwriting it withdefaultWidth, because the pull requests panel derives its default from the viewport; writing a value in would freeze a stale one.A maximized panel renders no handle, so the gesture is unavailable there, as before.
One ordering detail: a double-click delivers two motionless drags before
dblclickfires, and each of those persists the current width. The reset lands last and wins. The new test replays that exact sequence so a future refactor can't quietly break it.UI Changes
doubleclick.mov
Before — dragged out to a custom width
After — double-click on the handle restores the default
Checklist
Implemented with Claude Opus 5 using the Claude Code harness in T3 Code.
Summary by CodeRabbit
New Features
Tests