feat(chat): float the chat dock anywhere on screen (#1904) #1912

Merged
sam merged 3 commits from feat/1904-chat-dock-float into main 2026-11-12 14:23:35 +00:00
Owner

Makes the chat dock a free-floating window on desktop-width screens.

  • Header drags the window to any position (not just edge pinning); the move handle also moves it by arrow keys (Shift = larger steps).
  • All 8 edges/corners resize by pointer and keyboard; each handle is role=separator, focusable, with aria-label, aria-orientation, aria-valuenow/min/max. The pinned split keeps its divider.
  • Explicit Left / Float / Right segmented control in the header (aria-pressed, labels "Pin chat to left edge" / "Float window" / "Pin chat to right edge").
  • Dragging near a side edge shows the snap preview and commits the pin on release.
  • Minimise in place: the collapsed bar stays at the window's position and is draggable (padding + move handle); Ctrl+/ toggles open/closed; Escape still collapses.
  • Layout (mode, x, y, w, h) persists via useStorage under archie.chat.dock.v2; the old archie.chat.dock {side,width} key is migrated and removed.
  • Invariants kept: dock stays mounted outside the app shell (session and in-flight turns survive navigation), --chat-dock-clear reserves collapsed-dock height (0 when the bar floats above the bottom quarter), --chat-pin-l/r still reflow the page when pinned. Phone width keeps the full-width bottom bar. App.vue unchanged.

Files: ui/src/chat/ChatDock.vue, ui/src/chat/ChatDockLayout.ts (new pure geometry/persistence module, ChatDock-prefixed), ui/test/chat-dock-float.test.ts (new).

Verified: pnpm test (113 pass, incl. 9 new dock-layout tests), pnpm run typecheck, pnpm run build, task check (exit 0) on this tree. Browser check against the vite dev server (headless Chrome, dock mounted in isolation because the local backend requires org setup): drag-anywhere with snap commit to right pin, unpin by dragging to the middle, 8 handles with correct ARIA in float mode, keyboard resize/move, Left/Float/Right switching pin vars, minimise in place + bar drag, Escape, Ctrl+/ toggle, legacy-key migration in localStorage, phone width keeps the bottom bar.

Closes #1904

Makes the chat dock a free-floating window on desktop-width screens. - Header drags the window to any position (not just edge pinning); the move handle also moves it by arrow keys (Shift = larger steps). - All 8 edges/corners resize by pointer and keyboard; each handle is role=separator, focusable, with aria-label, aria-orientation, aria-valuenow/min/max. The pinned split keeps its divider. - Explicit Left / Float / Right segmented control in the header (aria-pressed, labels "Pin chat to left edge" / "Float window" / "Pin chat to right edge"). - Dragging near a side edge shows the snap preview and commits the pin on release. - Minimise in place: the collapsed bar stays at the window's position and is draggable (padding + move handle); Ctrl+/ toggles open/closed; Escape still collapses. - Layout (mode, x, y, w, h) persists via useStorage under archie.chat.dock.v2; the old archie.chat.dock {side,width} key is migrated and removed. - Invariants kept: dock stays mounted outside the app shell (session and in-flight turns survive navigation), --chat-dock-clear reserves collapsed-dock height (0 when the bar floats above the bottom quarter), --chat-pin-l/r still reflow the page when pinned. Phone width keeps the full-width bottom bar. App.vue unchanged. Files: ui/src/chat/ChatDock.vue, ui/src/chat/ChatDockLayout.ts (new pure geometry/persistence module, ChatDock-prefixed), ui/test/chat-dock-float.test.ts (new). Verified: pnpm test (113 pass, incl. 9 new dock-layout tests), pnpm run typecheck, pnpm run build, task check (exit 0) on this tree. Browser check against the vite dev server (headless Chrome, dock mounted in isolation because the local backend requires org setup): drag-anywhere with snap commit to right pin, unpin by dragging to the middle, 8 handles with correct ARIA in float mode, keyboard resize/move, Left/Float/Right switching pin vars, minimise in place + bar drag, Escape, Ctrl+/ toggle, legacy-key migration in localStorage, phone width keeps the bottom bar. Closes #1904
sam added 1 commit 2026-11-12 13:32:20 +00:00
feat(chat): float the chat dock anywhere on screen (#1904)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 10m29s
4e9745d5c6
The chat dock is now a free-floating window on desktop-width screens:
the header drags it to any position, all eight edges and corners resize
it by pointer and keyboard (role=separator with aria-orientation and
valuenow), and Left / Float / Right controls in the header switch
modes explicitly. Dragging near a side edge shows the pinned split
preview and commits on release; minimising leaves the bar in place and
draggable; Ctrl+/ toggles the window. The layout persists under
archie.chat.dock.v2, migrating and removing the old archie.chat.dock
key. Phone width keeps the full-width bottom bar.
sam added 2 commits 2026-11-12 14:17:31 +00:00
The chat dock is now a free-floating window on desktop-width screens:
the header drags it to any position, all eight edges and corners resize
it by pointer and keyboard (role=separator with aria-orientation and
valuenow), and Left / Float / Right controls in the header switch
modes explicitly. Dragging near a side edge shows the pinned split
preview and commits on release; minimising leaves the bar in place and
draggable; Ctrl+/ toggles the window. The layout persists under
archie.chat.dock.v2, migrating and removing the old archie.chat.dock
key. Phone width keeps the full-width bottom bar.
Merge remote branch feat/1904-chat-dock-float into the rebased head
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 2m47s
3c1ecc8087
sam merged commit 228f17d98a into main 2026-11-12 14:23:35 +00:00
sam deleted branch feat/1904-chat-dock-float 2026-11-12 14:23:35 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1912