Hold'em: every seat on the ring is the same seat, and the ring is measured before it is believed #122

Open
jheaps wants to merge 27 commits from polish/holdem-seats-one-size into master
Owner

Nine chairs on the ring, and until this no two of them were the same size.

Measured at 1280x900 with five players seated: 64px for Bob, 70 for Christopher because his name wrapped, 71 for Alexandra because she had chips out, 89 for "Mike from work" who had both. Twenty-five pixels of difference around one ring.

The ragged edge was the smaller half of it. The larger half is that the sizes moved: a puck grew 17px the moment its player put money in and shrank again when the street closed, so the felt reflowed twice a hand under the thumb of someone trying to tap it — and because the ring is sized against the tallest puck on it, the whole table could resize with it.

One puck, one size

Three rows are held open instead — name, amount, stack — at a height that does not depend on what is written in them. The name gets one line whatever it says, the amount pill keeps its row when it is empty rather than collapsing, and each row is a token rather than an em, so an amount stepping its type down to fit shortens its digits and not its row.

It costs nothing. measuredSeatBox already took the tallest puck on the ring, on purpose, so the room was reserved at every seat and the short ones simply weren't drawn into it. What pays for the third row is the second line of name going away: an earlier round measured uniform-with-two-lines at 88px and rightly refused it. Uniform-with-one is 71.

A name with no word left to drop steps its type down instead of ellipsising. fitSeatNames turns "Mike from work" into "Mike", which is what the table calls him, and could do nothing at all with "Christopher" — so that one was cut to "Christo…" on a felt that may also have a Christine at it. The amounts on the same puck have never taken that trade. One step, floored at 9px, then the ellipsis.

The float that kept the button seat's name off the dealer chip goes with the second line. Left in place with a one-line clamp it drew "Christopher" as an empty label. Three rules become one, and the padding is widened from 22px to 25 so it actually covers the chip and the gap it is inset by.

The ring was sized from pucks with nothing in them

renderSeats builds nine empty pucks and fills them afterwards, so the layout search ran against blank boxes and cached the answer under a key naming a table it had never measured. The comment where it was cached said "let the resize that follows do this properly".

Nothing resizes a phone. Turning the phone sideways and back was the only thing that ever fixed it — and it fixed it into a different layout:

390x844, same table puck names
fresh load 90px "Mike from work" over two lines
rotate away and back 72px "Christ…", "Mike"

The finished pucks are now measured against the box the search settled on, and if they disagree the search is asked again with the real thing in front of it. Once; the second answer is cached. Fresh load and rotate-and-back agree exactly.

That also lets the cache key shrink to almost nothing. It used to name every player's name, the dealer's seat, whether anybody had cards and whether anybody had chips out — four things, three of which flip during an ordinary hand, each flip a ten-candidate re-search. None of them can change a puck's height any more. Measured over three calls in a row: no re-search, and not one of the nine seats moved a pixel.

The crowded ring pays its own way

.seatsTight gives up the 1.4 leading on its money rows for the row it now holds open — 10px of figures is 12px of ink and the rest was blank. Without it the Galaxy S8 twelve-handed, where the pucks are already at the 44px floor, put neighbouring seats' blind badges down onto each other's "ALL IN". Hanging the badges further out was tried first and is the wrong direction: the badge landing on a stack figure belongs to the seat next door, so every pixel further out is a pixel further onto a neighbour.

Checks

  • 992 unit tests pass. 19 of the new and rewritten assertions fail against the previous source.
  • 320 layout audits across 13 viewports, with a mouse and with a thumb: one failure, the chip $1,300 is behind seat 11 that master already carries. Measured on master first to be sure.
  • Every viewport in the sweep now reports exactly one puck width and one puck height across all nine seats.
Nine chairs on the ring, and until this no two of them were the same size. Measured at 1280x900 with five players seated: **64px for Bob, 70 for Christopher because his name wrapped, 71 for Alexandra because she had chips out, 89 for "Mike from work" who had both.** Twenty-five pixels of difference around one ring. The ragged edge was the smaller half of it. The larger half is that the sizes *moved*: a puck grew 17px the moment its player put money in and shrank again when the street closed, so the felt reflowed twice a hand under the thumb of someone trying to tap it — and because the ring is sized against the tallest puck on it, the whole table could resize with it. ## One puck, one size Three rows are held open instead — name, amount, stack — at a height that does not depend on what is written in them. The name gets one line whatever it says, the amount pill keeps its row when it is empty rather than collapsing, and each row is a token rather than an em, so an amount stepping its type down to fit shortens its digits and not its row. It costs nothing. `measuredSeatBox` already took the tallest puck on the ring, on purpose, so the room was reserved at every seat and the short ones simply weren't drawn into it. What pays for the third row is the second line of name going away: an earlier round measured uniform-with-two-lines at 88px and rightly refused it. Uniform-with-one is 71. **A name with no word left to drop steps its type down instead of ellipsising.** `fitSeatNames` turns "Mike from work" into "Mike", which is what the table calls him, and could do nothing at all with "Christopher" — so that one was cut to "Christo…" on a felt that may also have a Christine at it. The amounts on the same puck have never taken that trade. One step, floored at 9px, then the ellipsis. The float that kept the button seat's name off the dealer chip goes with the second line. Left in place with a one-line clamp it drew "Christopher" as an empty label. Three rules become one, and the padding is widened from 22px to 25 so it actually covers the chip and the gap it is inset by. ## The ring was sized from pucks with nothing in them `renderSeats` builds nine empty pucks and fills them afterwards, so the layout search ran against blank boxes and cached the answer under a key naming a table it had never measured. The comment where it was cached said *"let the resize that follows do this properly"*. Nothing resizes a phone. Turning the phone sideways and back was the only thing that ever fixed it — and it fixed it into a *different* layout: | 390x844, same table | puck | names | | --- | --- | --- | | fresh load | 90px | "Mike from work" over two lines | | rotate away and back | 72px | "Christ…", "Mike" | The finished pucks are now measured against the box the search settled on, and if they disagree the search is asked again with the real thing in front of it. Once; the second answer is cached. Fresh load and rotate-and-back agree exactly. That also lets the cache key shrink to almost nothing. It used to name every player's name, the dealer's seat, whether anybody had cards and whether anybody had chips out — four things, three of which flip during an ordinary hand, each flip a ten-candidate re-search. None of them can change a puck's height any more. Measured over three calls in a row: **no re-search, and not one of the nine seats moved a pixel.** ## The crowded ring pays its own way `.seatsTight` gives up the 1.4 leading on its money rows for the row it now holds open — 10px of figures is 12px of ink and the rest was blank. Without it the Galaxy S8 twelve-handed, where the pucks are already at the 44px floor, put neighbouring seats' blind badges down onto each other's "ALL IN". Hanging the badges further out was tried first and is the wrong direction: the badge landing on a stack figure belongs to the seat *next door*, so every pixel further out is a pixel further onto a neighbour. ## Checks - **992 unit tests** pass. 19 of the new and rewritten assertions fail against the previous source. - **320 layout audits** across 13 viewports, with a mouse and with a thumb: one failure, the `chip $1,300 is behind seat 11` that master already carries. Measured on master first to be sure. - Every viewport in the sweep now reports exactly one puck width and one puck height across all nine seats.
jheaps added 1 commit 2026-09-10 11:08:51 -06:00
Nine chairs, and until this no two of them were the same size. Measured at 1280x900
with five players seated: 64px for Bob, 70 for Christopher because his name wrapped,
71 for Alexandra because she had chips out, 89 for "Mike from work" who had both.

