Let the phone table use the width it has #104

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-phone-felt-shape into fix/casino-holdem-audit-runs-everything
Owner

Last round capped the felt so the ring would clear the action bar, and capped the wrong dimension. The wide layout sizes the felt from its width, so capping width is how you shorten it there — but on a phone the felt is already the full width of the column, and capping that threw away 96px of a 360px screen: a 240x240 table inside a 336px space, with nine pucks crowding it. I said in #103 the phone table had got visibly smaller; this is why.

A max-height leaves the width alone and lets the aspect ratio give way, which turns a short screen into a wide oval — the shape a poker table actually is.

At 360x640 Before After
Felt 240x240 336x240
Clearance over the bar 50px 50px
Twelve-seat ring one seat's centre stolen clean

That closes the one combination left failing in #103. Where the room isn't the binding constraint — 390x844 and up — nothing changes and the table stays round. The landscape branch now says max-height: none, because it already spends the same measured room on its own height, and applying it twice took the felt down to the floor value and crowded the ring.

A measurement that was wrong the moment it was asked something hard

Rim length per seat measures the walk between two seats, not the gap between them. On a long oval the rim doubles back at the ends: twelve seats at 640x360 had 193px of rim each and sat 60px apart. It now measures the closest two neighbours directly off the ring — and off the seat layer rather than the felt, because the layer is inset by half a puck on a phone, which put the answer out by 30px (computed 90, drawn 60).

That makes the rule geometric rather than about screen size, so it is no longer scoped to a phone media query. A wide landscape felt crowds at its ends while its rim claims there is space, and now it is told so.

Validated

  • 164 audits — 82 with a mouse, 82 with a thumb — across 13 viewports, all five overlays and Quick Split: clean, no console errors.
  • Felt shape and ring density measured across 40 combinations of ten viewports x 2, 6, 9 and 12 seats, comparing computed gap against drawn gap at each.
  • A hand played end to end on a 360x640 phone: blinds, four calls, check, flop.
  • 4 new tests, suite at 454, 0 failures; the old rim-length metric was put back on purpose to confirm the flat-table test catches it.

Two things I'd rather state than bury

Pucks still touch at nine and twelve seats on a small screen. I tried 46px against 58px: on a roomy phone 46 cleared every overlap where 58 left two, but in a hand with a side pot — bar grown, felt shrunk to suit — 46 overlapped four times and 58 twice. That is the felt being small, not the puck being wide, and paying for it with an ellipsis on every long name buys nothing. What has to hold is that each seat keeps its own centre, and that is measured everywhere.

Landscape at 640x360 and 667x375 fails with six or twelve seats — two seats stacked 25px apart at the ends of a 616x96 felt. I confirmed this is pre-existing, not from this round, by re-running the same cases on the previous commit: identical offenders. It is bounded by the window: with the bar grown, that screen has 96px of felt to give and the pucks are 64px tall. No puck size fixes 25px, so it needs the ring itself to change shape there, which is its own round.

