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
+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
* 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
* and intermediate are both 342 tall, so anything shorter clips a board somebody actually plays.
* 512x384. The width is expert (504x342, measured) plus four pixels a side; the HEIGHT is not, and the
* extra 42 is load-bearing.
*
* Two things get clipped at this size, and both are 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 the
* Extras → Auto Options dialog is 328 wide and opens 25px right of the game window, which needs a stage
* 554 wide to fit whole when the board is 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 this number.
* At 512x352 — expert plus ten pixels of height — the game refuses to open a replay with "Your screen
* cannot fit a window of that size", even though the replay window is exactly the 504x342 it just
* measured. It is not a positional check: from a centred beginner window the expert window would run
* 236px off the right edge and the game repositions it happily. It is a minimum-screen check with slack
* the game never spends, and the slack it wants is roughly a title bar it does not have here. 384 was
* 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_H = 352;
const SCREEN_H = 384;
/**
* How often to check whether the board changed size.