The ragged edge was the smaller half of it. The larger half is that the sizes moved.
A puck grew 17px the moment its player put money in and shrank again when the street
closed, so the felt reflowed twice a hand under the thumb of someone trying to tap it
— and because the ring is sized against the tallest puck on it, the whole table could
resize with it.

Three rows are held open instead: the name, the amount, and the stack. The name gets
one line whatever it says, the amount pill keeps its row when it is empty rather than
collapsing, and each row is a token rather than an em so an amount stepping its type
down to fit shortens its digits and not its row. What the puck says changes all night;
how big it is does not.

It costs nothing. measuredSeatBox already took the tallest puck on the ring, on
purpose, so the room was reserved at every seat and the short ones simply weren't
drawn into it. What pays for the third row is the second line of name going away: an
earlier round measured uniform-with-two-lines at 88px and rightly refused it.
Uniform-with-one is 71.

  A name with no word to drop steps its type down instead of ellipsising. fitSeatNames
  turns "Mike from work" into "Mike", which is what the table calls him, and could do
  nothing at all with "Christopher" — so that one was cut to "Christo…" on a felt that
  may also have a Christine at it. The amounts on the same puck have never taken that
  trade; this is fitAmount's rule applied to the other thing a dealer reads across a
  table. One step, floored at 9px, then the ellipsis.

  The float that kept the button seat's name off the dealer chip goes with the second
  line — three rules of it, indenting the first line so a long name could drop below
  the chip onto a second. There is no second line to drop to, and left in place it drew
  "Christopher" as an empty label. The padding every crowded ring already used is the
  rule at all sizes now, widened from 22px to 25 so it actually covers the chip and the
  gap it is inset by.

Then the part that was quietly wrong. renderSeats builds nine empty pucks and fills
them afterwards, so the layout search ran against blank boxes and cached the answer
under a key naming a table it had never measured. On a 390px phone that is a ring
sized for empty seats — and the comment where it was cached said "let the resize that
follows do this properly". Nothing resizes a phone. Turning the phone sideways and
back was the only thing that ever fixed it, and it fixed it into a different layout:
same viewport, same table, 90px pucks on load and 72px after a rotate.

So the finished pucks are measured against the box the search settled on, and if they
disagree the search is asked again with the real thing in front of it. Once, and the
second answer is cached. Fresh load and rotate-and-back now agree exactly.

That also lets the cache key shrink to almost nothing. It used to name every player's
name, the dealer's seat, whether anybody had cards and whether anybody had chips out —
four things, three of which flip during an ordinary hand, each flip a ten-candidate
re-search. None of them can change a puck's height any more. Measured over three calls
in a row: no re-search, and not one of the nine seats moved a pixel.

The crowded ring gives up the 1.4 leading on its money rows to pay for the row it now
holds open — 10px of figures is 12px of ink and the rest was blank. Without it the
Galaxy S8 twelve-handed, where the pucks are already at the 44px floor, put
neighbouring seats' blind badges down onto each other's "ALL IN". Hanging the badges
further out was tried first and is the wrong direction: the badge landing on a stack
figure belongs to the seat next door, so every pixel further out is a pixel further
onto a neighbour.

992 unit tests. 320 layout audits across 13 viewports with a mouse and a thumb: one
failure, the chip behind seat 11 that master already carries.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-10 11:48:12 -06:00
Two things moved the felt, and neither of them was the felt's business.

The raise pad. It is 57px taller than the row it replaces, and the table was sized
against it — so pressing Raise shrank the whole thing, re-ran the ten-candidate width
search, redrew every seat at a different size, and undid all of it when the dealer
pressed Raise to. Measured, five players nine-handed:

  1280x900   felt 738x532 -> 669x481, pucks 120 -> 109, worst seat moved 73px
  360x640    felt 283x329 -> 283x279, pucks  44 ->  48, worst seat moved 50px
  390x844    felt 309x463 -> 309x451,                   worst seat moved 11px

Every raise, all night, at the one moment the dealer is reading the felt to decide
what to type. A phone held sideways already scored 0px: the rail is a column down the
side, and its height never was the table's business. So the felt is sized against the
bar at rest and the pad floats up over the bottom of it, which is what a transient
surface is supposed to do — the context it is over stays where it was. --actionBarHeight
is untouched and still says what is really covering the window, because that is what the
toast has to clear.

And the status row. It wraps, and flex settles its line breaks before it decides what
to shrink, so a name too long for the room left beside the clock and the undo pill did
not give way — it pushed them onto a third line. That is 22px off a felt underneath a
bar fixed to the bottom. Measured at 360x640 mid-street: "Dee · $600 behind" left the
table 283x329 and "Christopher · $1,200 behind" made it 283x310, with every seat moving
24px between one player and the next. Whose turn it was decided how big the table was.

An earlier round saw this and reserved two lines for the row; three is what it takes.
Reserving three would spend the 22px on every table for the sake of some of them. So
the actor, the clock and the undo pill get a line of their own that cannot wrap, and
the name shrinks into it — with the stack held out of the shrink, because a number read
wrong is a worse failure than a name read short. The row is 66px whoever is acting.

  It claims that line only when there is somebody on it. Claiming it unconditionally
  cost one in the state that can least afford it — a board running out has nobody to
  act, so the row is the undo pill alone, and it used to sit up beside "All-in —
  running out the board".

  The pill gives width back to the name on a phone: 10rem is 160px, and at 360 it took
  half the row, leaving "Christopher" cut to 23px of its 75. A media query, not
  `min(10rem, 34%)` — that was tried, and a percentage against a row sized to its own
  contents chases itself: the sweep caught the pill drawn 38px wide at ten viewports.

Verified by walking a hand at five viewports: one felt size, one puck width, and not
one seat moving, across a raise pad opened and shut and a full street of action.

1003 unit tests. 320 layout audits across 13 viewports with a mouse and a thumb, and
this is the first round in a while with nothing in them — the chip behind seat 11 on
the twelve-handed Galaxy S8, which master has carried for rounds, clears too.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-10 12:43:20 -06:00
The acting line names whoever the table is waiting on, and on a phone it
had stopped doing it. The name was set up as the half that gives way —
right rule, no floor under it. Flex shrinks the only item that can shrink
until the line fits, and with the clock button on the line there was no
fitting to be had: measured with five players nine-handed, mid-street,

  360x640   "Christopher" wanted 62px, drawn 0.  "Alexandra" 54 -> 0.
  390x844   "Christopher" wanted 62px, drawn 0.  "Alexandra" 54 -> 0.
  430x932   "Christopher" 62 -> 31.

What the bar read on the first two was "· $1,200 behind" — a dangling
separator and a figure, at the moment the dealer is looking at it to say
whose turn it is out loud. The ellipsis the rule was written around never
appeared; there were no characters left to put one after.

The rule stays: a number read wrong is worse than a name read short, so
the stack is never truncated. It comes off the line whole instead, and
it is not lost — the same figure is on that player's own seat puck.

The stopwatch pays for the rest. It was on the line from the first second
of every decision, reading "0:07" in grey: 50px of the narrowest row in
the tool spent on a number nobody acts on. It is a prompt, not a readout,
and it now arrives when the button that acts on it arrives — the same
thirty-second threshold, asked once.

  360x640   "Christopher" 62 -> 44 ("Christo…"), "Alexandra" 54 -> 44
  390x844   both whole, where both were nothing
  430x932   both whole
  and "Mike from work" whole at 360 where it was cut to 68

with the bar 151px and the felt 309x463 either side of the thirty-second
mark, and 0px of seat movement across it.

