Give a phone on its side the table shape it needs #105

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-stadium-ring into fix/casino-holdem-phone-felt-shape
Owner

The last two rounds left one thing failing and said so: a landscape phone with six or twelve seats stacked two of them 25px apart at each end of the felt, pucks 64px tall. It has been there since seats were first spaced by distance rather than by angle. Three things were wrong at once, and it needed all three.

The rim is the wrong shape when the table is very flat. An ellipse 616px wide and 96px tall has nowhere to put the seats near its ends — the curve doubles back, so two seats a long walk apart come out one above the other. Past two and a half times wider than tall, the rim is now a stadium: two straight rails with a half-round cap at each end, which is how a real poker table is built and exactly why. A cap is a half-circle of the felt's own height, so an end takes one seat and the rest is rail. Only past that ratio — the cut-off lands between a landscape phone (4.4) and every other layout the tool has (1.45 at 1280x900, 1.0–1.4 upright), so no working table changes shape.

The ring had less height than the felt did. The seat layer is inset by half a puck to keep the outermost seats on screen, and 26px off the top and bottom of a 96px felt left 44px to work with — less than half the table, which is why no rim shape could have fixed this alone. The inset is a percentage where the felt is short. The landscape branch never had that rule at all, because it is matched on height while the inset lives in a width query; an 844px-wide phone on its side drew its ring against the felt's whole box, and with a flat-topped rail that put a dealer button over Resolve Pot in the header.

And the puck was a line too tall. In the tight state the hole cards give up their row — of the four things on a puck, the cards are the one the dealer is holding in their other hand, and the seat editor still shows them. 64px to 55px, which is what finally cleared the ends.

Validated

At 640x360, six seats Before After
Closest two seats 25px 55px
Ring height 44px 73px
Audit 2 seats' centres stolen clean
  • 36 combinations of nine viewports x 2, 6, 9 and 12 seats: every one clean, with hole cards set on every seat.
  • 216 audits — thirteen viewports x three seat counts x mouse and thumb, plus every overlay and Quick Split: no failures, no console errors.
  • A hand played end to end at 640x360 eight-handed: eight seats in two rails with one at each end, 112px apart at the closest.
  • 6 new tests, suite at 460, 0 failures. The stadium was switched off on purpose to confirm 3 of them catch it.

One thing given up

On a table crowded enough to shrink the pucks, the hole cards no longer show on the felt. That is a real loss and it is the reason the ends fit: a 64px puck cannot clear a 55px gap. Name, bet and stack stay on the puck, and the cards are still in the seat editor.

The last two rounds left one thing failing and said so: a landscape phone with six or twelve seats stacked two of them **25px apart** at each end of the felt, pucks 64px tall. It has been there since seats were first spaced by distance rather than by angle. Three things were wrong at once, and it needed all three. **The rim is the wrong shape when the table is very flat.** An ellipse 616px wide and 96px tall has nowhere to put the seats near its ends — the curve doubles back, so two seats a long walk apart come out one above the other. Past two and a half times wider than tall, the rim is now a **stadium**: two straight rails with a half-round cap at each end, which is how a real poker table is built and exactly why. A cap is a half-circle of the felt's own height, so an end takes one seat and the rest is rail. Only past that ratio — the cut-off lands between a landscape phone (4.4) and every other layout the tool has (1.45 at 1280x900, 1.0–1.4 upright), so no working table changes shape. **The ring had less height than the felt did.** The seat layer is inset by half a puck to keep the outermost seats on screen, and 26px off the top and bottom of a 96px felt left **44px** to work with — less than half the table, which is why no rim shape could have fixed this alone. The inset is a percentage where the felt is short. The landscape branch never had that rule at all, because it is matched on height while the inset lives in a width query; an 844px-wide phone on its side drew its ring against the felt's whole box, and with a flat-topped rail that put a dealer button over Resolve Pot in the header. **And the puck was a line too tall.** In the tight state the hole cards give up their row — of the four things on a puck, the cards are the one the dealer is holding in their other hand, and the seat editor still shows them. 64px to 55px, which is what finally cleared the ends. ### Validated | At 640x360, six seats | Before | After | |---|---|---| | Closest two seats | **25px** | **55px** | | Ring height | 44px | 73px | | Audit | 2 seats' centres stolen | clean | - 36 combinations of nine viewports x 2, 6, 9 and 12 seats: every one clean, with hole cards set on every seat. - **216 audits** — thirteen viewports x three seat counts x mouse and thumb, plus every overlay and Quick Split: no failures, no console errors. - A hand played end to end at 640x360 eight-handed: eight seats in two rails with one at each end, 112px apart at the closest. - 6 new tests, suite at **460, 0 failures**. The stadium was switched off on purpose to confirm 3 of them catch it. ### One thing given up On a table crowded enough to shrink the pucks, the hole cards no longer show on the felt. That is a real loss and it is the reason the ends fit: a 64px puck cannot clear a 55px gap. Name, bet and stack stay on the puck, and the cards are still in the seat editor.
jheaps added 1 commit 2026-09-02 04:59:29 -06:00
The last two rounds left one thing failing and said so: a landscape phone with
six or twelve seats stacked two of them 25px apart at each end of the felt, with
pucks 64px tall. It has been there since seats were first spaced by distance
rather than by angle. Three things were wrong at once, and it needed all three.

The rim is the wrong shape when the table is very flat. An ellipse 616px wide and
96px tall has nowhere to put the seats near its ends: the curve doubles back on
itself, so two seats a long walk apart come out one above the other. Past two and
a half times wider than tall the rim is now a stadium — two straight rails with a
half-round cap at each end, which is how a real poker table is built and exactly
why it is built that way. A cap is a half-circle of the felt's own height, so an
end takes one seat and the rest is rail. Only past that ratio: measured, the
cut-off lands between a landscape phone at 4.4 and every other layout the tool
has, 1.45 at 1280x900 and 1.0 to 1.4 upright, so no working table changes shape.

The ring had less height than the felt did. The seat layer is inset by half a
puck to keep the outermost seats on screen, and 26px off the top and bottom of a
96px felt left 44px to work with — less than half the table, which is why no rim
shape could have fixed it alone. The inset is a percentage where the felt is
short. The landscape branch never had that rule at all, because it is matched on
height while the inset lives in a width query, so an 844px-wide phone on its side
drew its ring against the felt's whole box; with a flat-topped stadium rail that
put a dealer button over Resolve Pot in the header.

And the puck was a line too tall. In the tight state the hole cards give up their
row: of the four things on a puck, the cards are the one the dealer is holding in
their other hand, and the seat editor still shows them. That took the puck from
64px to 55px, which is what finally cleared the ends.

Measured across 36 combinations of nine viewports and 2, 6, 9 and 12 seats: the
closest two seats at 640x360 go from 25px apart to 55px, and every combination is
clean. Then 216 audits across thirteen viewports, three seat counts and both a
mouse and a thumb: no failures, no console errors.

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#105