Name refused tracks before Undo_EndBlock2, not after; tighten the route-list doc; pin the refusal memo's gate

Fixes D (handle lifetime), C (ASCII dashes), G (comment compression), I (shouldReport extracted + tested); CLAUDE.md route list corrected per A/B/H. E pushed back -- cross-module GUID plumbing is architectural, not a targeted fix.
This commit is contained in:
2026-08-05 17:34:49 -04:00
parent 5376ab085c
commit 4b306dd436
5 changed files with 100 additions and 54 deletions
+4 -4
View File
@@ -442,7 +442,7 @@ bool applyMode(ViewModeModel& model, const std::string& targetModeId, ReaProject
int undoMask = kApplyUndoMask;
bool laneModeChanged = false;
std::vector<MediaTrack*> refusedParks;
std::vector<std::string> refusedParkNames;
Undo_BeginBlock2(proj);
{
@@ -464,10 +464,10 @@ bool applyMode(ViewModeModel& model, const std::string& targetModeId, ReaProject
MediaTrack* tr = resolve(trackByGuid, guid);
if (!tr) continue; // stale GUID — prune
// Full contract at decidePark; view_fx_park owns the live reads.
// decidePark's contract; view_fx_park owns the reads. A refusal is named HERE, not held past Undo_EndBlock2.
const ParkAction action =
decideParkForTrack(tr, model.snapshot(guid) != nullptr, tp.flags);
if (action == ParkAction::Refuse) { refusedParks.push_back(tr); continue; }
if (action == ParkAction::Refuse) { refusedParkNames.push_back(trackDisplayName(tr)); continue; }
// Enqueued FIRST: a park landing on this track's own pending restore
// cancels it, and those ops are then the only surviving record of the
@@ -539,7 +539,7 @@ bool applyMode(ViewModeModel& model, const std::string& targetModeId, ReaProject
// After the undo block and the UI hold: a refusal is a report, not a project
// write, and it must not join what a Ctrl-Z rolls back.
reportRefusedParks(proj, refusedParks);
reportRefusedParks(proj, refusedParkNames);
return true;
}