mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
feat: route live vacuum overlays to the active map space
User-Visible: yes Issue: #162
This commit is contained in:
@@ -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 '
|
||||
|
||||
Reference in New Issue
Block a user