Skip to content

Conversation

@flex-yj-kim
Copy link

Summary

  • Drag-to-resize for annotation panel, table of contents, and file tree sidebar
  • Panel widths persist in cookie storage across sessions and random-port hook invocations
  • Double-click the drag handle to reset to default width

Changes

New files

  • packages/ui/hooks/useResizablePanel.ts — Shared hook with left/right side support, cookie persistence, handleProps spread API
  • packages/ui/components/ResizeHandle.tsx — Drag handle component (4px, hover:bg-border, bg-primary/50 while dragging)

Modified files

  • packages/ui/components/AnnotationPanel.tsxwidth prop, flex-shrink-0
  • packages/ui/components/TableOfContents.tsxstyle prop
  • packages/review-editor/components/ReviewPanel.tsxwidth prop, flex-shrink-0
  • packages/review-editor/components/FileTree.tsxwidth prop, flex-shrink-0
  • packages/editor/App.tsx — Integrate TOC + annotation panel resize
  • packages/review-editor/App.tsx — Integrate file tree + annotation panel resize

Panel defaults

Panel Default Min Max Storage key
Annotation (plan) 288px 200 600 plannotator-panel-width
Annotation (review) 288px 200 600 plannotator-review-panel-width
Table of Contents 240px 160 400 plannotator-toc-width
File Tree 256px 160 400 plannotator-filetree-width

Add drag-to-resize for the annotation panel, table of contents,
and file tree sidebar. Panel widths persist in cookie storage
across sessions and random-port hook invocations.

- Add useResizablePanel hook with left/right side support
- Extract ResizeHandle component with spread-friendly handleProps API
- Apply to AnnotationPanel, ReviewPanel, TableOfContents, FileTree
- Double-click handle to reset to default width
- Add min-w-0 on content areas for proper flex shrinking
@flex-yj-kim
Copy link
Author

Screen.Recording.2026-02-11.at.10.08.58.PM.mov

@backnotprop
Copy link
Owner

Nice, looks clean

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.

2 participants