Expand description
workspace service handlers — floating-pane / torn-off tab flows
(TearOffBlock, RedockFloatingPane, TearOffTab). Split out of
workspace.rs; see that file’s dispatcher for the full method list.
Structs§
- Redock
Args 🔒 - The arguments of
RedockFloatingPane, in the order the renderer sends them. The first five are required.
Functions§
- dock_
stack_ 🔒members - The rest of the stack, in order, as tabs of the pane that just landed. A failure part-way leaves the members already docked docked, and this one and any after it in the floater (which stays open while it holds them); the layout updates for the docked ones are still published, then the failure is reported.
- handle_
redock_ 🔒floating_ pane - handle_
tear_ 🔒off_ block - handle_
tear_ 🔒off_ tab - place_
in_ 🔒target - Target layout: enqueue the appropriate action on its
pendingbackendactions. Phase 4b: when a direction hint is present, queue SplitHorizontal/SplitVertical so the block lands in the exact slot the ghost previewed. Otherwise fall back to the generic InsertNode (Phase 4a behavior). - publish_
redock_ 🔒updates - The redock’s object updates, also broadcast on the event bus.
- put_
redocked_ 🔒block_ back - Undo a redock whose layout step failed after the
MoveBlocksaga movedblock_idtotarget_tab_id: move it back tosource_tab_idand, if the source tree no longer holds it, append it there. Best effort; the caller is already returning the original error. - redock_
as_ 🔒tab - Place a just-redocked block as a TAB of the pane holding
target_block_id, active whenactivate: the reducer’s own tree first (LayoutStackPush, which also checks the block now lives in this tab), then a queuedstackpushso the window showing that tab adds the pill. Same backend-then-frontend shape aspane.moveTab. - redock_
stack_ 🔒member - Move one more member of a floater’s stack into the target tab and place it
as a tab of the pane
pane_block_id(already docked there). Visible there only whenactivate. On a failed layout step the block goes back to the floater, as for the first member. - redock_
updates 🔒 - The object updates a redock owes the renderers: the source and target tabs and their layouts. Layout updates MUST come first: the queue helpers persist via the reducer route (SPEC_864 Phase 4), whose SQLite write is NOT auto-broadcast (only the row gets a new version). Without them the target window never sees the new leaf and renders nothing, and the source’s pending delete action never gets pulled. Both layouts are read AFTER the helpers return: they persist synchronously inside the reducer lock, so the re-read sees the appended actions.
- torn_
off_ 🔒updates - The object updates a tear-off owes the renderers: the source tab, the source workspace and the new one.