Also: the space before the separator. These are two flex items and a flex
item's own leading whitespace is collapsed at its edge, so the bar has
read "Alexandra· $1,500 behind" since the sentence was split in two. The
gap is in the stylesheet now, where it can survive that.

1018 unit tests; 320 layout audits across 13 viewports, clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-10 13:40:52 -06:00
Every length in this stylesheet that isn't a structural clearance is in
`rem`. That is the right way round — it means the page follows the
browser's font size, which is what a phone's text-size slider changes —
and it means there was a whole axis of behaviour that 320 audits had
never once touched, because every one of them ran at the default 16px.

The sweep gets a third pass: the same surfaces on the eight phone-shaped
viewports at 20px of root text, which is 125% on an Android slider.
Everything it found on its first run was caught by a check that had been
sitting there for months with nothing to say.

The page slid sideways. Three header buttons that will not break and will
not shrink — `white-space: nowrap` and a `min-width: auto` floor apiece —
were told `flex-wrap: nowrap`, so when they stopped fitting they had
nowhere to go: "Resolve Pot" ended 23px past the right edge of a 360px
window and put a horizontal scrollbar under the whole document; at 24px,
60px past the edge of a 390px one. They take a second row now on the day
they need one, and still fit on the first and still grow into it at any
ordinary size.

Figures painted over the seat next door. Which of the two type steps an
amount got was decided by counting characters — eight for one, ten for
the other — which is a guess at how wide a figure is that happens to hold
at one text size and one puck width. At 20px on a 44px puck, "$1,200" is
six characters, took no step at all, and wanted 38px of the 34 it had.
Render.fitAmounts measures now, in the batched passes fitSeatNames
already uses, and takes the separators out before it takes a step of
type: "$1200" at full size beats "$1,200" at three-quarters of it.

And the pucks grew, which the ring cannot answer. The row heights are px
tokens so an amount stepping its type down shortens its digits and not
its row — but a token is a floor, not a ceiling. At 125% the puck went
from 55px tall to 65 and twelve of them came down on each other, because
at the 44px floor a thumb needs there is nowhere narrower to search. The
two sizes a puck is written at are capped at exactly the sizes they have
always been drawn at, so nothing changes for anybody at an ordinary text
size — and the felt is a diagram, so the rule that already governed a
puck's width now governs its height. Roomy pucks are exempt; they have
the room. The same figure is in Standings in full, at whatever size its
owner asked for.

Two smaller things on the way. The landscape rail opened at its top, so
its overflow came off the bottom — where Cancel and Raise to are; it
opens at the end now, which is the same reason it is anchored low at all.
And the check that called those buttons unreachable was wrong: the rail
scrolls on purpose, and a sweep that cries wolf is a sweep nobody reads.

418 audits, clean. One shape it is not held to, with the arithmetic in
runUiAudit.js: twelve players all-in on a 360x640 phone leaves the felt
290x163 once the bar has taken 283px of the 640, and twelve 44x62 pucks
do not fit around an ellipse 163px deep. Reported as a note every run
rather than a failure every run. 1026 unit tests.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-10 14:13:34 -06:00
Two things on the felt and the bar that were spending weight on the wrong
half of what they had to say.

The undo pill names the last action, and on a phone it had stopped doing
it. It is a fixed width — its text changes on every tap, and a control
that resizes under a thumb reads as the interface twitching — and that
width leaves the label 73px. Measured across one hand, four of the five
labels a hand produces wanted more:

  ↶ dealing the hand        104     ↶ Christopher's fold      109
  ↶ Mike from work's fold   128     ↶ Alexandra's fold        100
  ↶ Dee's fold               69  (the only one that fitted)

so the safety net spent most of a night reading "↶ dealing …". Cut as one
string it keeps the wrong half: "↶ Mike from wor…" names everybody except
the action. So an action's name is handed to commit() in two halves now —
who it was, and what they did — and the actor comes off whole when the
act cannot fit beside it. The whole sentence stays on the button's title
and aria-label, which is what the guidance asks of a control that has had
to shorten its own name.

Two things fell out of it. The label cannot overflow — the act inside it
is the item with `overflow: hidden`, so it swallows the excess and the row
measures as though everything fitted — which is why the fit asks the act
and not the label; asked the label, "↶ dealing the hand" kept its actor
and quietly cut "the hand" off inside it. And the pill was still printing
a keycap on phones: every other control on the bar has dropped its cap
under `hover: none` since that rule was written, but this one is a
different class and had been left out of it, so the narrowest label on the
bar was the only one spending 22px on a shortcut nothing could press.
That 22px is exactly what "raise to $1,200" needed to keep its digits.

Nothing is cut now at any viewport in the sweep: a phone reads "↶ the
hand", "↶ Dee's fold", "↶ raise to $20", "↶ call"; a desktop and the
landscape rail keep the actor wherever it fits.

And the empty chairs. An open seat was drawn as a whole puck of near-black
on the green — the same box a seated player gets, at the same weight,
saying nothing. Five players nine-handed is four of them, and on the felt
they read as holes punched in the table: the eye had to sort the loud
empty boxes from the loud full ones before it could find who was in the
hand. The wash was there for one reason, which is that the chair number's
contrast cannot depend on whether its chair sits over the rim, the dark
green or the light — about Lc 5 across one ring. So the wash moved off the
chair and under the number, which is the only thing an open chair has to
say. The dashes still say "open", the box a thumb lands on has not moved a
pixel, and the felt gets four boxes' worth of quiet back.

1039 unit tests; 418 layout audits across 13 viewports, clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-10 16:21:40 -06:00
A puck can say four things about where a seat sits in the hand: small blind,
big blind, straddle, button. Three of them were pills hanging off the top-left
edge. The fourth was a 22px disc inside the top-right corner, on a layer above
the name — so the dealer's eye had two places to look for one class of fact,
and the corner one was charging the name 25px of its line to be there.

What that cost, measured across the sweep's tables with the twelve packed names:

  Galaxy S8  9-handed   name box  56px   11 of 12 fit — 7 on the button seat
  Galaxy S8 12-handed   name box  34px    7 of 12 fit — 1 on the button seat
  iPhone 14  9-handed   name box  68px   11 of 12 fit — 7 on the button seat
  desktop    9-handed   name box 105px   12 of 12 fit — 11 on the button seat

Four names in twelve, on a phone, cut on one seat and whole on the other eight.
And the button is the one marker on the felt that moves every hand, so that is
not four unlucky players — it is every player in turn, once a round, all night.

The chip now hangs off the same edge as the badges, at the same 5px, at the
other end of it. That distance is not free — SEAT_BADGE_OVERHANG_PX charges
every chair on the ring for it — but it is already spent, and it is charged
once per seat rather than once per marker, which stays right precisely because
the two markers share an edge and sit at opposite ends of it. So the ring does
not move at all. 12px is what fits between -5px and the top of the name on the
tight ring, and it is enough: a finger never reaches this chip anyway — on
touch the ghosts are pointer-events: none and the live one is inert, so giving
the button is the seat's long-press menu, and what is left is a mouse on a
ghost that only appears under the pointer.

Round where the badges are pills, and on the right where they are on the left,
because the button's gold and the big blind's now share one edge: what tells
them apart is the shape and the side, not the colour.

--

The other half of this was a name that could not be trusted to be one line.

The label was a `-webkit-box` clamped to one line, which hides the lines past
the first — but not the part of the second one that the row's own min-height
leaves uncovered. The row is a px token, 15px, "12px of name at 1.2", while
.puckNameTight steps the name down to 10.2px, whose line box is 12.24. That
leaves 2.76px. Measured on a 390px phone: "Christopher" on the button seat drew
as "Christ…" with the ascenders of "opher" showing underneath it as a stray
mark, which reads as a rendering fault on the first seat a dealer looks at.

