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
+12 -8
View File
@@ -220,15 +220,19 @@ LaneMintPlan planLaneMinting(const ViewModeModel& model, const FolderTree& tree,
// this is the load-bearing "don't lane-split single-mode tracks" rule.
if (!multiMode) continue;
// Lanes to mint = the UNION of the modes the own items belong to and the modes the
// track is visible in. A folder whose own item is Design-only but which is derived-
// visible in Arrange too mints BOTH a Design lane (holding the item) and an Arrange
// lane (reserving Arrange's stance slot), matching "each mode owns a fixed lane."
std::set<std::string> laneModes = ownItemModes;
if (visIt != visibleModesOf.end())
laneModes.insert(visIt->second.begin(), visIt->second.end());
// Lazy-mint: lanes to mint = ONLY the modes the track's OWN items actually occupy —
// never an empty reserved lane for a mode the track is merely derived-visible in.
// A folder whose own item is Design-only but which is derived-visible in Arrange too
// mints a Design lane ONLY (holding the item); it mints NO Arrange lane. Confinement
// still holds: with only a Design lane present, toggling to Arrange drives that lane's
// C_LANEPLAYS to 0 (it hides+silences) and no lane plays, so the track reads as an
// empty normal track — the Design item does not leak. The Arrange lane is minted on
// demand the moment an Arrange item first lands (a later mint tick sees ownItemModes
// gain Arrange). The visibility trigger above still decides WHETHER to split; it no
// longer inflates WHICH lanes are minted.
const std::set<std::string>& laneModes = ownItemModes;
// Transition to lane-split: one managed lane per involved mode (durable key =
// Transition to lane-split: one managed lane per own-content mode (durable key =
// laneNameForMode(mode)), owned by that mode.
plan.splits.push_back(LaneMintPlan::TrackSplit{
track.trackGuid, static_cast<int>(laneModes.size())});