stage 512x384, so a replay can open

"Your screen cannot fit a window of that size" on Extras > Play Recording.
The replay window is 504x342 — exactly expert, which the 512x352 stage holds
with ten pixels to spare — so the message is not about the window it is about
to draw.

Not a positional check either, which was the first guess: from a centred
beginner window an expert window would run 236px off the right edge, and the
game repositions it without complaint. It is a minimum-screen check wanting
slack it never spends, roughly the title bar it does not have here.

Measured rather than reasoned about, on a stage enlarged for the purpose: the
replay window is 504x342, the file dialog 420x239. Then 512x352 verified
refusing a replay and 512x384 verified opening one.

The height is the whole fix; the width is unchanged. That matters because 42
more pixels of stage cost nothing at the sizes people use: the panel caps the
scale at 2x, so any stage up to about 726x451 draws the game at exactly the
same size. The stage only starts costing pixels once the fit falls under the
cap — which is also why the number is generous rather than the minimum that
passes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Officer-Session: de3ed4e6-f88a-429c-94e6-a760336ba83b
This commit is contained in:
2026-08-23 22:54:04 +00:00
co-authored by Claude Opus 5
parent e5a7c5ffff
commit 5c8c7937f5
3 changed files with 26 additions and 11 deletions
+6 -1
View File
@@ -82,7 +82,7 @@ The check that matters is `ss -lntp` against the **running** process. Reading th
listener that exists because a flag is missing, and running the same arguments by hand did not reproduce listener that exists because a flag is missing, and running the same arguments by hand did not reproduce
it either. it either.
**The game is centred on a fixed stage, and the whole stage is what you see.** The framebuffer is 512x352 **The game is centred on a fixed stage, and the whole stage is what you see.** The framebuffer is 512x384
whatever the difficulty, `sidecar/session.ts` keeps the window in the middle of it, and the panel draws the whatever the difficulty, `sidecar/session.ts` keeps the window in the middle of it, and the panel draws the
framebuffer entire — scaled to fit, never cropped. So changing difficulty moves the board rather than framebuffer entire — scaled to fit, never cropped. So changing difficulty moves the board rather than
resizing the panel, and the surround is teal (`-solid`) rather than the root's black. resizing the panel, and the surround is teal (`-solid`) rather than the root's black.
@@ -96,6 +96,11 @@ stay regular is the CELL: the board is a 16px grid, so every quarter step gives
overshoot, and quarters all the way down rather than whole numbers under 2x because otherwise zooming out overshoot, and quarters all the way down rather than whole numbers under 2x because otherwise zooming out
from a 2x baseline falls straight to 1x and halves the board in one press. from a 2x baseline falls straight to 1x and halves the board in one press.
The stage is 512x384 rather than 512x352 because the game refuses to open a REPLAY on a screen only ten
pixels taller than the board — "Your screen cannot fit a window of that size", for a window it is about to
draw at exactly 504x342. It wants slack it never spends. Growing the stage is free at the sizes people use:
the scale is capped at 2x, so anything up to about 726x451 draws the game identically.
The BASELINE — the size at 100% — is capped at 2x. Fitting the panel is not the same as looking right, and The BASELINE — the size at 100% — is capped at 2x. Fitting the panel is not the same as looking right, and
past 2x this stops reading as a window on a desktop. past 2x this stops reading as a window on a desktop.
+19 -9
View File
@@ -54,18 +54,28 @@ export type SessionStatus = {
* so the size here decides which step it lands on, and the steps are far apart. In a 1866-device-pixel * so the size here decides which step it lands on, and the steps are far apart. In a 1866-device-pixel
* panel: 800 wide gives 2x, 560 wide gives 3x. Same panel, half again as much game. * panel: 800 wide gives 2x, 560 wide gives 3x. Same panel, half again as much game.
* *
* 512x352 is expert (504x342, measured) plus four pixels a side. There is no room left to give: expert * 512x384. The width is expert (504x342, measured) plus four pixels a side; the HEIGHT is not, and the
* and intermediate are both 342 tall, so anything shorter clips a board somebody actually plays. * extra 42 is load-bearing.
* *
* Two things get clipped at this size, and both are deliberate. A CUSTOM board larger than the stage * At 512x352 — expert plus ten pixels of height — the game refuses to open a replay with "Your screen
* loses its right and bottom edges — `centre` clamps at zero, so the menu bar stays reachable. And the * cannot fit a window of that size", even though the replay window is exactly the 504x342 it just
* Extras → Auto Options dialog is 328 wide and opens 25px right of the game window, which needs a stage * measured. It is not a positional check: from a centred beginner window the expert window would run
* 554 wide to fit whole when the board is beginner. That dialog cannot be closed from the panel anyway * 236px off the right edge and the game repositions it happily. It is a minimum-screen check with slack
* (no window manager, so no title bar, and it has no OK button) — see the README. Fix that first, then * the game never spends, and the slack it wants is roughly a title bar it does not have here. 384 was
* revisit this number. * verified by opening an expert replay; 352 was verified refusing one.
*
* Growing the stage costs nothing at the sizes people use, which is why the number is generous rather
* than minimal: the panel caps the scale at 2x, so anything up to about 726x451 draws the game at exactly
* the same size. The stage only starts costing pixels once `fit` drops below the cap.
*
* Two things are still clipped here, both deliberate. A CUSTOM board larger than the stage loses its
* right and bottom edges — `centre` clamps at zero, so the menu bar stays reachable. And Extras → Auto
* Options is 328 wide and opens 25px right of the game window, so it needs a 554-wide stage to fit whole
* from beginner. That dialog cannot be closed from the panel anyway (no window manager, so no title bar,
* and it has no OK button) — see the README. Fix that first, then revisit the width.
*/ */
const SCREEN_W = 512; const SCREEN_W = 512;
const SCREEN_H = 352; const SCREEN_H = 384;
/** /**
* How often to check whether the board changed size. * How often to check whether the board changed size.
+1 -1
View File
@@ -20,7 +20,7 @@ type SessionStatus = {
// //
// Only a placeholder until `onReady`, which sizes the canvas from the real framebuffer. Drift with the // Only a placeholder until `onReady`, which sizes the canvas from the real framebuffer. Drift with the
// sidecar's stage costs one frame of the wrong aspect ratio and nothing else. // sidecar's stage costs one frame of the wrong aspect ratio and nothing else.
const PLACEHOLDER = { width: 512, height: 352 }; const PLACEHOLDER = { width: 512, height: 384 };
const BUTTON_MASK: Record<number, number> = { 0: 1, 1: 2, 2: 4 }; const BUTTON_MASK: Record<number, number> = { 0: 1, 1: 2, 2: 4 };