`white-space: nowrap` with `text-overflow: ellipsis` has no second line to
leak. It also makes the box measure honestly, which the clamp did not: a name
that wrapped reported scrollWidth == clientWidth, so fitSeatNames() had only
ever been seeing the overflow as height — the right answer to the wrong
question, and only right while the row and the line agreed.

1046 tests pass; the 418-audit sweep is clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-11 16:32:06 -06:00
The long-press menu had grown to eleven actions and drew every one of them as
the same full-width bar. On the fullest menu the tool can build — a live seat
that isn't the dealer, blinds still the only money in, an override already set
— that came to 796px and took 85% of the screen on all four viewports measured.
It scrolled on all four, and Cancel was off the bottom of the screen on all
four: 79px past it on a 390px phone, 252px on a 360px one, 448px in landscape.
Apple puts the comfortable number for an action sheet at three to five and says
not to let one scroll at all.

Nothing is cut. Every one of the eleven is the only route to something, and
"Blinds follow the button again" is the only route in the whole tool to
clearing a blind override. They are sorted by *when* instead: a seat action is
either something you do with cards in the air or housekeeping between hands,
and those two want different targets. The hand keeps the full-width bars —
Fold, All-in, Un-fold, and seating the next player off the rail, because a
chair opens between two hands with people watching it. Everything else goes to
a two-column grid of quieter 44px tiles underneath.

The captions are not decoration. A half-width tile reading "Small blind" is a
label, and the puck already wears one of those; under "Give this seat" it is a
verb again. That is what lets three of the longest labels here lose ten
characters each and still fit a half tile on one line, which is the height the
caption pays back. The override reset spans the grid rather than sitting in it
as a fourth position to give, dashed and unfilled — the felt's own word for
"nothing set by hand here" — so it doesn't read as the Cancel below it either.

Same fullest menu afterwards: 650px, 77%, no scroll on a phone or a desktop.
What a dealer actually sees mid-hand is eight actions and 546px, 65%. The move
picker, which was eleven more full-width bars, now fits all eleven chairs of a
twelve-handed table on a 360px phone without scrolling.

Two things the height was hiding, fixed with it:

The header is stuck to the top of the sheet's scrollport and carries a real
close button. NN/g is explicit that a grab handle is not a close affordance,
and this is the sheet that can still outgrow a landscape phone — so the way
out, and whose menu this is, are now in the part that cannot scroll away.

That close button is also the first control in the markup, which is what Modal
focuses. It used to focus Fold. The APG says to keep a dialog's initial focus
off the destructive choice; a close button at the top puts it there without a
special case. Escape finds that one rather than the button at the foot, so
Escape closes the sheet while the foot steps back — and it now has somewhere to
step back to: opening the move picker used to replace the sheet and leave only
a control that threw the whole menu away.

1068 tests pass; the 418-audit sweep is clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-11 16:59:28 -06:00
The pot wizard printed a figure beside every name under the words "up to". It
was that player's own remaining contribution, which is not what winning pays
them, and the gap was large and in the wrong direction. Three players in for
$250 each: all three rows read "up to $250" while the prompt directly above
them said "$765 is in play" — and $765 is what the winner was handed. A dealer
who trusted the row would have short-paid by two thirds.

With a real side pot it was worse in a more confusing way. The breakdown box at
the top of the same dialog announced "Main pot $765 · all 3", and Bob's row
three lines under it said "up to $250". One dialog, two numbers for the same
money, and the wrong one next to the checkbox the dealer actually ticks.

resolveRound caps the pool at the winner's own remaining contribution and then
takes min(remaining, cap) from every entry, dead money included — so the
ceiling is that sum, and PotCalculator.ceilingFor computes it. Bob's row now
says $765, which is the main pot, which is what the breakdown box three lines
above has been saying all along.

It is also only said where it binds. A ceiling equal to everything on the table
is the prompt's own figure repeated once per row — redundant data-ink, and on a
pot everybody covered that was all it ever was. It now appears on exactly the
rows where picking that winner leaves a side pot still to award, which is the
one time a dealer needs telling. The flat pot's three rows carry a name and
nothing else; the side pot's carries one number, on Bob.

The test that matters is not that the ceiling equals a figure written out by
hand but that it equals what resolveRound pays, so every case checks the label
against the function that moves the chips — across seven shapes of pot, ragged
contributions and cent-sized stakes included.

1082 tests pass; the 418-audit sweep is clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-11 17:23:43 -06:00
The sheet a dealer opens mid-argument held twelve rulings with all their prose
showing — 2,480px of it on a 390px phone, of which 1,754 was below the fold —
and a row of twelve chips across the top to jump between them.

The chips were an index of the twelve headings printed directly above the same
twelve headings. The same list twice: 172px of navigation before the first
word, and the dealer who tapped one landed in the middle of a scroll with
eleven rulings they hadn't asked for still wrapped around them.

The headings are the index now. NN/g's rule for this shape — a longer list of
independent topics somebody opens one of — is an accordion, shut by default,
and it suits these unusually well because half of them answer the question
without being opened at all. "A short all-in doesn't reopen the betting" is the
ruling, not the topic. So is "Chips nobody called come back", and "A straddle
is a blind raise", and "A raise has to be a full raise".

Measured after: 29px below the fold on a 390px phone with all twelve rows on
screen at once, 51px on a desktop, and 244px with the longest of them open.

Not exclusive — no `name` attribute. Closing one because another opened moves
everything under the finger that is reaching, which is the disorientation the
accordion is here to remove rather than add. And the sheet shuts what it finds
open when it is opened again: <details> keeps its state, so without that a
dealer who read the odd-chip rule an hour ago finds it still hanging open under
the one they came back for.

Two things that came with it:

The gold arrives when a ruling is opened and not before. Twelve gold headings
in a column is the accent doing the job of body text, which leaves it nothing
to say when one of them is the one being read. The sidebar's eight panel names
are --text for the same reason; this is the same component doing the same job.

Five of the twelve are two paragraphs, and they ran into each other — the
sections were spaced from one another but nothing separated the halves of one
ruling. It never showed while there was a gold heading every few lines to break
the column up.

1095 tests pass; the 418-audit sweep is clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-11 18:00:07 -06:00
Everything in this stylesheet is a colour it paints. `color-scheme` is the half
it cannot: the browser draws the checkboxes, the menu a <select> opens, the
scrollbars, the caret, the spellcheck underline and the autofill wash, and with
no scheme declared it draws every one of them for a light page. Measured,
`color-scheme: normal` on a #141414 ground — three checkboxes in Table Setup
rendering as bright white squares, the loudest objects on the screen and
brighter than the gold, and two more in the seat sheet doing it over the felt.

The comment on the pot wizard's hand-painted checkbox called it "the last raw
browser control in the tool". Six others were still the platform's, and three
of those were still 13x13 against a 24px floor this file had already written
down once — in a comment that explains the floor, attached to a rule naming one
checkbox by id.

One declaration on :root moves all six, and moves them natively, which is the
part worth having: a control the browser draws still answers Windows High
Contrast Mode, still matches the platform the dealer already knows, and cannot
lose its tick to a stylesheet. `accent-color` makes the checked state the green
this tool already uses for yes — the same #1e8449 the painted box fills with,
so the one drawn checkbox and the six native ones agree rather than nearly
agree.

