Rebuild Displays around the canvas, and let the transaction keep color

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-24 10:44:11 -04:00
parent 1f694b00b6
commit 9bc68ba358
29 changed files with 3065 additions and 388 deletions
@@ -75,6 +75,36 @@ ShellRoot {
})));
}
// One display is the common case on a laptop, and the canvas is the
// page's hero now: it renders that display rather than disappearing and
// leaving a picker for a list of one. Only dragging goes away, because
// there is nothing to arrange it against.
function soloFixture(): string {
const previous = fixtureService.monitors;
fixtureService.monitors = [previous[0]];
arrangement.resetDraft();
const snapshot = arrangement.canvasSnapshot();
fixtureService.monitors = previous;
arrangement.resetDraft();
return JSON.stringify(snapshot);
}
// A mirrored display has no position of its own -- the compositor puts
// it on top of its target -- so the canvas stacks it there and says so
// rather than drawing it wherever its stale coordinates point.
function mirrorFixture(): string {
const previous = fixtureService.monitors;
fixtureService.monitors = [
previous[0],
Object.assign({}, previous[1], { mirrorOf: "DP-2" })
];
arrangement.resetDraft();
const snapshot = arrangement.canvasSnapshot();
fixtureService.monitors = previous;
arrangement.resetDraft();
return JSON.stringify(snapshot);
}
function identify(): void { Displays.identify(); }
function identifying(): bool { return Displays.identifying; }
}