Skip to content

fix(minesweeper): game-over screen inset 16pt, live board bleeds through edges/safe area (P1-5) #388

Closed

Description

@wei18

From the v2 UI/UX plan P1-5 (#377), user-reported, root cause found in code.

Bug

The Minesweeper game-over (Completion) overlay doesn't reach the screen edges/safe areas — the exploded-mines board shows through a 16pt border and under the status bar / home indicator.

Cause

MinesweeperBoardView.swift: .padding(theme.spacing.medium) (:133) is applied BEFORE the completion .overlay { … } (:139), so the overlay is sized to the board frame INCLUDING the 16pt pad. The completion surface (completionSurface :400, .frame(maxWidth/maxHeight: .infinity).background(...)) is therefore inset 16pt on every edge and can't reach the edges/safe areas.

Fix (surgical — decided)

Attach the completion .overlay BEFORE .padding (move :139 above :133) AND add .ignoresSafeArea() to the completion surface background so it covers edges + safe areas. Do NOT convert to a pushed route (that parity refactor is deferred; tracked alongside MS-mirror #386).

Scope / acceptance

  • Minesweeper-only; MinesweeperBoardView.swift (+ surface if needed).
  • The game-over surface covers the full screen including safe areas; the live board no longer shows through.
  • The board's own 16pt padding is preserved for the non-terminal (playing) state.
  • Add a snapshot test of the terminal/game-over state if the MS snapshot harness supports it; otherwise note why not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions