Skip to content

Keep the chat resize handle under the pointer - #236

Open
lavaman131 wants to merge 2 commits into
mainfrom
fix/214-resize-handle-direction
Open

lavaman131 wants to merge 2 commits into
mainfrom
fix/214-resize-handle-direction

Conversation

@lavaman131

Copy link
Copy Markdown
Collaborator

Fixes #214

Summary

The chat rail is the right-hand column and its resize handle sits on its left edge (side="left"). resizeDelta("left", d) returned +d, so moving the edge right widened the chat rail, and ArrowRight did the same. The handle moved opposite to the pointer.

side names the edge the handle sits on, so the mapping now follows the edge's geometry:

  • left edge: moving right narrows the pane (-delta)
  • right edge: moving right widens the pane (+delta)

keyboardPaneDelta goes through resizeDelta, so the arrow keys now move the separator in the arrow's direction too. The Projects sidebar's SidebarResizeHandle uses its own raw clientX delta and was already correct, so it is unchanged.

Tests

  • apps/web/src/resizable-pane.test.ts: replaces the assertions that pinned the inverted mapping with ones for both edges, for pointer and keyboard input.
  • e2e/shell.e2e.ts: "the chat rail has its own resize control" now widens with ArrowLeft and narrows with ArrowRight. The new test "the chat rail edge follows the pointer" drags the edge left (rail widens), then right (rail narrows).

Both e2e tests fail against the old resizeDelta and pass with the fix.

Assistant-model: Claude Opus 5.5
Assistant-workflow: inline
Assistant-duration: 4m converged, estimated 15m
Assistant-verification: bun test unit passed: apps/web/src/resizable-pane.test.ts (5 pass)
Assistant-verification: Playwright Chromium E2E passed: bun run e2e e2e/shell.e2e.ts (11 passed)
Assistant-verification: Playwright Chromium E2E regression check passed: both chat-rail resize tests fail against the old resizeDelta
Assistant-verification: typecheck and lint passed: bun run types, bun run ci
Co-authored-by: Alex Lavaee lavaman131@github.com

@coolify-githubnext-app

coolify-githubnext-app Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The preview deployment for chopin is ready. 🟢

Open app | Open Build Logs | Open Application Logs

Last updated at: 2026-10-01 15:09:20 CET

The chat rail sits on the right of the workspace and is resized from its
left edge, but resizeDelta treated a left-edge handle as if moving it
right widened the pane. Dragging or pressing ArrowRight widened the chat
rail and dragging left narrowed it. A pane resized from its left edge now
narrows when the edge moves right, and arrow keys move the separator in
the arrow's direction.

The unit tests and the shell e2e test pinned the inverted mapping; they
now assert the pointer-following direction for both pointer and keyboard
input, and a new e2e test drags the chat rail's edge both ways.

Fixes #214

Assistant-model: Claude Opus 5.5
Assistant-workflow: inline
Assistant-duration: 4m converged, estimated 15m
Assistant-verification: bun test unit passed: apps/web/src/resizable-pane.test.ts (5 pass)
Assistant-verification: Playwright Chromium E2E passed: bun run e2e e2e/shell.e2e.ts (11 passed)
Assistant-verification: Playwright Chromium E2E regression check passed: both chat-rail resize tests fail against the old resizeDelta
Assistant-verification: typecheck and lint passed: bun run types, bun run ci
Co-authored-by: Alex Lavaee <lavaman131@github.com>
Once the last open decision is saved it moves into the collapsed resolved
history, so the final assertion only passed when it ran before the card
left the open list. The test now waits for "2 resolved", opens the
history, and checks the saved card there.

Assistant-model: Claude Opus 5.5
Assistant-workflow: inline
Assistant-duration: 9m converged, estimated 15m
Assistant-verification: Playwright Chromium E2E passed: sidecar "progressive custom answers" --repeat-each 10 (10 passed; before the fix 2 of 3 failed locally and all 3 CI attempts failed)
Assistant-verification: Playwright Chromium E2E passed: bun run e2e e2e/sidecar.e2e.ts e2e/shell.e2e.ts (52 passed)
Assistant-verification: typecheck and lint passed: bun run types, bun run ci
Co-authored-by: Alex Lavaee <lavaman131@github.com>
@lavaman131
lavaman131 force-pushed the fix/214-resize-handle-direction branch from 6c658f5 to f4bb57a Compare October 1, 2026 15:06
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.

Sidebar resize handle moves opposite to the pointer

1 participant