Skip to content

feat(chat): floating side chat + shared resizable floating window - #823

Merged
sudomaggie merged 1 commit into
developfrom
dev/floating-side-chat
Aug 17, 2026
Merged

feat(chat): floating side chat + shared resizable floating window#823
sudomaggie merged 1 commit into
developfrom
dev/floating-side-chat

Conversation

@Harry19081

Copy link
Copy Markdown
Member

Summary

Adds a global floating side chat — a picture-in-picture chat window that floats over the whole pane surface (chat pane and stations) — and extracts the kanban session preview's floating-window mechanics into a shared FloatingWindow shell that now supports resizing. Both windows use the same shell, header, edge margins, and default height.

Problem

  • There was no way to watch or drive a second session without leaving the active chat tab, and no way to start a new session in place while a station filled the view.
  • The kanban session preview was the only floating window; its drag mechanics lived inside DetailPanelHeader, it couldn't be resized, and its clamps used the overlay's border box — so it could be dragged flush against (and effectively over) the pane edge.

Solution

Shared floating-window shell — src/components/FloatingWindow/

  • useWindowDrag moved here (unchanged behavior); new useWindowResize with invisible edge/corner handles, min/max px caps.
  • windowGeometry.ts keeps all geometry on the DOM element (dataset + inline style) so drag and resize can't drift and never re-render React. The first resize "pins" the window from fluid CSS to explicit absolute px geometry.
  • Clamps (drag, resize, re-fit on host resize) use the overlay's content box, so the overlay's padding is a hard edge margin — 12px for both windows.
  • DetailPanelHeader's draggable mode now also drops the bottom border; the kanban's one-off SCSS rule for this is removed. Both windows share one header.

Side chat — src/engines/ChatPanel/SideChat/

  • Hosted by AppLayout over the pane surface (inside ChatProvider/SessionSyncProvider), so it works with the chat pane open, collapsed, or a station showing.
  • Two modes via sideChatAtom: a session id → live transcript + composer; null → the chat pane's own injected session launcher (launchpad layout: agent hero + glowing composer, action cards hidden), adopting the new session in place after a background launch.
  • Header actions: move to chat pane tab (reopens a collapsed pane) and new chat.
  • Triggers: tab-strip + menu → Side Chat, and session tab right-click → Open in Side Chat. i18n keys added to all 13 locales.
  • Deliberately does not reuse SessionContentView/ChatView: those claim the single global event pipeline, which would hijack the visible main chat. It renders like subagent grid cells instead (ChatSessionContext + per-session snapshot family) and sends via session-targeted SessionService.sendMessage. Documented in the component header.

Kanban preview: now resizable via the shared shell, with the same 12px margin, borderless header, and 600px default height. No changes to TaskDetailPanel.

Potential risks

  • Kanban preview behavior change: gains resize handles (5px invisible edge strips inside the surface) and a slightly larger edge margin (8/8/4 → 12px). Drag behavior is otherwise identical.
  • DetailPanelHeader draggable now implies borderless — the only current draggable callers are the two floating windows, so docked panels are unaffected.
  • Side chat composer is lightweight: plain sendMessage (user_submit) with no model/mode pills or attachments; it does not run the main composer's resume/interrupt orchestration, so it's best suited to running or recently idle sessions.
  • Side chat is single-instance (one window app-wide); opening a second session replaces the first.

Validation / Test plan

  • pnpm typecheck: 0 errors in changed files (staged set typechecks cleanly in isolation on top of develop).
  • pnpm vitest run src/features/TaskKanban src/engines/ChatPanel src/modules/shared: 206 files / 1363 tests pass, incl. an updated ChatPanelTabBar plus-menu test.
  • eslint clean on all changed files; pre-commit lint-staged + scoped typecheck passed.
  • Manual: open side chat from + menu → launcher shows agent name only (no cards); launch → window switches to the session; drag/resize can't cross the 12px margin; move-to-tab reopens a collapsed pane; kanban preview resizes from any edge/corner.

Extract the kanban session preview's floating-window mechanics into a
shared `FloatingWindow` shell (drag + edge/corner resize, content-box
edge margins, re-fit on host resize) and build a global floating side
chat on top of it.

Side chat: a picture-in-picture chat window hosted by AppLayout over
the whole pane surface, so it works whether the chat pane is open or a
station fills the view. Shows another session's live transcript and a
composer, or the chat pane's own session launcher (launchpad format,
no action cards) to start a new session in place. Header offers
"move to chat pane tab" (reopens a collapsed pane) and "new chat".
Opened from the tab-strip + menu or a session tab's context menu.

Kanban preview: now resizable via the same shell, same 12px edge
margin, same borderless draggable header, same 600px default height.

Pre-commit hook ran. Total eslint: 0, total circular: 0
@sudomaggie
sudomaggie merged commit 16957db into develop Aug 17, 2026
3 checks passed
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.

2 participants