Skip to main content

Module tear_off

Module tear_off 

Source
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§

RedockArgs 🔒
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 MoveBlock saga moved block_id to target_tab_id: move it back to source_tab_id and, 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 when activate: the reducer’s own tree first (LayoutStackPush, which also checks the block now lives in this tab), then a queued stackpush so the window showing that tab adds the pill. Same backend-then-frontend shape as pane.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 when activate. 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.