feat: route live vacuum overlays to the active map space

User-Visible: yes
Issue: #162
This commit is contained in:
Codex
2026-09-03 19:18:13 +03:00
parent 9126e5b430
commit c38501ef50
9 changed files with 294 additions and 21 deletions
+24
View File
@@ -291,6 +291,30 @@ const MUTANT_DEFINITIONS = [
replace: " if (candidates.length >= 1) return { kind: 'adopted', route: candidates[0] };",
}],
},
{
id: 'vacuum-overlay-ignores-the-rendered-space',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+ '&& node --test test/vacuum-routes.test.mjs',
because: 'the live puck belongs to the ACTIVE ROUTE space, not to every space that '
+ 'happens to be on screen: dropping the check draws one robot on both floors (#162)',
patches: [{
file: 'src/vacuum-routes.ts',
find: " const live = active && active.space === input.renderSpace\n ? normalizeRouteMatrix(active.calibration) : null;",
replace: ' const live = active ? normalizeRouteMatrix(active.calibration) : null;',
}],
},
{
id: 'vacuum-previous-run-follows-the-robot',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+ '&& node --test test/vacuum-routes.test.mjs',
because: 'the previous run belongs to the space of its own route, so it keeps showing '
+ 'where the robot has been after it moved to another map (#162, AC10)',
patches: [{
file: 'src/vacuum-routes.ts',
find: ' const previousAllowed = !!previousRoute\n && previousRoute.space === input.renderSpace',
replace: ' const previousAllowed = !!previousRoute\n && !!active && active.space === input.renderSpace',
}],
},
{
id: 'area-snapshot-cleanup-ignores-authority',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '