Expand description
workspace service handlers for pinning a pane to its window: PinBlockToWindow and UnpinBlockFromWindow
(docs/specs/SPEC_PIN_TRANSFORM_FACILITY_2026_12_02.md §9). A pin is a flag: the pane stays in its tab and in that
tab’s layout, and the page draws it over the other tabs at the place it has in its own. So a pin, and an unpin in
the pane’s own tab, are one reducer command and change no layout. Unpinned in another tab, the pane moves into that
tab: onto the edge it was on, at its own thickness.
Structs§
- Undo 🔒
- What a failed
move_paneputs back: where each block sat in its tab’s list, and each tab’s layout row.
Constants§
- FLOATING_
WORKSPACE_ 🔒META - The workspace meta key the tear-off saga sets on the workspace of a pane torn into a window of its own: a floating window has one pane and no tabs to follow, so a pane of it is not pinnable.
Functions§
- handle_
pin_ 🔒block_ to_ window PinBlockToWindow(workspaceId, blockId).- handle_
unpin_ 🔒block_ from_ window UnpinBlockFromWindow(workspaceId, blockId, showingTabId): the tab that is showing takes the pane when it is not the pane’s own.- in_
floating_ 🔒window - Whether
block_idis a pane of a floating window: the workspace of its tab carries the tear-off’s mark. - layout_
row 🔒 - A tab’s layout row as it is now (none when the tab has none).
- mark_
floating_ 🔒window - Mark
workspace_id, the workspace of a window a pane was just torn into, as a floating window’s. Not a step of the tear-off saga: the saga’s recovery has no inverse for a meta patch, and deleting the workspace removes the mark anyway. - move_
pane 🔒 - Move the pane
stack(its tabs, in order;activeshows) from tabsrcinto tabdst, as a band onband‘s edge at its thickness: the blocks first, then out of the one layout and into the other. All or nothing: a step that fails puts back the blocks already moved, at their places in the source tab, and both tabs’ layouts. - move_
pane_ 🔒steps - pane_
rect 🔒 - Where the pane that holds
block_idsits in its own tab, as fractions of the tab’s area: the place a pinned pane is drawn at in every tab. None when its tab’s layout does not hold it. - pin_
block 🔒 - Pin the pane that holds
block_idto the window of workspaceworkspace_id. Nothing moves. Refused for a floating pane, and by the reducer’s rules. - pin_
holding 🔒 - The pin of the pane that holds
block_idin workspaceworkspace_id: the pin ofblock_iditself, or of the tab of its stack that has one (only one tab of a pinned pane does). - pin_
updates 🔒 - The object updates a pin change owes the renderers: the tabs and their layouts (layouts first, as
tear_off::redock_updatesexplains), then the workspace. - put_
pane_ 🔒back - Undo a
move_panethat failed: each moved block goes back to its place insrc(the earliest place first, so each lands where it was), then, when the layouts were reached, both layouts are set back as they were. Best effort: the caller is already returning the error that started it, and tells the windows what is left (pin_updates). - put_
pins_ 🔒back - Pin again each pane that was pinned and no longer is: the reducer unpinned it when it was placed alone in an empty tab. Run once the pane is back in its own tab (the reducer refuses a pin on the only pane of a tab, so before that it would be refused).
- run_
command 🔒 - Run a command through the reducer, store its events and publish them. Its refusal is the error.
- stack_
in 🔒 - The tabs of the pane that holds
block_idin tabtab_id’s layout, in order, and the one showing. A pane with no stack (or a block the tree does not hold) is just itself. - stack_
into_ 🔒tab - The rest of a stack, in order, as tabs of the pane
stack[0]that is already intab_id’s layout;activeshows. - unpin_
block 🔒 - Unpin the pane that holds
block_id. In its own tab (or with nodst_tab_id) only the pin goes. In another tab, the tab that is showing, the pane and all of its stack of pane tabs become a pane of that tab first, on the edge it was on; its own tab keeps its other panes.