The painted one stays painted, because it is not a setting: it is the box a
dealer ticks to move money with players watching, and it wants a fill that
reads across a table. But it now pays what painting costs. A tick drawn as a
`background` on a pseudo-element is not a colour forced-colors mode knows how
to replace, so it was simply gone — no visible checked state at all in Windows
High Contrast Mode, on the dialog that pays the table. System keywords are the
only colours guaranteed to survive, because they are the palette.

Three other things fell out of looking:

The id-scoped 24px rule existed three times over — once in the open, once under
`max-width: 700px`, once under `pointer: coarse` — and still reached one box of
six. Said about checkboxes instead, once.

A colour swatch declared 32px wide measured 22 with a mouse: flex-shrink, the
exact mechanism the coarse-pointer block had already been bitten by and written
a note about. It gets the same `flex: none` the touch case got.

Quick Split is the darker of the two pages and had never declared a scheme
either. It has no checkboxes to go white, but a dealer opening it from the felt
should not find a light scrollbar down the side of it.

1104 tests pass; the 418-audit sweep is clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-11 18:49:49 -06:00
Modal answers one question for all six overlays — where focus goes and how
Tab is held — and this round it was measured as wrong in three directions.

Its list of Tab stops could not see a <summary>. The rulings sheet is twelve
of them and one Done button, so the trap decided Done was both ends of the
ring: eighty Tab presses, one element ever reached, twelve rulings that could
not be opened without a mouse. Adding `details > summary` gives the sheet its
thirteen stops back. `:not([tabindex="-1"])` moves onto every line while it is
open, because a control taken out of the Tab order still matches `button`.

"The first control" was the card picker's Clear: the sheet a dealer opens to
write a card down opened on the button that rubs one out. A sheet names its
own landing spot now, and on five of six it is the heading — which says which
seat, which card, which pot. The confirm dialog keeps a control, because a
short question with one irreversible answer should land on the answer that
leaves the dealer no worse off.

And a sheet that redraws itself was deleting the control that held focus.
Choosing a buy-in, picking a card, switching slots, confirming a side pot —
all four left focus on the document body. Rebuilt controls carry a name now
and are handed back to whoever had them; where there is no coming back, the
caller says where to go instead.

The card grid was fifty-two Tab stops of the fifty-six in that sheet. It is
one now, with the arrows moving inside it, stepping over cards already dealt
and stopping at the edges rather than wrapping onto a different rank.

1136 tests, 418 audits clean.
jheaps added 1 commit 2026-09-11 19:19:11 -06:00
A seat's number was a grey digit in the top-left corner of the puck, and the
top-left corner is also where the blind badge drops off the rim and where a
long centred name reaches. Measured across 348 seats on 36 tables: 117 of them
had it printed under something else. All 66 seats posting a blind had it
covered outright — a 22px badge at z-index 4 over a 6px digit — and 51 more had
it sitting on the first letter of the player's own name, the whole glyph in the
worst case, on a 54px puck.

There is nowhere on the felt to move it to. The button's chip has the other end
of the top rim. Bets land on the rim between a seat and the pot, which is the
bottom edge for the seats above centre and the top edge for the ones below. The
middle of the puck is name, bet and stack, and all three are about this hand.
The chair number is the only mark on a puck that isn't, so it is the one that
gave way.

Nothing is lost that a tap doesn't return. The seat editor's heading reads
"Mike from work · Seat 2" now and the seat menu's first line leads with the
chair; a seat nobody has named still calls itself "Seat 5"; and an open chair
still wears its number large and centred, which is the one moment the number is
the thing being looked for rather than a footnote on somebody else's name.

The sweep had never mentioned any of this. The check that asks whether a puck
covers itself up knew about two of the three things a puck wears, and only ever
held them against writing — so the mark sitting on the names was invisible to
it, and so was a badge painted straight over another mark. Both gaps are
closed: put the number back and it reports five offenders on a Galaxy S8
ten-handed, naming Christopher, Alexandra, Jonah and the SB.

1148 tests, 418 audits clean.
jheaps added 1 commit 2026-09-11 20:15:31 -06:00
The panel measured 793px on an iPhone and 420 of them were the colour form:
five rows of swatch, value box and a filled red delete block, then an add
button and a paragraph of instructions. Underneath all of it sat "Stacks in
chips" — the fewest chips that make each stack, which is what a dealer opens
this panel during a game to read. Setting the colours is something you do once,
on the first night, and it was sitting on top of the thing you do at every
colour-up.

The order is the other way round now. The legend leads: five colours and five
amounts on one line, which is what the panel is named for and what it had never
once displayed — the values were locked inside number inputs, so answering
"what is the green one worth" meant reading it out of a form field. The
colour-up list follows. The form goes behind a disclosure, the same shape Table
Setup already uses for House take and Without live betting. 793px to 441px,
with both the things a dealer reads above the fold.

The five delete buttons keep the 44px the touch rules give them and lose the
red fill, which made each one as loud as the row it removes and louder than the
values beside it. The red comes back on hover, on the way to pressing one. And
the colour-up list no longer runs straight into its own footnote.

The sweep's twelve-handed "packed" shape joins "all in" as a note rather than a
failure at 20px text, with the arithmetic written beside it: on a 360x640
phone the felt is 330x294, the pucks are 44x63, five sit down each side, and
315px of puck does not go into 294px of felt. The pitch between neighbours is
35px and 51px against a 63px puck. They have always overlapped; what kept the
run green was the hit-test probes landing between the glyphs, so any change
that moved the ring three pixels turned it red for something it hadn't touched
— twice this round. Held to the same standard as everything else at 16px.

1162 tests, 418 audits clean.
jheaps added 1 commit 2026-09-11 20:38:13 -06:00
Every input and select a dealer touches has a rule asking for min-height: 44px,
and not one of them was 44px tall. Form controls are content-box by default, so
44 was being read as the height of the text inside, and 8px of padding top and
bottom plus a 1px border each side went on the outside of it. Measured on an
iPhone: all fifteen settings fields in the sidebar stood at 62px, and the raise
pad's amount box at 66 with the text turned up.

Nothing looked wrong, which is why it lasted. 62px clears a 44px floor, so the
sweep — which asks whether a target is big enough, never whether it is the size
it was asked to be — had nothing to say, and one field is not obviously too
tall. The cost is only visible in the aggregate: Table Setup 941px to 869, the
waiting list 212 to 194, every panel in the sidebar open 2,993 to 2,813.

The raise pad's field was worth measuring rather than assuming, because it is
not only a field: it sets the action bar's height, the bar's height is
published into --feltRoomPx, and the felt is laid out from what is left. It
takes 10px off the bar and hands them to the table. On a Galaxy S8
twelve-handed at 20px text the bar goes 248px to 238 and seat 7's stack comes
out from behind it — with the taller field the sweep reported "$1,100 is 7/7
under div#actionBar", a figure a dealer cannot read at all.

Written against the element types rather than the surfaces they sit on. The
surface version was written first and had already missed the waiting list's
name box, two hundred lines from anything it named.

This is the third time this stylesheet has been caught by content-box; the
panel headers and the rulings summaries are the other two. The new test holds
every field given a 44px floor to being measured the way that floor assumes.

1167 tests, 418 audits clean.
jheaps added 1 commit 2026-09-11 22:24:56 -06:00
"Split between" on Quick Split was two controls for one value stacked on
each other: chips 2 3 4 5, and under them a bar reading "2 ways" with a −
and a +. The count was written down three times at once — the lit chip,
the bar, and "Each of 2 players gets" in the panel above — and two of the
three were controls. 134px with its label, against 74px for "Smallest
chip in play" right below it, which offers five choices in one row.

