Fix Wave-2 review findings: FX union on re-park, per-project reconcile memo, shared undo mask, decayed test oracle

This commit is contained in:
2026-08-06 17:50:49 -04:00
parent c4038a9e9c
commit 024c619884
9 changed files with 244 additions and 105 deletions
+1 -13
View File
@@ -41,18 +41,6 @@ namespace {
// deliberately excluded, nothing is moving there.
constexpr int kTransportMoving = 1 | 4;
// The domains one apply actually writes: track config/routing (visibility,
// B_MAINSEND, I_FXEN, I_SOLO), item lane assignment, and the ext-state block
// (UNDO_STATE_MISCCFG covers extension state). NOT UNDO_STATE_ALL, and no
// UNDO_STATE_FX at all — the apply moves no FX state, so making every undo record
// carry the project's whole FX chunk would cost with the plugin count for nothing.
// [verify — DAW] INFERRED, not documented: UNDO_STATE_TRACKCFG reads "track/master
// vol/pan/routing" (reaper_plugin.h:1541) and names neither the fixed-lane properties
// (assumed to ride UNDO_STATE_ITEMS, :1543) nor B_SHOWINTCP/B_SHOWINMIXER — and for
// the visibility pair that inference is now DISPROVEN in the DAW: REAPER's undo does
// not restore them, which is what view_reconcile exists to repair.
constexpr int kApplyUndoMask = UNDO_STATE_TRACKCFG | UNDO_STATE_ITEMS | UNDO_STATE_MISCCFG;
// applyMode is reachable from the load tick, the actions and render_in_place. Nothing
// it calls is known to pump the message loop now that the FX writes are gone, but a
// re-entrant apply would plan against the same model the outer loop is iterating and
@@ -199,7 +187,7 @@ bool applyMode(ViewModeModel& model, const std::string& targetModeId, ReaProject
if (laneModeChanged) UpdateTimeline();
const bool mint = applyMintsUndoPoint(realSwitch, wrote);
Undo_EndBlock2(project, mint ? undoLabel.c_str() : "", mint ? kApplyUndoMask : 0);
Undo_EndBlock2(project, mint ? undoLabel.c_str() : "", mint ? kViewUndoMask : 0);
// The tool's own account of what it just left driven — the only one that survives
// an undo rolling the model back underneath it.