feat(chat): floating side chat + shared resizable floating window - #823
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
FloatingWindowshell that now supports resizing. Both windows use the same shell, header, edge margins, and default height.Problem
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/useWindowDragmoved here (unchanged behavior); newuseWindowResizewith invisible edge/corner handles, min/max px caps.windowGeometry.tskeeps 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.DetailPanelHeader'sdraggablemode 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/AppLayoutover the pane surface (insideChatProvider/SessionSyncProvider), so it works with the chat pane open, collapsed, or a station showing.sideChatAtom: a session id → live transcript + composer;null→ the chat pane's own injected session launcher (launchpadlayout: agent hero + glowing composer, action cards hidden), adopting the new session in place after a background launch.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-targetedSessionService.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
DetailPanelHeaderdraggablenow implies borderless — the only currentdraggablecallers are the two floating windows, so docked panels are unaffected.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.Validation / Test plan
pnpm typecheck: 0 errors in changed files (staged set typechecks cleanly in isolation on top ofdevelop).pnpm vitest run src/features/TaskKanban src/engines/ChatPanel src/modules/shared: 206 files / 1363 tests pass, incl. an updatedChatPanelTabBarplus-menu test.eslintclean on all changed files; pre-commit lint-staged + scoped typecheck passed.