The bar was never meant to be a bar. `.waysStepper` asked for a 150px
min-width inside a wrapping flex row, so on a phone it always wrapped to a
line of its own, and `flex: 1 1 auto` then gave it all 358px of that line:
252px of empty readout with the − and + pushed 304px apart, on a screen
390px wide. Now it is 136px with its ends 121px apart, and it only exists
once you are through the door — a fifth chip reading "6+", behind which
the stepper is where the count is written. Under six ways, which is every
chop a home game will run, the field is one row and 74px.

Two more things went with it:

Neither stepper ever disabled an end, so − at the floor and + at the
ceiling looked live and swallowed the tap. NN/G's stepper guidance asks
for the opposite. Both ends of both steppers now grey out.

The per-pot chop capped its + with `Math.max(contenderCount, MAX_WAYS)`,
which is always 12 — a side pot only P1 and P2 were eligible for would
happily chop ten ways at $12 each. It is `chopCeiling()` now, and a
two-contender pot is offered no stepper at all, that being the common
shape.

The sweep went straight to the all-in mode and audited only that, so the
mode the screen opens in had never been looked at in fourteen rounds,
which is how a 358px bar lasted this long. It audits both now — 428
audits, clean — and the first run of it found the step buttons had been
40px wide rather than 44 since they were written.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-13 22:41:14 -06:00
The card picker greys out a card that is already dealt and hangs the reason
off a `title`. Measured on an iPhone with three hands out: seven of the
fifty-two were dead, none of them could take focus, and tapping one changed
nothing at all — no toast, no text, not a byte of DOM. The tool's answer to
"who has the ace of spades?" existed and was reachable only with a mouse.
The header's two buttons were the same, on a new dealer's first screen, and
Export CSV was greyed out with no explanation written anywhere.

`disabled` is the wrong attribute whenever there is something to say: it
drops the control out of the tab order, so a screen reader never lands on it
to hear the description, and it eats the tap on a touch screen, where the
hover that would have shown the `title` does not exist. `aria-disabled`
announces the same state and leaves the control reachable, so one capture
listener can turn the press into a sentence — in a toast, or inside a sheet
that is standing on top of the toast.

It paid for itself in the picker's keyboard too. The arrows hunted past
dealt cards because a `disabled` button cannot hold focus, and the hunting
did the exact thing the grid's no-wrap rule was written to prevent: Right
from A-spades over a dealt A-hearts landed on A-diamonds, so the column
shifted and the next press of Down walked a different suit. A cell that can
hold focus needs no hunting, and the APG asks for that inside a composite
widget anyway.

The line that answers is one line by measurement, not by taste. Its box is
318px on a Galaxy S8 at 20px of root text; the first wording drew 332px and
wrapped, shoving fifty-two targets 21px down mid-tap, and twenty-four capital
Ws draw 434px whatever the wording, so the box is what holds.

Two things the sweep found on the way. It opened the card picker by
un-hiding an overlay whose grid had never been painted, so for its whole
life it audited an empty sheet; it now opens it the way a dealer does, with
cards out and the answer showing. And the slot buttons above the grid were
named to a screen reader by the em dash they draw when empty.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-14 00:01:44 -06:00
The board — the five community cards a dealer taps to enter the flop, the
turn and the river — could not be pressed at all. #seatsLayer is an
`inset: 0` sibling of the table that holds the seat pucks, and an element
with no background still hit-tests, so the empty middle of that layer took
every tap aimed at what was underneath it. Measured at 1280x900 with five
cards out: all five hit-tested to `div#seatsLayer`, on every screen wide
enough to keep the board in the middle rather than on the strip. #betsLayer,
the other sheet over the felt, has been pointer-events: none since it was
written.

Underneath that, the cards were drawing at a little over half their size.
placeBoard measures how much middle the felt has and writes it to the
centre's max-width — but max-width caps a box and does not claim anything,
and the centre is a flex column that sizes to its content. So with 463px of
measured room it went on being 136px wide, the row inside it is width: 100%
of that, and five cards sharing 136px come to rest on their own min-width:
24px, against the 44px floor every other control on the felt is held to.

Neither was visible to anything. A scripted probe calling .click() on the
node skips hit-testing entirely, and the sweep's occlusion check had only
ever been shown three selectors' worth of the page — the action bar, the
header and the seats. It asks about every control now, which took three
refinements to be honest: a control that set pointer-events: none has opted
out rather than been covered; a shut <details> hands out a real rect for
everything in it, and checkVisibility is the browser's own answer; and flow
content under a fixed layer is a position rather than a fault, so it is said
rather than failed.

The five sheets a dealer spends half the night in were getting one rule of
twenty-five. They get all of them now. Three rules had to learn what a modal
is first: two ask about the fixed bar, which is not a question while a scrim
is covering it, and the third called the bottom four rows of a sheet that
scrolls unreachable buttons. The helper all three lean on had its own blind
spot — it asked whether an element had left its box entirely, which is true
of something well below the fold and false of something hanging eight pixels
over the edge of it.

That turned up two controls that were a glyph and nothing else: the pot
wizard's close, on the one dialog that divides money, and the cross that
removes a custom field, in a column of identical crosses.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-14 00:39:42 -06:00
The action bar learned two rounds ago that a landscape phone is short of
height and swimming in width: it stops being a bar across the bottom and
becomes a rail down the right. The seat menu was never told.

Measured on the fullest menu the tool can build, twelve-handed with
somebody on the waiting list:

  640x360   545px of content in a 306px sheet. Cash out…, Move to…,
            Edit seat…, Small blind, Big blind and Cancel below the
            fold — Cancel by 224px.
  667x375   545 in 319, Cancel 211px under.
  844x390   529 in 332, Cancel 183px under.

And on all three the sheet was 420px wide inside a window 640 to 844
wide. Two hundred and forty-seven pixels of width held empty on the one
screen shape whose whole problem is height, while the dealer scrolled a
menu to find the way out of it.

The two tiers this menu has been sorted into since round 7 — what you
press with cards in the air, and housekeeping between hands — stop being
the top and bottom of a column and become the right and left of a row.
Fold and All-in land under the same thumb the rail puts Fold, Call and
Raise under, with Cancel beneath them. The housekeeping grid takes as
many columns as the width holds instead of the two a 360px phone has
room for.

After: 297px in a 298px sheet at 640x360 and at 667x375, 281 in 282 at
844x390. Nothing below the fold on any of them, every button still at
least 44x44 and still hit-testing as itself. The move picker's twelve
chairs and its Back went from four rows and a scroll to three rows and
none. Upright nothing moved at all — 545px before, 545px after, the same
two columns.

auto-fill rather than auto-fit: auto-fit throws away the tracks nothing
sits in, so a group of two stretched to half the sheet each while the
group above it was a third, and the two grids lined up with nothing.

1253 tests pass; the layout sweep reports clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-14 01:03:54 -06:00
The picker put the whole deck on the screen at once — four suits across,
thirteen ranks down — and that grid is 646px tall. Measured with the
board tracked and seven cards already out:

  640x360   816px of content in a 317px sheet, 40 of the 52 below the fold
  667x375   816 in 330, 40 below
  844x390   774 in 343, 36 below
  375x667   816 in 587, 20 below
  1280x900  774 in 775, none

So on every phone the tool is actually used on, entering the flop began
with a scroll, and a dealer looking for the nine of diamonds was reading
down a column to find it. No arrangement fixes that: fifty-two targets at
the 44px this sweep holds everything else to need 572px of width before
gaps if they are thirteen across, which is wider than any phone in
portrait, and thirteen rows deep if they are four.

