Skip to content

fix(panel): restore the committed width when a drag ends early - #147

Open
pratikbuilds wants to merge 1 commit into
corbitsdev:mainfrom
pratikbuilds:claude/i142-panel-ba05e1
Open

pratikbuilds wants to merge 1 commit into
corbitsdev:mainfrom
pratikbuilds:claude/i142-panel-ba05e1

Conversation

@pratikbuilds

@pratikbuilds pratikbuilds commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A drag that ends without a release, such as a new press on the handle or the hook unmounting, now drops the preview and puts back the committed --resizable-width, so the CSS width and controlled state cannot diverge (finding 15). The reset moves from commit into the drag's teardown in useResizable, which every end path runs. Pointercancel and lost capture still commit the preview, as before.

Verification

  • bun run check
  • New drag-abort cases in use-resizable.test.ts

Closes #142

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • Focused: mixes unrelated changes

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA.
Posted by the CLA Assistant Lite bot.

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • CI green: required checks are failing
  • No ai attribution: a commit message contains "Co-Authored-By:"; remove it

@cursor
cursor Bot force-pushed the claude/i142-panel-ba05e1 branch from 821f795 to 8939bfd Compare October 30, 2026 12:10

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • Focused: mixes unrelated changes

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Request changes

Summary

The useResizable drag-teardown change in src/hooks/use-resizable.ts and src/hooks/use-resizable.test.ts is clean and passes bun run check, but the branch commit history and PR title/description still contain the backed-out PanelContent pane-switch change (8939bfd + revert commit e787090).

Blockers

  • git log main..HEAD (8939bfd, e787090) (reviewer) — 8939bfd introduced both the useResizable drag-teardown fix and the PanelContent pane-focus change, and e787090 (fix(panel): leave pane focus for its own change) reverted src/ui/panel.tsx, e2e/panel.spec.ts, and e2e/fixtures.tsx. Both commits also have body lines exceeding 72 characters (e787090 is 91 chars; 8939bfd has 73–75 char lines and still describes the reverted PanelContent change). Per CONTRIBUTING.md:36-40, squash into a single commit whose subject and <= 72-char body lines describe only the useResizable drag-teardown fix.
  • PR #147 title and body (reviewer) — The PR title (fix(panel): restore the committed width and keep focus on pane switch) and PR body (Summary item 16 and Verification e2e/panel.spec.ts) still claim the reverted PanelContent change, which also causes corbits-triage to fail (Focused: mixes unrelated changes). Update the PR title and body to match the useResizable diff.

Should-fix

None.

Informational

None.

@corbits-triage
corbits-triage Bot dismissed stale reviews from themself October 30, 2026 17:10

Nothing triage asked to change still fails, so this request no longer stands.

A drag that ends without a release, such as a new press on the handle
or the hook unmounting, now drops the preview and puts back the
committed `--resizable-width`, so the CSS width and controlled state
cannot diverge. The reset moves from `commit` into the drag's teardown,
which every end path runs. Pointercancel and lost capture still commit
the preview, as before.
@pratikbuilds
pratikbuilds force-pushed the claude/i142-panel-ba05e1 branch from e787090 to 03751f5 Compare November 2, 2026 17:10
@pratikbuilds pratikbuilds changed the title fix(panel): restore the committed width and keep focus on pane switch fix(panel): restore the committed width when a drag ends early Nov 2, 2026

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • CI green: required checks are failing
    • policy-check

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. An early drag end restores the committed width and does not commit. A finished drag, including pointercancel and lostpointercapture, still commits once.

History is only the useResizable fix. The pane-focus change is not in this diff.

@corbits-triage

corbits-triage Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@corbits-triage
corbits-triage Bot dismissed their stale review November 4, 2026 07:16

Nothing triage asked to change still fails, so this request no longer stands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-ups from the conversation PR review

2 participants