Skip to content

Fix locked dice jumping to fill new grid slot - #84

Open
radiantnode wants to merge 1 commit into
mainfrom
claude/locked-dice-grid-positioning-60pesq
Open

Fix locked dice jumping to fill new grid slot#84
radiantnode wants to merge 1 commit into
mainfrom
claude/locked-dice-grid-positioning-60pesq

Conversation

@radiantnode

Copy link
Copy Markdown
Owner

Summary

  • The locked-dice grid (.zone-matched in static/css/game.css) used justify-content: flex-end in a flexbox fixed to exactly 2 columns' width. When a row held a single locked die, it was packed into the right (2nd) column slot; when a second die locked into that row, both got re-packed to the end, causing the already-locked die to visibly jump from the right slot to the left slot.
  • Changed justify-content: flex-endflex-start so dice fill left-to-right and a lone die in a row stays in the first slot permanently — a newly locked die just fills the next empty slot instead of displacing existing ones.

Test plan

  • Verified with two Playwright clients at the mobile viewport (390×844 @2x) via the game-harness primitives: rolled dice across two rounds, capturing .zone-matched child getBoundingClientRect() at 1/2/3/4 locked dice.
  • Confirmed the first-locked die's coordinates were pixel-identical (x=259, y=252) at every subsequent count — no jump — with new dice correctly filling the next slot left-to-right, top-to-bottom.
  • No console errors observed on either client during the session.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QGfpfoZgKmJTiwUzPxo7mt


Generated by Claude Code

.zone-matched used justify-content: flex-end in a flexbox fixed to
exactly 2 columns wide. A lone die in a row was packed into the
right/2nd slot; when a second die locked into that row, both got
re-packed together, shoving the first die from the right slot to the
left slot. Left-aligning fills rows left-to-right instead, so an
already-locked die keeps its slot when a new one locks in beside it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants