Expand description
Where a torn-off pane came from, and where a redock puts it back (SPEC_FLOATING_PANE_REDOCK_TO_ORIGIN_2026_11_03.md).
At tear-off the source tab’s tree is read before the pane leaves it, and a small record goes into the
block’s meta (floater:origin, persisted with the block): the tab, the pane’s tab-mate if one stays, and up
to four neighbouring panes (nearest first) with the split axis, side and size share the pane had next to
each. A redock by the button walks that record against the origin tab’s tree as it is now and returns the
first place that still exists; with none left it does what it always did. The functions that read and
decide are pure, over a LayoutNode.
Structs§
- Anchor 🔒
- A neighbouring pane the torn-off pane can be put back beside.
- Origin
Record 🔒 - Where a floating pane was torn from.
Enums§
- Resolution 🔒
- Where a redock puts the pane.
Constants§
- FRACTION_
RANGE 🔒 - The share of the two panes’ size the torn-off pane may take back, so a stale or odd size never gives a sliver or hides the neighbour.
- MAX_
ANCHORS 🔒 - How many neighbours are remembered.
- META_
KEY 🔒 - The block meta key that holds an
OriginRecord.
Functions§
- clear 🔒
- Drop the record from each of these blocks: the pane is docked again, by whatever path, or a new tear-off has nothing to remember and must not leave an older record to be found later.
- first_
shown_ 🔒block - The visible block of the first pane under
nodethat is not a minimized chip. - patch_
block_ 🔒meta - path_to 🔒
- The nodes from the root down to the pane holding
block_id, as (parent, index of the child on the path), and that pane. - place_
at_ 🔒anchor - Put
block_idbeside the neighbouranchornames, on its recorded side and with its recorded share. Falls back to the layout’s next free place when that pane is gone by now (place_block). - record_
for 🔒 - The record for the blocks about to be torn out of
tab_id, read from srv’s tree. Call before they leave it. - record_
from_ 🔒tree - The record for a pane about to leave
tab_id:tornare the blocks that leave, the first being the one the record is stored on.Nonewhen there is nothing to come back to (a pane alone in its tab, with no tab-mate). - remember 🔒
- Keep
recon the blocks that just left, or, when there is none to keep, drop any older one they carry. - resolve 🔒
- Where
recputs the pane back, given the origin tab’s tree as it is now. A tab-mate that is still in a pane wins (the pane never left); else the first neighbour that is still a shown pane, which is the nearest one since the list is ordered by nearness; elseFallback. “Beyond recognition” is exactly that last case: the tab is gone (the caller’s check), or no recorded neighbour is a pane of it that is not a chip. - resolve_
for_ 🔒block - The record on
block_idand where it resolves to now.None: no record, or its tab is gone or its workspace is open in no window (the pane would go where nobody sees it), which a caller treats asFallback. - share 🔒
- store 🔒
- Keep
recon each of the blocks that left (whichever one a redock asks about finds it), so it survives a restart. - target_
for 🔒 - Where a redock by the button goes: the origin’s tab and workspace and how the pane is placed there, or, when
nothing is recognisable, the tab the caller named and
Fallback.