A card is not one choice out of fifty-two. It is two — a suit and a rank
— and that is how a dealer says it out loud. So the sheet asks them in
that order: four suits on a row, then the thirteen ranks of the one
chosen. Measured afterwards at eight viewports from 360x640 to 1280x900:
nothing below the fold, nothing scrolling, every button still at least
44x44 and still hit-testing as itself. Portrait content went 816 -> 372,
landscape 816 -> 322.

The second tap is not a second cost in the usual case. The suit stays
where it was put, so a second card of the same suit is one tap — and one
tap is what picking a card used to cost *plus* a scroll through thirteen
rows. Opening on a slot that already holds a card shows that card's suit
with it under the cursor, which is the case where the dealer came to
change something rather than add it.

Three things that had to move with it:

  - the cursor is a rank now, 0-12, and changing suit deliberately leaves
    it alone: the same rank in another suit is the card beside the one
    you were on.
  - the arrows read the column count off the layout instead of assuming
    SUITS.length. The rank row is auto-fill — five across on a 360px
    phone, seven at 460 — and the last time this number disagreed with
    the grid it slid the cursor into a column nobody asked for.
  - the suits are a radiogroup, not a tablist: the grid below is not
    another panel of content, it is the same thirteen controls filtered,
    and the unchosen red suits stay red, because reading four shapes to
    find the hearts is the search this sheet exists to remove.

deck() still returns all fifty-two and the duplicate check still reads
all of it, so splitting the grid by suit cannot let a card be dealt
twice.

1276 tests pass; the layout sweep reports clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-14 01:31:48 -06:00
Table Setup is the one panel the tool opens by itself, on a table nobody
has set up yet, so it is most of what a dealer sees the first time they
arrive. Measured on a fresh table: the panel stood 886px on a 667px
phone, and the whole page 2076.

The order was the problem more than the length. The two figures the
panel's own summary glances at — "10 seats · $1/$2" — were the seat count
at the top and the blinds 218px further down, under three switches and
the three paragraphs explaining them: a dedicated dealer, a card sheet at
every street, and whether the phone is allowed to sleep. A dealer setting
up a $1/$2 game read all of that on the way to the two boxes they came
for.

The three have gone into "While you deal", with the paragraphs. That is
not a new idea in this panel — House take and Without live betting were
already nested disclosures — it is the same idea applied to the things
that were not about money. Afterwards the panel is 529px, the page 1719
on the same phone and 1275 on a 1280x900 desktop, and the first two rows
are the seats and the blinds.

A switch nobody can see is a switch nobody remembers turning on, so the
disclosure carries a glance of its own: "Asking for cards", "House
dealer", or "Screen may sleep" when one of the three is away from where
it ships, and silence when none of them is. One of them, not a list:
joined they run to 49 characters into a row 44px tall with a label
already on it, and "House dealer · Asking for c…" has told nobody
anything.

1291 tests pass; the sweep is clean at 428 audits across 13 viewports.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-14 02:06:08 -06:00
Two findings in the seat editor, and the second is why the first was
hard to notice.

A seat is sitting out, in the hand, or folded, and "folded" means
nothing while the seat is out. The form asked that as two checkboxes,
which offers a fourth corner that has no meaning, and the code that
stopped a dealer reaching it disabled the Fold box whenever In hand was
clear. Measured: that left the label at opacity 1 and colour
rgb(170,170,170) — identical to a live one — with a title of "Folded"
on it. Pressing Fold on a seat that was sitting out gave no movement and
no reason, which is the exact failure round 16 went through the tool to
remove; it hid from the sweep rule that finds those because the title
sat on the <label> rather than on the control the rule inspects.

Three named states can't contradict each other and none of them is ever
unavailable, so there is nothing left to dim. Sitting out · In the hand ·
Folded, as a radiogroup — the same shape the card picker's suits use —
with the chosen Folded segment in the red the seat menu's own Fold
already wears.

And the form itself. The phone block's comment has always said why the
editor becomes a bottom sheet — "the seat editor lives far enough down
the page that tapping a seat looks like it did nothing" — but the sheet
was scoped to max-width 700px while #holdemLayout goes to one column at
900. The two tiers in between had exactly the fault the sheet was
written to fix. Measured, tapping a seat:

  844x390   the editor drew in the flow at y=369 in a 390px window —
            21px of 401 on screen, 5% of it, at scrollY 0 with nothing
            scrolling it into view. The seat lit up green and the form
            it opened was under the bottom edge.
  768x1024  31% visible, the rest below the fold, again no scroll.

An iPhone held sideways and an iPad held upright are not obscure. The
query is the layout's own breakpoint now, and the seat-sheet rules moved
out of the phone block into their own so it could be asked separately.
Afterwards every viewport from 360x640 to 900x500 shows 97-99% of the
sheet, and above 900 the editor is a static block at the top of a
sidebar beside the table — 100% visible there too.

1307 tests pass; the sweep is clean at 428 audits across 13 viewports.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-14 04:17:39 -06:00
"Next hand" named three things: the bar's green button, the pot wizard's
last button, and the header shortcut — the only one of the three that
never starts a hand. Between hands it moves the button a second time, so
the seat about to pay the big blind is skipped, and the toast opened with
the words the wizard had just used, which read as a confirmation of what
was already done.

Measured: settle through the wizard and the table is on hand 6 with the
button on seat 2; press the header's Next Hand and it is still hand 6,
button on seat 3, no confirmation asked.

The mechanism stays — a dealer does pass the button along on a hand
nobody played. The name changes. The label and its title are now read off
whether a hand is out: "Next Hand ⟳" while one is, "Move Button ⟳" when
none is, written past the dimmed-reason cache each render so they follow
the table instead of freezing on the state the page loaded in. The toast
says which of the two happened, on one line: the second line told the
dealer to press the green button the bar is already holding.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-15 04:36:44 -06:00
Twelve rulings in a 460px sheet in the middle of an 844px window: 754px of
content in a 334px scrollport, 111 of it spent on a title and a caveat that
stand still, 384px of window width unused either side. Four of the twelve
names on screen, and the dealer is looking one up with an argument going on
at the table.

Material's rule for a bottom sheet in landscape is to stop being one, and
this tool already does exactly that under this query for the action bar. So
the sheet takes the window and the width pays for the height: the twelve go
into two columns of six, all of them on screen at 844x390 with nothing to
scroll at all, and the title, the caveat and Done share one line instead of
standing on three.

Two wrappers in the markup rather than one grid of twelve, because a grid
pairs its children into shared rows: opening the third ruling on the left
would push the ninth down the right-hand side to keep the row square. Two
flows means a column only ever moves itself — measured, opening one leaves
the other six names exactly where they were. Everywhere but landscape the
wrappers are `display: contents` and the twelve are the single column they
have always been.

And the same sheet upright: the header is stuck to the top of its own
scrollport now, the way the seat menu's has been. Measured before, at the
bottom of that scroll Done was 221px above the sheet's top edge on a 360x640
phone, and 262 on a 390x844 one with a ruling open — which is the only
reason anybody is in here. A dealer who has read the answer had to scroll
back past it to leave.

The layout sweep's scroll-into-view guard learns the new box, or it finds a
sheet whose scrollHeight equals its clientHeight and decides nothing is out
of view.

1324 tests pass. The sweep is clean across 428 audits; contrast unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-15 04:59:19 -06:00
This tool prefers undo to confirmation, deliberately — runUndoable says so in
as many words — which makes the toast's Undo the safety net under the biggest
things it does. It was not one.

