Skip to content

feat: resizable file-tree and comments-panel sidebars#422

Merged
tomasz-tomczyk merged 1 commit intomainfrom
resizable-sidebars
May 2, 2026
Merged

feat: resizable file-tree and comments-panel sidebars#422
tomasz-tomczyk merged 1 commit intomainfrom
resizable-sidebars

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Drag handles on the inner edge of each sidebar (right edge of file-tree, left edge of comments-panel). 4px-wide flex siblings; brand-color line on hover/drag is the only visual affordance.
  • Persisted via crit-settings — new fileTreeWidth / commentsPanelWidth keys in the consolidated cookie added in feat: consolidate settings cookies, restore update dismiss #418. Absent = CSS default (280px / 480px).
  • No upper bound — only a min (180px file-tree, 300px comments) so the handle stays grabbable. Ultrawide users can grow sidebars freely; overflow yields a horizontal scrollbar.
  • Pointer events + setPointerCapture for drag — survives alt-tab, devtools open, pointer-leave-window without leaking the dragging state.

Closes #403

Review

  • Code review: passed (frontend-expert; one drag-interruption blocker fixed by switching from document-level mousemove to captured pointer events)
  • Parity audit: N/A — these sidebars are CLI-only

Test plan

  • `go build` clean
  • `gofmt -l .` clean
  • `golangci-lint run ./...` 0 issues
  • Playwright (`tests/sidebar-resize.spec.ts`) — 7/7 pass: defaults, drag+persist (each panel, both together), min-clamp + grow-past-default, handle visibility tied to panel state, comment-icon UI path
  • Regression: `file-tree`, `comments-panel`, `loading` suites all pass (39 tests)

🤖 Generated with Claude Code

Adds drag handles on the inner edge of each sidebar. Widths persist via
the consolidated `crit-settings` cookie (`fileTreeWidth`,
`commentsPanelWidth`). Only a minimum is enforced (180px file-tree,
300px comments) so the handle stays grabbable; no upper bound — ultrawide
users may legitimately want very wide sidebars.

Closes #403

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 3820908 into main May 2, 2026
6 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the resizable-sidebars branch May 2, 2026 10:00
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.31%. Comparing base (02c3a0a) to head (10b00db).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #422       +/-   ##
===========================================
+ Coverage   34.10%   67.31%   +33.20%     
===========================================
  Files          26       26               
  Lines        9690     9690               
===========================================
+ Hits         3305     6523     +3218     
+ Misses       5925     2656     -3269     
- Partials      460      511       +51     
Flag Coverage Δ
e2e 34.24% <ø> (+0.13%) ⬆️
unit 63.51% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Ability to resize the sidebars

1 participant