Repository navigation
chat windows: drag and drop between parts - #345685
Merged
Sandeep Somavarapu (sandy081) merged 74 commits intoNov 4, 2026
Merged
Sandeep Somavarapu (sandy081) merged 74 commits into
Sandeep Somavarapu (sandy081) merged 74 commits into
Conversation
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
3 times, most recently
from
November 2, 2026 23:44
79d32fe to
26d271e
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
from
November 3, 2026 00:14
86cb25e to
16b9030
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
2 times, most recently
from
November 3, 2026 00:53
d28b137 to
9c2b93f
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
from
November 3, 2026 06:42
00c3f0e to
c6cc1a7
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
7 times, most recently
from
November 3, 2026 12:05
079afc3 to
9e08a62
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
from
November 3, 2026 13:32
a0b76e8 to
4022acf
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
3 times, most recently
from
November 3, 2026 16:38
504b7e1 to
a237265
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
2 times, most recently
from
November 3, 2026 17:42
b75e29c to
e9e3144
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
from
November 3, 2026 17:45
91d1a54 to
5f1a661
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
from
November 3, 2026 22:34
e9e3144 to
75d37a6
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
2 times, most recently
from
November 3, 2026 22:59
4cafae9 to
5fcf3d4
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
from
November 4, 2026 00:18
1cb0ff3 to
fe508d4
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
from
November 4, 2026 00:21
5fcf3d4 to
76e7546
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/chat-windows-on-parts
branch
from
November 4, 2026 01:04
fe508d4 to
ab5e336
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
from
November 4, 2026 01:08
76e7546 to
c5df398
Compare
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands Terminals merged into a chat window's main part stay there (U13): ChatWindowTerminals moved every terminal editor that opened in the main part to the terminals part, which put merged terminals back. It now moves only new terminals: an editor that moves from another group is still in that group as it opens. Co-authored-by: Copilot <[email protected]>
…Move Part commands Editors dragged where they go into a new part stay there until the pointer leaves the grid: Chromium tells no related target as what is under the pointer changes, which it does as the cards make way. Co-authored-by: Copilot <[email protected]>
…Move Part commands The cards that make way are laid out for real where they go, not only moved and clipped: as one starts to slide, it is laid out as large as where it was and where it goes, so that what it shows fills the card as the card's clip slides from size to size, and once it slid, exactly where it goes. A target change lays them out, not a frame. Leaving, Escape and the drop lay them out as the grid does. Co-authored-by: Copilot <[email protected]>
… dropped on their edges A part dropped on the center of the chat goes beside it, on its nearest side, rather than merging: its editors would join the chat's group, whose title is the chat's own. The parts of a grid say which merge with a predicate (`PartGrid.setMergeAllowed`), the chat window that none merges into the chat; the chat merging into another part still does. Co-authored-by: Copilot <[email protected]>
…er views that handle drops Editors and groups dragged over a view that handles drops, such as a chat, cannot go into its group, where they would be behind it: they split the group on the side nearest to them, also over its center, into a new group with its own tab row. The view's inputs still take them, and other drags, such as files, still go to the view. Co-authored-by: Copilot <[email protected]>
…Move Part commands Over the center of a part it merges into, the cards stay as they are as the card lifted, its slot where it was, and only the part it merges into is highlighted, in its frame: what the merge changes shows once it is done. Moving beside a part, the cards make way; back over the center, they are as they were again. Dropped, the card settles into the part, then the part merges once, and the cards glide to where that leaves them. Co-authored-by: Copilot <[email protected]>
…Move Part commands While cards move, a part whose editor draws over the window rather than in it, such as a webview, a notebook, an integrated browser or a canvas, shows a placeholder for it: the content drawn over it hides, its tabs move and lay out with its card, and over the editor shows the watermark of an empty editor with the editor's icon and name. What draws over an element registers it as an overlay anchor (`registerOverlayAnchor`), as overlays positioned over elements and native web contents views do, so that the grid finds and hides it without knowing what it is. The content shows again once the cards settled. Co-authored-by: Copilot <[email protected]>
…er views that handle drops fixup! Parts drag and drop: editors between parts, and edge splits over views that handle drops On main's input drop targets (7525d70): inputs take drops through the holes the overlay's clip-path leaves over them, and a drag that enters one creates no overlay, except for groups. The overlay no longer checks for inputs itself; content that handles drops still lets only editors and groups split the group. The test asserts the hole rather than a synthetic drag over the overlay, which ignores clip-path. Co-authored-by: Copilot <[email protected]>
…er views that handle drops fixup! Parts drag and drop: editors between parts, and edge splits over views that handle drops An edge split over content that handles drops, such as a chat, gives the new group half of the group, as the drop indicator shows. Beside a group at its minimum size the group counted as expanded, and the part expanded the new group, squeezing the chat to its input. Co-authored-by: Copilot <[email protected]>
…w goes into a new part fixup! Parts drag and drop: an editor dropped on an edge of the window goes into a new part The look test from the base passes the editor groups service. Co-authored-by: Copilot <[email protected]>
…w goes into a new part fixup! Parts drag and drop: an editor dropped on an edge of the window goes into a new part M1: a drag of editors from another window that ends there, such as cancelled with Escape there, no longer leaves the new part's slot and the cards that made way for it: the drop target listens for drag ends in every window, and a leave once no editors are dragged resets it. Co-authored-by: Copilot <[email protected]>
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands M3: PartGrid.setPreviewLayoutAllowed: a window can say which parts do not lay out at the sizes their cards take while cards make way, such as those showing terminals, whose processes resize, also for a drag that is cancelled. Their cards only show clipped until the grid lays them out. Co-authored-by: Copilot <[email protected]>
… dropped on their edges fixup! Parts drag and drop: chat windows create the parts for editors dropped on their edges M5: a part does not merge into the terminals, whose groups stay locked to terminals. M3: terminals, the terminals part or a part whose active editor is a terminal, do not lay out while cards make way. Co-authored-by: Copilot <[email protected]>
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands M4: a card drag disposed while its drop still settles, such as with its grid, drops it; a new drag still settles the previous one first. L1: the window losing focus cancels a card drag. Co-authored-by: Copilot <[email protected]>
…w goes into a new part fixup! Parts drag and drop: an editor dropped on an edge of the window goes into a new part M4: disposed while editors dropped into a new part still settle, such as with its grid, the drop is dropped: no part is created. Co-authored-by: Copilot <[email protected]>
… dropped on their edges fixup! Parts drag and drop: chat windows create the parts for editors dropped on their edges M2: the parts a chat window created, such as for editors dropped on its edges, are stored with their editors and open again as it restores: each part's editors move into a new part at the edge of the window, where such parts go as its parts are arranged (as after a layout-mode change). Where the window creates no parts, their editors stay in its main part. Co-authored-by: Copilot <[email protected]>
…w goes into a new part fixup! Parts drag and drop: an editor dropped on an edge of the window goes into a new part L2: editors go into new parts as the editor groups split: only while workbench.editor.splitOnDragAndDrop, as toggled by its key, and the copy key copies them into the new part. Co-authored-by: Copilot <[email protected]>
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands L3: Move Part restores the sizes of the other cells inside the change that glides, so that the cards glide to where they end up. Co-authored-by: Copilot <[email protected]>
… dropped on their edges fixup! Parts drag and drop: chat windows create the parts for editors dropped on their edges L4: the parts a chat window creates are named apart from its main part, Editor, and from each other: Editor 2, Editor 3, for announcements and Move Editor to Part. Co-authored-by: Copilot <[email protected]>
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands L5: the parts of a part grid say so in their context (editorPartInPartGrid, generic, not chat-window only), and Move Part needs it besides the Agents window. Co-authored-by: Copilot <[email protected]>
…w goes into a new part fixup! Parts drag and drop: an editor dropped on an edge of the window goes into a new part L5: Move Editor into New Part needs the part to be one of a part grid. Co-authored-by: Copilot <[email protected]>
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands L6: the overlay anchor registry is keyed by host: a host registered again, such as an overlay re-anchored mid-drag, keeps its hidden count, so it does not show again while hidden; one disposed while hidden shows again. Tests for the registry. Co-authored-by: Copilot <[email protected]>
…Move Part commands fixup! Parts drag and drop: drag a part to rearrange the window, and Move Part commands L7: the grabber takes the pointer only down to its grip, not over the tabs under it. Co-authored-by: Copilot <[email protected]>
… dropped on their edges fixup! Parts drag and drop: chat windows create the parts for editors dropped on their edges Closing the window closes its main part first (#345683). Co-authored-by: Copilot <[email protected]>
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/parts-drag-and-drop
branch
from
November 4, 2026 01:46
cb8f8de to
0969de7
Compare
Sandeep Somavarapu (sandy081)
merged commit Nov 4, 2026
eb200c4
into
agents/chat-windows-on-parts
2 checks passed
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.
Block 3 of the chat windows parts design: drag and drop between the parts of a chat window (DESIGN.md §6, D1–D5), each gesture with a command equivalent and a screen reader announcement.
Stacked on #345683 (Block 2, chat windows on parts, base
agents/chat-windows-on-parts), which is based on main now that #345663 (Block 1) merged. Merges after #345683.Regular VS Code is unchanged: a window with one editor part behaves as before, the new commands are Agents-window only (
IsSessionsWindowContextplus the genericeditorPartInPartGrid, set on the parts of a part grid), and D5 is behindsessions.chatWindows.enabled. One small change applies to regular VS Code too: an editor dropped into another part of the same window is announced to screen readers ("Moved {0} to {1}"), which includes moves between the main part and a modal editor part.Commit map
e685e96caccD1 + D2registerContentDropTargetfor content that handles its center drops (the chat view): editors/groups get the group's edge zones there, other drags are the content's. A view editor's drag handle drags it like a tab (singleton = move); the handle owns its drag and leaves text fields alone. Moves into another part of the window are announced. Move Editor to Part…editorDropTarget.test.ts,viewEditor.test.ts,editorPartActions.test.ts47f173fb126D3partGrid.test.tsc137c7168b1D4IPartGridPartFactory; parts the grid created close with their last editor (also after restore). Move Editor into New Part Left/Right/Above/Below.PartGridtakesIEditorGroupsService.partGrid.test.ts0d6a8555e53ChatWindowPartFactory(parts like the window's main part, closed with the window);ChatWindowGridgives it to every grid it arranges and keeps created parts across layout-mode rebuildschatWindowPartFactory.test.ts,chatWindowGrid.test.tsa0f4f6e25cbD5IChatWindowOpenOptions.bounds), with the main window's editors as with Open in New Window. The chat in a chat window drags by its session title. The chat view registers as content that handles drops. SharedgetNewWindowBoundsAtDragEnd(tab drag-out unchanged).dnd.test.ts,chatWindowDragOut.test.ts,chatCompositeBar.test.ts,sessionsListChatMoveDnd.test.tsReview fixes (additive
fixup!commits)14ecffab4b8(P13)53f0f1e4770(P15)5e2c3af3481(P15b)a0f4f6e25cb+8a377b6e8ea(P16)workbench.editor.dragToOpenWindowand the Alt toggle, and only when nothing took the drop; only from the main Agents window. Move Part / Move Editor into New Part announce when there is no part to act on.bf07890aa78(P16)IChatWindow.chatLeads: in the chat part, no part to its left or above it), so the title and window controls never travel with a chat moved into another part or dragged after another part. Window edges (D4, Move Part to an edge) are the edges of the parts: the title row keeps spanning the window.2071f44b610+08f236b9da1(P15)cf136053d58+27b581d34bb(P13)13bf9a9259e(P14)81372db67cb(P16)8a343752af0(P15b)f7e2606529d(P15){ part, view }cell shape (the chat is a plain part cell since Block 2's title-model rework).57ba275f069(P14)92d680f4efb+f67c537db04(P16)IChatWindowOpenOptions.chatPart: the part's state and the chat's group) and restored in place, with the chat back in its own group; a stored group the part no longer has falls back to the active group, and a stored value that is not one is ignored.bd4c5b7fb72+350ed6625ff(P15b)0b69ddc7ae3(P15) +5f0806d0bc8+af45dac30d7(P15b)225a858b86c(P15) +eb2fb602b39(P15b)data-part-grid-created), and the chat window look frames them like the main part, so their cards line up with it (no 1px offset).d148a5169d2(P13)data-part-grid-split) and, in a chat window, is one card: the card frames its groups once, the editor part divides them, and the groups and the chat in them draw no frames of their own (user decision; the main window is unchanged). Verified live.3686a485063(P14) +edb53e5eb4f(P15b)setMergeAllowed(false)), so only place-next-to is offered there. Verified live: previews match the drop exactly.f1355f5357f+062b02a20b9+2cee0046cf6(P14)part-grid-motionin browserView's overlay list). Without.monaco-enable-motion(reduced motion) moves are instant. While a card is dragged nothing moves: the static slot preview shows where it goes, its dry run once per place, not per dragover (live: median 0.1ms per dragover). Verified live.5507623f952+504b7e18045(P14)part-grid-top-edge-group, Block 2's marker; at the top edge the title moves the window) drags its part, as the drag handle does:registerPartTitleDragtakes the drag in the capture phase before the group does. Tabs still drag their editors. A lower group of a split card has no marker, so its title space drags the card too (user decision: every title row of a card is its handle). Verified live with real mouse drags, a created part and the terminals.a237265aa35(P15b)ChatWindowGrid.reset()first closes the parts the grid created, their editors moving into the main part (moveEditorsToChatWindow), so the window is arranged as the mode arranges it.PartGridReflow), drop zones are by card centre and window edges by pointer, and the drop commits once after the settle. The grabber and the empty title space of a group not at the top edge (getPartTitleDragSource) start it viaPartGrid.startPartDrag(id, e). Merge (whole-target highlight) where allowed, including chat windows; editor drags get new-part zones at the window edges.5f1a661f5a3(P15b)windowGroups, so also in created parts): merged into a created part it still closes the window, moves out of it, and returns to the chat part before a layout command (_findChatGroup,_returnChat).b756f352bd3(P14)ChatWindowTerminalsmoved every terminal editor that opened in the main part to the terminals part; it now moves only new terminals (an editor moved from another group is still in that group as it opens).4cafae9b298(P13)054af735586(P13)c5df398a36f(fix-first)PartGrid.setPreviewLayoutAllowed; in chat windows the terminals part and parts whose active editor is a terminal only clip while cards make way, so PTYs don't resize during previews or on cancel. M4 (P14, P15): a drop that still settles is dropped when the grid disposes (no part created); a new drag still settles the previous one. M5 (P15b): no merging into the terminals part, as for the chat. L1 blur cancels a card drag. L2 new-part zones followsplitOnDragAndDropand its toggle key, and the copy key copies. L3 Move Part restores the other sizes inside the glide. L4 created parts are named Editor 2, Editor 3, …. L5 commands also neededitorPartInPartGrid. L6 the overlay anchor registry keeps the hidden count across re-anchoring (base tests). L7 the grabber's hit area stops at its grip.Decisions
-webkit-app-region: drag); that keeps working, and the title (no-drag) drags the chat.Validation
Run on this branch, on Block 2
4db00ac8c50: typecheck, ESLint, the partGrid and chatWindow suites and browserView'soverlayManager.test(7 passing) on0969de721cd; the others onedb53e5eb4f(later changes touch only PartGrid, its CSS and the browser overlay list).pnpm run typecheck-clientpnpm run eslinton every.tsfile the branch changesnode test/unit/browser/index.js --browser chromium --runList <every test file the branch changes>./scripts/test.sh --runGlob "vs/workbench/test/browser/parts/editor/**/*.test.js"./scripts/test.sh --runGlob "vs/workbench/test/browser/parts/partGrid/**/*.test.js"./scripts/test.sh --runGlob "vs/workbench/test/browser/dnd.test.js"./scripts/test.sh --runGlob "vs/workbench/services/editor/test/browser/**/*.test.js"./scripts/test.sh --runGlob "vs/sessions/test/browser/**/*.test.js"./scripts/test.sh --runGlob "vs/sessions/contrib/sessions/test/browser/**/*.test.js"./scripts/test.sh --runGlob "vs/{workbench,sessions}/contrib/chatWindow/test/**/*.test.js"Live validation (§7.3)
Agents window from this worktree (
build-fast), isolated copy of an authenticated profile,sessions.chatWindows.enabled: true, driven over CDP. The second run used realistic focus (document.hasFocusfalse in the window not in front).Found live and fixed in this PR: editor drops onto the chat input split the part (now the input's); the part factory created its element in the child window's JavaScript context (now in the main window's, attached to the chat window); Move Part could move past the title row (now parts only).