Make tool-managed lane splits visually transparent: collapse display + lazy-mint

Drive C_LANESCOLLAPSED=2 and hide lane buttons only on tracks the tool itself splits
(gated on the pre-write I_FREEMODE read, so user comp-lane display prefs are never
stomped). Lazy-mint managed lanes only for modes with own content, never an empty
reserved lane; confinement holds via C_LANEPLAYS on the lone lane.
This commit is contained in:
2026-07-24 05:44:19 -04:00
parent ff2c3ebce5
commit 314cd7bf36
4 changed files with 131 additions and 23 deletions
+13 -8
View File
@@ -641,14 +641,19 @@ struct LaneMintPlan {
// * A track visible in exactly ONE mode (single-mode leaf, single-mode folder) stays
// whole-track-parked (D1) — NO split. This is the single-mode-track rule.
// * On a split: one TrackSplit (laneCount == number of lanes to mint), one LaneMint per
// involved mode, and one LaneAssign per managed-eligible OWN item onto ITS tagged
// mode's lane — INCLUDING pre-existing items, so a folder carrying one own Design item
// while derived-visible in Arrange too still lanes that item to the Design lane (it
// then hides+silences whenever Arrange is active). The lanes minted are the union of:
// the modes the track's own items belong to, PLUS the modes the track is visible in
// so a folder whose own item is Design-only but which is derived-visible in Arrange
// mints BOTH a Design lane (holding the item) and an Arrange lane (empty, reserving
// the Arrange stance's slot), matching "each mode owns a fixed lane."
// mode the track's OWN items occupy, and one LaneAssign per managed-eligible OWN item
// onto ITS tagged mode's lane — INCLUDING pre-existing items, so a folder carrying one
// own Design item while derived-visible in Arrange too still lanes that item to the
// Design lane (it then hides+silences whenever Arrange is active).
// * LAZY-MINT: lanes are minted ONLY for modes the track's own items actually occupy
// never an empty reserved lane for a mode the track is merely derived-visible in. So a
// folder whose own item is Design-only but which is derived-visible in Arrange mints a
// Design lane ONLY (holding the item), NOT an empty Arrange lane. Confinement still
// holds: with only a Design lane present, toggling to Arrange drives that lane's
// C_LANEPLAYS to 0 (hide+silence) and no lane plays, so the track reads as an empty
// normal track and the Design item does not leak. The Arrange lane is minted on demand
// when an Arrange item first lands. The derived-visibility trigger still decides WHETHER
// to split; it no longer inflates WHICH lanes are minted.
//
// Items with an empty GUID or empty modeId are skipped (defensive; a real item always
// resolves to a mode). The function mutates nothing — it returns a plan the shell