Skip to content

feat(prove): draggable, remembered chat width - #466

Merged
ibenian merged 2 commits into
mainfrom
feat/prove-chat-resize
Jul 15, 2026
Merged

feat(prove): draggable, remembered chat width#466
ibenian merged 2 commits into
mainfrom
feat/prove-chat-resize

Conversation

@ibenian

@ibenian ibenian commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Adds a draggable splitter between the proof box and the chat on /prove, so the chat column is width-resizable instead of fixed at 360px.

  • Drag left/right to resize; width clamped to 300–680px.
  • Width persists in localStorage, so it's shared across the Derive workspace and every opened-proof chat.
  • Pure pointer-events; the splitter is hidden on narrow (single-column) layouts.

Verified live: dragged 360→606px (proof box shrank, chat grew), persisted across reload, and an opened proof inherited the width with its own working splitter. No console errors.

Stacked on #465 (base = feat/prove-proof-store) since it only touches static/prove.html / static/prove.js, which are introduced there. GitHub will retarget this to main once #465 merges.

🤖 Generated with Claude Code

Copilot AI 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.

Pull request overview

Adds a draggable splitter to make the /prove chat column user-resizable (instead of a fixed width) and persists the chosen width across the Derive workspace and opened-proof chats via localStorage.

Changes:

  • Updated /prove layout to include a visible vertical resizer between proof content and chat, hidden on narrow layouts.
  • Added JS wiring to drag-resize the chat column (CSS --chat-w) and persist/restore the width across sessions and tabs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
static/prove.js Creates/wires the splitter for both Derive and opened-proof panels; persists/restores chat width.
static/prove.html Updates CSS grid columns and adds the resizer element + styling for the Derive workspace.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread static/prove.js
Comment thread static/prove.js Outdated
ibenian added a commit that referenced this pull request Jul 15, 2026
…ard a11y

Address Copilot review on #466:
- applyStoredChatW wraps localStorage.getItem in try/catch — a SecurityError in
  blocked-storage / privacy modes no longer aborts /prove init (matches the write
  guard, factored into _storeChatW).
- Drag listens for pointercancel too (mirrors pointerup), so a canceled gesture /
  mid-drag interruption can't leave the splitter stuck dragging with dangling
  document listeners.
- The resizer is now keyboard-accessible: focusable (tabindex=0) with ←/↑ widen,
  →/↓ narrow, Home/End to limits, and aria-valuemin/max/now — verified live.

🤖 Co-Authored-By: Claude <81847+claude@users.noreply.github.com>
ibenian added 2 commits July 14, 2026 21:29
The chat column was fixed at 360px. Add a draggable splitter between the proof
box and the chat: drag left/right to resize (clamped 300–680px), and the width
persists in localStorage so it's shared across the Derive workspace and every
opened-proof chat. Pure pointer-events; hidden on narrow (single-column) layouts.

🤖 Co-Authored-By: Claude <81847+claude@users.noreply.github.com>
…ard a11y

Address Copilot review on #466:
- applyStoredChatW wraps localStorage.getItem in try/catch — a SecurityError in
  blocked-storage / privacy modes no longer aborts /prove init (matches the write
  guard, factored into _storeChatW).
- Drag listens for pointercancel too (mirrors pointerup), so a canceled gesture /
  mid-drag interruption can't leave the splitter stuck dragging with dangling
  document listeners.
- The resizer is now keyboard-accessible: focusable (tabindex=0) with ←/↑ widen,
  →/↓ narrow, Home/End to limits, and aria-valuemin/max/now — verified live.

🤖 Co-Authored-By: Claude <81847+claude@users.noreply.github.com>
@ibenian
ibenian force-pushed the feat/prove-chat-resize branch from 49b9c1a to be69645 Compare July 15, 2026 01:29
@ibenian
ibenian changed the base branch from feat/prove-proof-store to main July 15, 2026 01:30
@ibenian
ibenian merged commit 0bb82f4 into main Jul 15, 2026
@ibenian ibenian added enhancement New feature or request ui User interface and UX labels Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ui User interface and UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants