Skip to content

Fix responsive profile and Tetris layouts - #79

Merged
bashmohandes merged 2 commits into
masterfrom
fix/responsive-profile-tetris-controls
Aug 26, 2026
Merged

bashmohandes merged 2 commits into
masterfrom
fix/responsive-profile-tetris-controls

Conversation

@bashmohandes

@bashmohandes bashmohandes commented Aug 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Keep Cabinet profile management fields within their panel on desktop layouts.
  • Pin phone Tetris controls above the safe area so the board remains visible while playing.
  • Add responsive regression coverage and repository guidance in AGENTS.md.

Verification

  • node --test (180 tests passed)
  • JavaScript syntax checks for all 25 files
  • git diff --check
  • Rendered Tetris verification at 390 x 844

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e50bac9ccd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tetris/styles.css Outdated
@import url('../styles/game.css');
.app-shell{width:min(1100px,calc(100% - 32px));margin:auto;padding-bottom:54px}.topbar{display:flex;align-items:center;justify-content:space-between;height:80px}.brand{display:flex;align-items:center;color:var(--ink);text-decoration:none}.intro{display:flex;align-items:end;justify-content:space-between;gap:32px;padding:38px 0}.intro h1{margin:0;font-size:clamp(42px,7vw,76px)}.intro p{color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(2,minmax(82px,1fr));gap:14px;min-width:300px}.stats div{display:grid;gap:3px}.stats span,.piece-panels h2{color:var(--muted);font-size:11px;letter-spacing:.08em;text-transform:uppercase}.game-layout{display:grid;grid-template-columns:minmax(300px,520px) minmax(280px,1fr);gap:42px;align-items:start}.tetris-stage{position:relative;width:min(100%,500px);margin:auto}.tetris-board{display:grid;grid-template-columns:repeat(10,1fr);aspect-ratio:1/2;padding:8px;overflow:hidden;background:var(--tetris-board);border:3px solid var(--tetris-border);border-radius:18px;box-shadow:8px 8px 0 var(--tetris-shadow)}.tetris-cell,.mini-cell{aspect-ratio:1;background:var(--tetris-empty);border:1px solid var(--tetris-grid);border-radius:3px}.tetris-cell.ghost{background:var(--tetris-ghost);box-shadow:inset 0 0 0 2px var(--tetris-ghost-line)}[data-piece="I"]{background:var(--tetris-i)}[data-piece="J"]{background:var(--tetris-j)}[data-piece="L"]{background:var(--tetris-l)}[data-piece="O"]{background:var(--tetris-o)}[data-piece="S"]{background:var(--tetris-s)}[data-piece="T"]{background:var(--tetris-t)}[data-piece="Z"]{background:var(--tetris-z)}.tetris-cell[data-piece],.mini-cell[data-piece]{border-color:var(--tetris-piece-edge);box-shadow:inset 0 -3px 0 #0003}.tetris-controls{display:grid;gap:20px;padding:24px;background:var(--tetris-panel);border:3px solid var(--tetris-border);border-radius:20px;box-shadow:7px 7px 0 var(--tetris-shadow)}.status{min-height:44px;color:var(--tetris-ink);font-weight:700}.piece-panels{display:grid;grid-template-columns:1fr 1.4fr;gap:18px}.piece-panels h2{margin:0 0 8px}.mini-board{display:grid;grid-template-columns:repeat(4,1fr);width:104px}.next-list{display:flex;flex-wrap:wrap;gap:9px}.next-list .mini-board{width:64px}.touch-controls{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.touch-controls button{min-height:46px;color:var(--tetris-ink);background:var(--tetris-control);border:2px solid var(--tetris-border);font:800 15px inherit}.control-actions,.result-actions{display:flex;gap:10px}.control-actions button,.result-actions button{flex:1;min-height:46px}.instructions{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.result-layer{position:absolute;display:grid;inset:0;place-items:center;padding:18px;background:#0008;border-radius:18px}.result-layer[hidden]{display:none}.result-card{width:min(100%,380px);padding:28px;color:var(--tetris-ink);background:var(--tetris-overlay);border:3px solid var(--tetris-border);border-radius:18px;text-align:center}.result-card h2{margin:8px 0;font-size:34px}.result-card p:not(.eyebrow){color:var(--muted)}
@media(max-width:780px){.intro{display:block;padding:28px 0}.stats{margin-top:22px;min-width:0}.game-layout{grid-template-columns:1fr}.tetris-stage{width:min(82vw,430px)}.tetris-controls{padding:18px}.instructions{text-align:center}}
@media(max-width:780px){.app-shell{padding-bottom:calc(160px + env(safe-area-inset-bottom))}.intro{display:block;padding:28px 0}.stats{margin-top:22px;min-width:0}.game-layout{grid-template-columns:1fr}.tetris-stage{width:min(82vw,430px)}.tetris-controls{padding:18px}.touch-controls{position:fixed;z-index:900;right:max(9px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));left:max(9px,env(safe-area-inset-left));padding:8px;background:var(--tetris-panel);border:3px solid var(--tetris-border);border-radius:14px;box-shadow:4px 4px 0 var(--tetris-shadow)}.instructions{text-align:center}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Size the board above the fixed controls

At the required 390 × 844 phone viewport, the 372px-wide 1:2 board is 744px tall, while this two-row fixed tray is at least 122px tall and starts no lower than 714px even without a safe-area inset. Therefore no scroll position can display the complete board and controls together: either the spawn rows are offscreen or the bottom rows are covered by the tray. Cap the stage using the available dvh above the controls rather than only adding page-bottom padding.

AGENTS.md reference: AGENTS.md:L22-L22

Useful? React with 👍 / 👎.

@bashmohandes
bashmohandes merged commit b81cd6e into master Aug 26, 2026
3 checks passed
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.

1 participant