Every whole-step undo clears the per-action history on its way past, so the
bar has no pill left and the toast's button is the only way back. Measured on
a desktop it is the 67th of the page's 68 tab stops, and it is gone in eight
seconds. And U — the key the sidebar legend advertises as taking back the
last action — found nothing and did nothing: it only ever looked in the bar.
So U looks at the toast first, by pressing the button that is on the screen
rather than running a second copy of what it does, and only at a button that
named the shortcut: "Turn off" on the wake lock and "Reload" on the other-tab
warning are not things a stray keypress should reach.

The eight seconds also ran whatever the dealer was doing. A cursor resting on
the toast did not stop it; nor did tabbing onto the button. Measured before:
focus the Undo, wait 8.6 seconds, and the toast is gone and focus has been
handed to <body> — the offer withdrawn and the dealer's place in the page
with it. Touching it or tabbing into it now stops the clock, and letting go
starts it again with at least the time to act rather than whatever was left
of the time to notice: let go at 7.9 seconds of 8 and 100ms is not an offer.
Dismissing with focus inside puts focus back where the dealer had got to,
which is read off where focus crossed into the toast rather than off where it
was when the message arrived.

And each toast carried its own role="status" inside #toastHost, which is
already a live region in the markup. A region nested in a region, announced
twice; the one in the markup is the one that works, because it is the one
anything has been watching.

1342 tests pass, 18 of them new — and 8 of those fail against the old code.
The sweep is clean across 428 audits; contrast unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-15 05:33:29 -06:00
The bar's undo is a fixed-width pill because its text changes on every tap and
a control that resizes under a thumb reads as the interface twitching. On a
phone that leaves the label 78px, so the label is three elements and
fitUndoLabel drops the actor whole rather than letting an ellipsis land
wherever it lands. That machinery was right. The labels fed to it were not.

Two rules follow from "the actor is the half that goes", and six of the
fifteen labels broke one.

The act has to name the action on its own, because it is what survives. Four
labels put a verb in the actor's slot — "dealing" + "the hand", "dealing" +
"everybody in", "calling" + "the straddle off" — so dropping the lead left the
pill reading "↶ the hand" after every deal of the night, and "↶ the straddle
off". Neither names anything. Those are re-split: "the deal", "everybody dealt
in", "the straddle called off".

The act has to fit, because whatever is left is ellipsised. Measured at
390x844 and 360x640 with a thumb: "hand killed on the clock" wanted 125px of
78, "check on the clock" 99, "waiting for the blind" 103, "posting to come in"
97 — all four came out cut mid-phrase, "↶ waiting for th…". The qualifier goes
into a new optional `long`, which is the whole sentence, and the verb stays on
the pill.

Every short form is a substring of its long form, which is what Label in Name
asks of a control that has shortened its own name — and it is what lets `long`
be the accessible name rather than only a title a phone has no way to show.
Before this the name was whatever was visible: "↶ hand killed U", arrow and
keycap included. Both are aria-hidden now.

Measured after, on both phone sizes: nothing ellipsised, and every visible
form contained in the name. One exception, stated in the code: a five-figure
raise. "raise to $12,500" is 86px of 78 and the number is the whole of what it
says, so there is no qualifier to move — the leading digits survive, the
amount is on that player's seat puck, and the whole of it is on the name.

Three comments carrying the old 73px figure are re-measured while I was here.

1353 tests pass, 11 of them new — 3 fail against the old labels. The sweep is
clean across 428 audits; contrast unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-15 05:59:57 -06:00
The felt is sized from --feltRoomPx, which actionBar.js publishes from the
bar's real height, because the bar is fixed to the bottom and grows with the
hand so nothing else can know how much window is left. That measurement is
right. What it was measuring was not.

ActionBar.mount() called watchHeight() before render(), and the bar ships
`<div id="actionBar" hidden>`. So the first publish measured a bar that was
not there yet and published 0px — not "I don't know" but "the bar takes none
of the window", which is the one answer that makes the felt draw itself too
big. Traced on a cold load, nine-handed:

  t=181ms   --actionBarHeight 0px     bar hidden, 0 tall
  t=186ms   --feltRoomPx      721px
  t=1056ms  --actionBarHeight 151px   bar visible, 151 tall — ResizeObserver
  t=1059ms  --feltRoomPx      570px

The observer does come round on its own once `hidden` comes off, but a frame
later at best, and with nine seats to lay out it was 875ms behind. What a
dealer saw at 360x640 was a table drawn 336x504 and collapsing to 336x374
after it was on screen and readable: 130px of felt with every seat on it.
1280x900 lost 13px the same way.

Two rules, separate on purpose. publish() now declines rather than guessing
while the bar is hidden and not a rail — a rail still publishes its honest
zero, because it is a real bar that has moved out of the way. And mount()
publishes once render() has given it something to measure.

That leaves the frame before any of it, which is real: the scripts are at the
end of the body and the table is laid out inside DOMContentLoaded, so the
browser has painted by the time --feltRoomPx exists. The fallback there was
`100vh` — the worst guess available, since it says the whole window is free.
It is now the same guess two other rules in this file already make, 9rem for
the bar plus 7rem for what sits above and below, which lands 10px over the
truth at 360x640; and it is a ceiling, so over is a small shrink rather than a
seat behind the bar.

Measured after, on both phones: one draw, no jump, and a layout-shift score
of 0 where the felt used to move 130px.

1362 tests pass, 8 of them new — 5 fail against the old code. One existing
test pinned the literal fallback string; its claim is about the cap being the
measured room, and it now says that. The sweep is clean across 428 audits;
contrast unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-15 06:44:55 -06:00
Typing 0.25 into the small blind produced 250, and nothing said so.

The six setup fields are wired `input` -> save -> Render.renderAll(), and
renderAll comes back round through renderSetupFields and assigns `.value`
to the very box being typed in. The decimal point is where that turns from
a wasted render into a wrong number: a type="number" reports a half-typed
"0." as "0", so the write-back erased the point, and assigning `.value` to
a number input parks the caret at position 0, so every digit after it
landed at the front. Measured keystroke by keystroke in Chrome:

  small blind   "0.25"   0 -> 0 -> 20 -> 250        a table playing 250/500
  big blind     "0.50"   0 -> 0 -> 50 -> 500
  start stack   "12.50"  1 -> 12 -> 12 -> 512 -> 5012
  rake percent  "2.5"    2 -> 2 -> 52               a 52% rake
  rake cap      "7.50"   7 -> 7 -> 57 -> 507
  base pot      "0.75"   0 -> 0 -> 70 -> 750

Every one of those is a valid number, so no validation could have caught
it, and every pot for the rest of the night is computed off it.

Two rules, kept separate. Render.setField refuses to write into the
control that has focus — a render says what the state is, and is not
entitled to say what somebody is half-way through typing. And the fields
come off type="number", which is what made a half-typed number unreadable
to begin with; it also drops characters silently, hides selectionStart,
and puts a spin button in a 54px box where five digits already need 45 of
the 52. That is the control GOV.UK dropped from their number patterns
after user testing. inputmode is what summons the keypad on a phone, and
"decimal" carries the separator a dealer needs to type 0.25 at all.

With type="text" a stray letter now reaches the handler instead of being
eaten, so Money.readAmount reads the boxes: empty is null, non-finite is
null, and NaN never becomes a blind. A field skipped while focused catches
up when it is stepped out of.

After, on the same six: 0.25, 0.50, 12.50, 2.5, 7.50, 0.75 — and the
panel glance reads "10 seats - $0.25/$0.50".

1385 tests pass (23 new, 19 of which fail against the code they replace).
Sweep clean across 428 audits on 13 viewports; contrast unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin polish/holdem-seats-one-size:polish/holdem-seats-one-size
git checkout polish/holdem-seats-one-size
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jheaps/JoshHeaps.Net#122