Last round capped the felt so the ring would clear the action bar, and **capped the wrong dimension**. The wide layout sizes the felt from its width, so capping width is how you shorten it there — but on a phone the felt is already the full width of the column, and capping that threw away 96px of a 360px screen: a 240x240 table inside a 336px space, with nine pucks crowding it. I said in #103 the phone table had got visibly smaller; this is why. A `max-height` leaves the width alone and lets the aspect ratio give way, which turns a short screen into a wide oval — the shape a poker table actually is. | At 360x640 | Before | After | |---|---|---| | Felt | 240x240 | **336x240** | | Clearance over the bar | 50px | 50px | | Twelve-seat ring | one seat's centre stolen | clean | That closes the one combination left failing in #103. Where the room isn't the binding constraint — 390x844 and up — nothing changes and the table stays round. The landscape branch now says `max-height: none`, because it already spends the same measured room on its own height, and applying it twice took the felt down to the floor value and crowded the ring. ### A measurement that was wrong the moment it was asked something hard Rim length per seat measures **the walk between two seats, not the gap between them**. On a long oval the rim doubles back at the ends: twelve seats at 640x360 had 193px of rim each and sat 60px apart. It now measures the closest two neighbours directly off the ring — and off the *seat layer* rather than the felt, because the layer is inset by half a puck on a phone, which put the answer out by 30px (computed 90, drawn 60). That makes the rule geometric rather than about screen size, so it is no longer scoped to a phone media query. A wide landscape felt crowds at its ends while its rim claims there is space, and now it is told so. ### Validated - **164 audits** — 82 with a mouse, 82 with a thumb — across 13 viewports, all five overlays and Quick Split: clean, no console errors. - Felt shape and ring density measured across 40 combinations of ten viewports x 2, 6, 9 and 12 seats, comparing computed gap against drawn gap at each. - A hand played end to end on a 360x640 phone: blinds, four calls, check, flop. - 4 new tests, suite at **454, 0 failures**; the old rim-length metric was put back on purpose to confirm the flat-table test catches it. ### Two things I'd rather state than bury **Pucks still touch** at nine and twelve seats on a small screen. I tried 46px against 58px: on a roomy phone 46 cleared every overlap where 58 left two, but in a hand with a side pot — bar grown, felt shrunk to suit — 46 overlapped four times and 58 twice. That is the felt being small, not the puck being wide, and paying for it with an ellipsis on every long name buys nothing. What has to hold is that each seat keeps its own centre, and that is measured everywhere. **Landscape at 640x360 and 667x375 fails with six or twelve seats** — two seats stacked 25px apart at the ends of a 616x96 felt. I confirmed this is **pre-existing**, not from this round, by re-running the same cases on the previous commit: identical offenders. It is bounded by the window: with the bar grown, that screen has 96px of felt to give and the pucks are 64px tall. No puck size fixes 25px, so it needs the ring itself to change shape there, which is its own round.
jheaps added 1 commit 2026-09-02 04:33:59 -06:00
Last round capped the felt so the ring would clear the action bar, and capped the
wrong dimension. The wide layout sizes the felt from its width, so capping the
width is how you shorten it there — on a phone the felt is already the full width
of the column, and capping that threw away 96px of a 360px screen: a 240x240
table inside a 336px space, with nine pucks crowding it.

A max-height instead leaves the width alone and lets the aspect ratio give way,
which turns a short screen into a wide oval — the shape a poker table is. At
360x640: 336x240 rather than 240x240, same clearance over the bar, and the
twelve-seat ring that was crowded at 240 comes out clean, which closes the one
combination left failing last round. Where the room isn't the binding constraint,
390x844 and up, nothing changes and the table stays round. The landscape branch
now says max-height: none, because it already spends the same measured room on
its own height and applying it twice took the felt to the floor value.

The measurement that decides whether pucks shrink was also wrong, in a way that
only showed up once it was asked a hard question. Rim length per seat measures
the walk between two seats, not the gap between them, and on a long oval the rim
doubles back at the ends: twelve seats at 640x360 had 193px of rim each and sat
60px apart. It now measures the closest two neighbours directly, off the ring
itself — and off the seat layer rather than the felt, because the layer is inset
by half a puck on a phone and the felt's box put the answer out by 30px.

That makes the rule geometric rather than about screen size, so it is no longer
scoped to a phone media query: a wide landscape felt crowds at its ends while its
rim claims there is room, and now it is told so.

Pucks still touch at nine and twelve seats on a small screen. Tried 46px against
58px: on a roomy phone 46 cleared every overlap where 58 left two, but in a hand
with a side pot, where the bar has grown and the felt has shrunk to suit, 46
overlapped four times and 58 twice. That is the felt being small, not the puck
being wide, and paying for it with an ellipsis on every long name buys nothing.
What has to hold is that each seat keeps its own centre, and that is measured at
every size.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-02 09:58:05 -06:00

Pull request closed

Please reopen this pull request to perform a merge.
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#104