Skip to content

feat(board): full-bleed board + G4 two-group floating glass control cluster - #1056

Merged
wei18 merged 12 commits into
mainfrom
session/grim-crane-gqbx
Sep 9, 2026
Merged

wei18 merged 12 commits into
mainfrom
session/grim-crane-gqbx

Conversation

@wei18

@wei18 wei18 commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Rebuilds the board screen per design.md §3.4/§4.6/§4.7/§7: the board goes edge-to-edge and the bottom controls become G4, two glass groups with per-button glass, on both apps.

What changed

Full-bleed board. The blanket .padding(theme.spacing.medium) screen margin leaves both boards' body; chrome pads itself and the grid gets no horizontal inset at all. macLayout re-applies the margin it used to inherit, because the Mac board sits in a capped 960/640 detail column where full-bleed does not apply.

G4 = two glass groups. The shared shape is GameShellUI.BoardControlCluster. Each group is its own GlassEffectContainer, so text keys and icon keys can never blend into one background regardless of how close they are laid out — the §4.6 rule stops being a function of the gap. Every BUTTON carries its own .buttonStyle(.glass) / .glassProminent; no container ever gets .glassEffect applied to itself (§12 error #8, confirmed on device by #1029's B-7 spike). Container and stack spacing are left at system defaults throughout.

Scene exclusivity. G4 unmounts whenever modalOverlayPresentation != nil — the one value that already drives every board modal, so completion, pause AND leave-confirmation are covered by a single nil check. No new observer, no preference key, no .disabled() on the shell: #1020 removed BoardModalOverlayActivePreferenceKey because observing it from the shell root unmounted the pushed board on macOS, and #1019 proved .disabled() deadlocks the overlay's own CTA. Reading the value the overlay is keyed on cannot drift from it.

Minesweeper mirrors the shape, not the code. MinesweeperControlClusterView is new and builds the same BoardControlCluster, but MS ships ONE group — because Minesweeper has no undo at any layer, contrary to §3.4 and this issue's own text. No canUndo, no undo(); MinesweeperSession.swift and MinesweeperGameViewModel.swift say "no undo" in their scope comments; the engine's moves is a forward-only replay log that state restore discards. The edit group is omitted, not rendered empty and not filled with a disabled placeholder — a dead control is worse than an absent one. Undo is engine work, tracked as #1052.

Behaviour changes a reviewer should not have to infer from a baseline diff

  • Sudoku's board now centres in its vertical band instead of sitting under the header. Removing the padding created a divergence — MS's grid already centres in its fitted branch (fix(minesweeper): Intermediate/Expert cells lock at 32pt — below the 44pt HIG touch target and unacknowledged #764) — and §3.4's ASCII shows breathing room above and below the board. Mirror principle, so it is fixed rather than shipped.
  • MS's Reveal mode is now neutral glass, where it was .borderedProminent tinted accent.primary. Flag keeps its accent.muted tint. §4.7 applies colour sparingly and reserves it for state indicators, and this makes the two apps' clusters read alike (Sudoku's pencil is likewise neutral when off).
  • Minesweeper's mode toggle moved below the banner slot. The compact stack went from boardGrid → modeToggle → bannerSlot to boardGrid → bannerSlot → controlCluster, so the toggle now sits under the banner rather than between it and the board. That is the cluster taking its place as the bottom-anchored G4 group; it is a placement change to a shipping control and should not have to be inferred from a baseline diff.
  • Minesweeper's compact stack has NO net Spacer change, and the board does not move relative to main. An earlier revision of this section claimed the board sits 6pt lower. That was wrong, and it is worth spelling out because it is the exact failure this section exists to prevent. git diff main...HEAD shows no net Spacer change: main has exactly one Spacer(minLength: 0), in the Mac rail (statusBar / modeToggle / Spacer), and so does this PR (statusBar / controlCluster / Spacer) — the intermediate commit 01c69654 briefly had two, because this PR's own cluster extraction added one to the compact stack, and round 1's review removed it again in 7d303e46. The 6.0pt figure and its 12 ÷ 2 arithmetic were real but describe a delta between two intermediate commits of this PR, not anything a user or a future reader would ever see. The MS iPhone baseline changes in this PR are attributable to full-bleed and the cluster, not to a stack-gap shift.
  • §4.7 colouring pass on Sudoku's cluster. The whole-grid pencil-mode border + sage wash is gone — it tinted the input group's entire background, which §4.7 forbids outright, and Notes mode is already signalled by the pencil button itself. Erase and an enabled Undo/Redo lost their accent ink, leaving exactly one colourable control per group. The fix(sudoku): digit pad design-audit findings — armed badge contrast collapse, VoiceOver l10n bypass, doc drift (8 findings) #855 F-5 disabled gray-out and the fix(a11y): dark-mode white-on-accent AA failures beyond #786 — DigitPad armed digit, completion/pause prominent buttons, mine glyph #797 on-accent-ink placement both survive unchanged.

Measured, not asserted

Cell sides, measured from the recorded baselines at §3.4's three breakpoints:

width board width cell §3.4 bound by
320 235.0 pt 26.1 pt 35.1 height
393 393.0 pt 43.7 pt 43.2 width
430 430.0 pt 47.8 pt 47.3 width

393 and 430 are exactly full-bleed and land above the table, because §3.4's figures are (W − 4) / 9 — 附錄 B's "扣除外框" deducts a 4pt outer frame this board does not have (only 0.5pt per-cell hairlines). On a real iPhone 17 Pro the cell PITCH measures 43.61pt — above §3.4's 43.2 and just under the HIG 44pt default, exactly as §3.4's ruling anticipates. (An earlier revision of this body said 44.17pt "clearing HIG 44". That was wrong: 44.17 is the frame width idb ui describe-all reports per cell, and those hit rects overlap the pitch by ~0.55pt. The §7 anchor test now pins the honest number.)

This is a corrected measurement, not a new failure. §3.4's table never claimed the 393-class clears 44 — its own rows read iPhone 15/17 Pro 393pt … 仍未達,差距 3.9→0.8pt and iPhone Pro Max 430pt … 首次跨過. 43.61pt landing just under the HIG default is exactly what the design predicted; the 44.17pt figure had in fact contradicted the design table.

Also measured, and worth stating plainly: on a real 402pt device the board spans 392.5pt, not 402 — a 4.75pt gap each side. The layout applies no horizontal inset (that is what this PR removed), but with real safe areas the square is still bound by HEIGHT by ~9.5pt, so it stops short of the edges. "Full-bleed" describes the layout rule, not a guarantee that every device renders edge-to-edge.

320 is not full-bleed: header + cluster + margins leave ~235pt of vertical room, so the square is bound by HEIGHT and removing the horizontal inset buys nothing there. 26.1pt is under the 28pt absolute floor §3.4 itself cites. This is a long-standing table error rather than a regression — the pre-3.0 "現況 32.0pt" figure assumed the same width-binding that never held on that device. §3.4 is corrected in this PR; the actual fix (a shorter cluster variant for short screens) is #1055.

Acceptance evidence

  • §7, G4 never covers an interactive cell — BoardControlClusterLayoutTests, 6 tests. Sweeps the three breakpoint widths against cluster heights from a lone edit row up past anything the .xLarge Dynamic Type cap can render, asserting no glass group's rect intersects any cell rect. Also pins: the two groups are disjoint bands; a single-group cluster reports one group and not an empty second one; MS's 16×16 / 16×30 boards obey the rule; a taller cluster shrinks the BOARD rather than encroaching, with the board clamped at zero so a flipped rect cannot sneak past intersects. Nothing samples the eight IC × RT × RM combinations — bands(...) takes no accessibility input, because those switches change how glass is painted and painting is not layout.
  • Per-button glass, never on the container — rg "glassEffect|GlassEffectContainer|buttonStyle\(\.glass" over the four cluster sources returns two GlassEffectContainer hits, both in BoardControlCluster, neither carrying .glassEffect; every other hit is .buttonStyle(.glass) / .glassProminent on an individual button.
  • Simulator sweep (Debug build of this branch, driven with idb — the only faithful Liquid Glass compositor):
check Sudoku Minesweeper
full-bleed (iPhone 17 Pro, 402pt) cells x 4.75→397.25, 43.61pt pitch cells x 4→398, 42pt
two glass groups, per-button glass ✅ icon row + 3×3 grid ✅ one populated group
G4 vs cells board ends y=530.25, G4 starts y=539 board ends y=635, G4 starts y=766
empty a11y labels on G4 0 of 14 0 of 1
during pause / leave 0 of 13 in the a11y tree 0 in the tree
during completion 0 of 13, visually gone — not covered 0, loss panel only

Evidence provenance for the Minesweeper rows: they were captured at a18d4ada, which sits between this PR's own addition of a compact-stack Spacer (01c69654) and its removal (7d303e46). So they were measured with that extra stack gap present, and at the final head the same board sits 6pt lower — clearance ~125pt rather than the 131pt shown. That is a difference between my evidence and the final head, NOT a change versus main, where the compact stack is unchanged (see behaviour changes above). The delta is a pure vertical translation of a same-sized board, so the control and label counts cannot move; not re-run, because arithmetic settles it.

iPad regular re-verified independently: 14 controls, 0 empty labels, 0 during pause, 0 during completion.

  • feat(minesweeper): board pinch-to-zoom + scroll-indicator clearance from board edge #815's zoom suite passes unmodified — 10/10, and nothing in this PR touches the gesture or the pure helpers.
  • GameShellKit 124/124, MinesweeperKit 411/411, SudokuKit Board|DigitPad|Snapshot|Cluster 126/126. (SudokuKit's full suite is not runnable locally — the documented segfault near the ToastController/SettingsView NSWindow tests — so it runs in filtered batches here and in full on CI.) swiftlint --strict clean on every file this PR touches; three pre-existing violations elsewhere in SudokuCoreKit/AppMonetizationKit are untouched and out of scope, and CI lints changed files only.

Review round 1 — what it found, and what it changed

Both reviewers found real defects. The two blockers are worth reading even if you skip the rest, because each one is a class rather than an instance.

A baseline was committed completely blank — zero opaque pixels — and every gate stayed green. swift test compares a blank capture to a blank reference and finds them identical; the drift gate only fires on change; the orphan gate only proves a recording test exists. Root cause isolated with a throwaway probe, and it is narrower and broader than first suspected: it is not .glassProminent and not GlassEffectContainer, it is tint. Opaque-pixel counts through this capture path on a 300×200 ground:

construct opaque
no glass at all 26800
.buttonStyle(.glass), untinted 26800
.buttonStyle(.glassProminent) 0
.buttonStyle(.glass) + .tint 0
.glassEffect(.regular.tint(_)) 0
.glassEffect(.regular.tint(_).interactive()) 0

Any tinted glass blanks the whole image, background included. SnapshotBlankBaselineGuardTests now walks every committed baseline in both apps and fails on any with no opaque pixels — content-agnostic, and it would have caught this immediately. The affected fixture was split by what this renderer can capture: the isSameDigit cell tint stays a pixel test (on BoardCellView directly, with an untinted control cell beside it — the pair differ in 98% of pixels, so the assertion can actually fail), while the armed key's own highlight is simulator-verified.

Five baselines were silently stale, and the tolerance that hid them is looser than anyone thought. .tolerantImage is .image(precision: 0.95, perceptualPrecision: 0.95). The perceptual term means a pixel counts as matching when its delta is small — and these boards are a low-contrast cream/white/light-grey palette, so a large change decomposes into very many very small deltas. A visibly different design passes. Three Minesweeper baselines (0.41% / 1.07% / 1.07%, all the mode-toggle chip) and two Sudoku ones (35.91% / 17.12%, still showing the 16pt inset and .bordered keys) were carrying the old design. All five re-recorded here. The corollary is the uncomfortable one: under a tolerant comparator, a green suite says nothing about whether a baseline matches the code — staleness can only be established by re-recording and diffing, and only from a full-suite run (a filtered subset changes the execution set for order-dependent fixtures). Class tracked as #1057. Note also that mac/minesweeper/03-board did NOT move despite its baseline drifting, because the drifted region sits outside the marketing crop — so the drift gate is not a proxy for baseline correctness either.

Strict cluster-only snapshots now exist for both apps: the cluster is where silent drift happened, and rendering it alone gets strict comparison there without making the antialiasing-heavy board tests strict and flaky.

The §7 suite was self-consistent algebra and is now anchored to reality. boardSide and the board band were the same quantity restated, so the non-overlap assertion could not fail. It now checks the model against real frames read off a running app, which immediately earned its keep: without safe-area terms the model predicted a 402pt board where the device renders 392.5pt. With them the cluster's top matches the measured 539.0 exactly and the board lands within 4.5pt. That anchor is also what caught the 44.17 → 43.61 correction above.

Accessibility sweep (§7's second obligation). Increase Contrast and Reduce Transparency, driven on the simulator:

setting controls empty a11y labels board bottom G4 top clearance G4 appearance
default 14 0 530.25 539.00 8.75pt translucent glass
Increase Contrast 14 0 530.25 539.00 8.75pt defined high-contrast edges
Reduce Transparency 14 0 530.25 539.00 8.75pt degrades to an opaque surface

Geometry is byte-identical across all three. §7's "幾何不隨開關改變" was an argument before this PR; it is now measured. Both degraded states remain readable, so no IC colour variants are needed.

One acceptance row is WAIVED, explicitly rather than quietly dropped: a Sudoku simulator row with a live ad banner. Attempted via -uitest-fake-ad-gate-repoll, which by design only opens the gate after a genuine background→foreground cycle. simctl cannot produce one — launching another app and relaunching restarts the process, which either drops the near-win flag or lands on the ATT primer instead of the board. I got as far as a board with the gate flag set and identical geometry (8.75pt clearance), but with no banner rendered, so the row is not claimed. Not obtainable with the available tooling; snapshot coverage stands in: snapshotAdsEnabledUnloadedSlot_* exercises banner × cluster in both apps, and Sudoku's light variant was one of the five stale baselines found here, so it is current and genuinely exercising the new layout rather than the old one.

Two things this PR does not fix, and one it deliberately leaves ugly

Snapshot baselines are re-recorded showing bare glyphs, and that is not "the controls disappeared". This repo's NSHostingView + cacheDisplay capture path renders standard materials and .bordered correctly but draws Liquid Glass as nothing — measured through both that path and ImageRenderer on identical views. Neither renderer is faithful (ImageRenderer draws glass as a flat opaque fill and shifts material colours), so no second snapshot helper was added; two capture paths with different colour fidelity would become two competing truths in the suite. The glass is proven structurally by the geometry suite and visually on the simulator.

The ASC 03-board marketing frames are committed knowingly wrong (docs/app-store/screenshots-ascspec/, 28 files). They inherit the same blind spot and now show a board with surface-less controls under the headline "Notes the way you write them." Regenerating them is the drift gate's prescribed fix and the safer option: a stale frame depicting a design the app no longer has is the #1051 orphaned-baseline failure mode — it looks fine, so nobody investigates. #1054 holds this as a pre-submission blocker. The gate's frame-drift-verified hatch was deliberately NOT used: it attests that a baseline change does not alter any ASC frame, and this one demonstrably does.

G3 → G2 is deferred to #1053. The iPhone board is a fullScreenCover with no NavigationStack (GameRoot.swift), so .toolbar draws nothing; adding one changes BoardView's frame such that the in-place iOS pause overlay stops covering the toolbar — the exact #763 guarantee #1019/#1038 paid to restore. §4.1's inventory is marked ⏳ rather than left reading as done.

Also in here

  • BoardView.swift and DigitPadView.swift both crossed SwiftLint's 400-line ceiling, so BoardView+Layout.swift and DigitPadView+Mac.swift split off per repo convention.
  • Env note for other sessions: .mise.toml was untrusted in this worktree, so lefthook's gitleaks / hygiene / swiftlint pre-commit hooks were all erroring out while commits still succeeded — they fail open. mise trust fixes it; worth knowing on any fresh worktree.

#1022's body now carries explicit deferral annotations for the four items this PR does not deliver (G3→G2 → #1053; the "snapshot tests confirm two glass groups" acceptance line → superseded by structural + simulator evidence, #1054/#1057; macOS idb → #1039; SE cell size → #1055), so the close is honest rather than silent.

closes #1022
part of #1014

🤖 Generated with Claude Code

wei18 and others added 7 commits September 7, 2026 23:56
…fold

Checkpoint of #1022 phase 1 (Sudoku). Not yet verified — snapshot baselines
are deliberately NOT re-recorded; see the open question below.

- GameShellUI: new `BoardControlCluster`, the shared G4 shape both games
  mirror. Two glass groups (edit / input), each its own
  `GlassEffectContainer` so the two can never blend into one background;
  system default spacing throughout per design.md §4.6. A single-group
  initializer exists for Minesweeper, which has no edit-group controls
  (it has no undo at all — see #1052).
- BoardView: the blanket `.padding(theme.spacing.medium)` screen margin is
  off the body. `compactLayout` now pads only its chrome, leaving the board
  edge-to-edge (design.md §3.4); `macLayout` re-applies the same 16pt it
  used to inherit, since the Mac board sits in a capped detail column and
  full-bleed does not apply there.
- BoardView: G4 unmounts whenever `modalOverlayPresentation != nil` — the
  one value that already drives every board modal, so completion, pause and
  leave-confirmation are all covered with no new observer, no preference
  key and no `.disabled()` on the shell (§4.3 scene exclusivity).
- DigitPadView: rebuilt as the two groups, per-button glass, never on the
  container (§12 error #8). §4.7 coloring pass — the whole-grid pencil-mode
  wash is gone and Erase/Undo/Redo lost their accent ink, leaving exactly
  one colored control per group. The #855 F-5 disabled gray-out and the
  #797 on-accent-ink placement both survive.

Measured full-bleed cell side at 393pt = 43.7pt (786px / 9 / 2), at or above
design.md §3.4's 43.2pt — the table deducts a 4pt outer frame this board does
not have.

Open: `.buttonStyle(.glass)` renders fully transparent in the headless macOS
snapshot renderer (the previous `.bordered` keys rendered visible
backgrounds). Investigating whether explicit `.glassEffect()` — the other
spelling §4.6 allows and #1029's B-7 verified — renders, before touching any
baseline.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…files

#1022's G4 rework pushed both files past SwiftLint's 400-line file_length
ceiling. Repo convention is to extract a `+Feature.swift` sibling rather
than disable the rule, so:

- `BoardView+Layout.swift` takes both size-class arrangements; BoardView.swift
  keeps the view's state, `body` and lifecycle.
- `DigitPadView+Mac.swift` takes the Mac rail arrangement.

`adProvider` / `adGate` / `theme` / `compactLayout` / `macLayout` drop to
`internal` for the cross-file reads, matching the same convention the existing
BoardView+AccessibilityHeader.swift split already established.

Also corrects BoardView's file header: the "NO .glassEffect on the board"
rule still holds for the GRID (design.md §3.4 keeps the content layer
glass-free) but no longer describes the control cluster around it.

`swift build` clean; `swiftlint --strict` clean on GameShellUI/BoardControlCluster.swift
and all of SudokuUI/Board/.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
§7's rule is a layout rule ("幾何不隨開關改變,必須以最壞情況(IC+RT)為設計基準"),
so a screenshot at one width cannot establish it. `BoardControlClusterLayout`
states the compact board screen's top-down band assignment — margin, header,
full-bleed board square, flexible gap, cluster groups — as pure geometry, and
the suite sweeps §3.4's three breakpoint widths against cluster heights from a
lone edit row up past anything the `.xLarge` Dynamic Type cap can render,
asserting at every point that no glass group's rect intersects any cell rect.

Also pinned: the two groups are disjoint bands rather than one merged surface;
a single-group cluster (Minesweeper, #1052) reports one group and not an empty
second one; Minesweeper's non-square 16×16 / 16×30 boards obey the same rule;
and a taller cluster shrinks the BOARD rather than encroaching on it, with the
board clamped at zero so a flipped rect can never sneak past `intersects`.

Nothing here samples the eight Reduce Motion × Increase Contrast × Reduce
Transparency combinations: `bands(...)` takes no accessibility input because
those switches change how glass is painted, and painting is not layout — so
sampling them would be sampling one call eight times. Dynamic Type is the input
that can genuinely grow the cluster, and that is what the sweeps vary.

Deliberately takes the group heights as INPUTS rather than freezing a metrics
table: fixing them here and rendering with `.frame(height:)` would make the
numbers true by force and hide a real overflow behind a clip.

GameShellKit 122/122 green; swiftlint --strict clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Phase 2 of #1022 — Minesweeper's half, mirroring Sudoku's SHAPE rather than
copying DigitPadView (the two games' controls genuinely differ).

- `MinesweeperControlClusterView` is new and builds the same shared
  `GameShellUI.BoardControlCluster`, takes plain values plus closures like
  DigitPadView does, and keeps the mode toggle's full a11y contract (label /
  value / hint / identifier) and its #786 on-accent ink, which must sit on the
  label content because a prominent style resolves its own label ink (#797).
- It ships ONE group. design.md §3.4 and #1022 both describe MS's cluster as
  "揭開/旗標模式切換 + undo", but Minesweeper has no undo at any layer — no
  `canUndo`, no `undo()`, and the scope comments in `MinesweeperSession` and
  `MinesweeperGameViewModel` say so outright; the engine's `moves` array is a
  forward-only replay log that state restore discards. The edit group is
  omitted rather than rendered empty or filled with a disabled placeholder,
  which would be a dead control. Undo is engine work, tracked as #1052.
- The MS board goes full-bleed the same way Sudoku's did: the blanket
  `.padding(theme.spacing.medium)` leaves `body`, chrome pads itself, and
  `macLayout` re-applies the margin it used to inherit.
- The cluster unmounts whenever `modalOverlayPresentation != nil`, off the
  same single value that already drives every board modal.
- Tap-mode persistence moves into `toggleInteractionMode()` unchanged, still
  writing through the injected store (#796) rather than `.standard`.

Sudoku's board now centres in its vertical band instead of sitting under the
header. Removing the padding had left the two apps disagreeing on the same
screen — MS's grid already centres in its fitted branch (#764) — and §3.4's
ASCII shows breathing room above and below the board. `BoardControlClusterLayout`
models the band accordingly; centring can only move the square away from the
header, never past the band's bottom edge, so §7's rule is unaffected.

Board baselines re-recorded, and they legitimately show the cluster's controls
as bare glyphs with no key surfaces. That is NOT "the controls disappeared":
Liquid Glass renders as nothing in this repo's NSHostingView capture path,
while standard materials and `.bordered` render fine — measured both ways, see
the PR body. The App Store `03-board` slots read from these same baselines, so
that consequence is tracked separately as #1054; it is not fixed here.

MinesweeperKit 409/409 green. SudokuKit Board|DigitPad batch back to its
pre-existing 104 tests / 2 issues (the load-sensitive
`BoardLeaveOrPauseStateTests` clock flake, which passes in isolation).
GameShellKit 122/122 + 6 new §7 geometry tests. swiftlint --strict clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…points

The existing board matrix only ever renders 393pt, the middle row of §3.4's
cell table. These add 320 (iPhone SE) and 430 (Pro Max) so a horizontal inset
creeping back in is caught at the widths the table is actually about.

Measured from the recorded baselines (board width in pt / resulting cell side,
against §3.4's figure):

  320 → 235.0 pt wide, 26.1 pt cells (table 35.1) — NOT full-bleed, see below
  393 → 393.0 pt wide, 43.7 pt cells (table 43.2) — full-bleed
  430 → 430.0 pt wide, 47.8 pt cells (table 47.3) — full-bleed

At 393 and 430 the board is width-bound, so it spans the screen exactly and the
cell side lands above the table (the table deducts a 4pt outer frame this board
does not have — 附錄 B's "扣除外框"). At 320 it is HEIGHT-bound: the header plus
the control cluster plus the margins leave only ~235pt of vertical room, so the
square is capped by height and removing the horizontal inset buys nothing.
That is a property of the cluster's height on a 568pt screen, not of this
change — the same chrome dominated before #1022 — but it does mean §3.4's SE
row is not reachable with G4 at its current size, and 26.1pt sits under the
28pt absolute floor §3.4 itself cites. Raised with the PM rather than silently
recorded.

The baselines show the cluster's controls as bare glyphs. That is the
NSHostingView capture path's Liquid Glass blind spot (#1054), not missing
controls; `testName` is forwarded through the helper so each baseline files
under its own `@Test` rather than all three under the helper's name.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… G3 row

Four corrections #1022's implementation forced, each anchored to what the code
actually does rather than what the spec assumed.

§3.4 格徑表 — the "3.0 滿版" column is `(W − 4) / 9`: 附錄 B's "扣除外框" deducts
a 4pt outer frame the board does not have (only 0.5pt per-cell hairlines). The
real full-bleed side is `W / 9`, slightly LARGER than the table. Measured from
the recorded baselines: 393 → 43.7pt and 430 → 47.8pt, both true full-bleed.

§3.4 SE row — 320pt measures 26.1pt, not 35.1pt, because the board there is
bound by HEIGHT, not width: header + G4 + margins leave ~235pt, so removing the
horizontal inset buys nothing. The table's width-bound assumption never held on
that device — the pre-3.0 "現況 32.0pt" figure was unreachable for the same
reason — so this is a long-standing table error, not a #1022 regression. 26.1pt
is under the 28pt absolute floor the section itself cites; the fix is a shorter
cluster variant for short screens, tracked as #1055.

§3.4 MS controls — the ASCII said "MS:揭開/旗標模式切換 + undo", but Minesweeper
has no undo at any layer: no `canUndo`, no `undo()`, and both `MinesweeperSession`
and `MinesweeperGameViewModel` say "no undo" in their scope comments. The
engine's `moves` is a forward-only replay log that state restore discards. So MS
ships ONE group and the edit group is not drawn at all — no disabled placeholder,
because a dead control is worse than an absent one. Tracked as #1052.

§4.1 — G3's row still says 刪除, but nothing has deleted it: #1022 left the
header alone because the iPhone board is a `fullScreenCover` with no
NavigationStack, so `.toolbar` draws nothing, and adding one would change
BoardView's frame such that the in-place pause overlay stops covering the
toolbar — the exact #763 guarantee #1019/#1038 paid to restore. Marked ⏳ with
#1053 rather than left reading as done.

§4.1 also gains the snapshot caveat: this repo's `NSHostingView` + `cacheDisplay`
path renders standard materials and `.bordered` but draws Liquid Glass as
nothing, so G4/G6 glass can only be verified on a simulator — and the App Store
`03-board` slots read those same baselines (#1054, pre-submission blocker).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ed by #1054

`scan:store_frame_drift` flags four changed baselines feeding the `03-board`
slot for both apps across iphone-6.9 / ipad-13 / mac. Regenerating is the gate's
prescribed fix, and it is the right one here even though the output is wrong:

The regenerated frames show the board with NAKED, SURFACE-LESS CONTROLS — bare
undo/redo/pencil/erase glyphs and bare digit keys with no backgrounds — because
this repo's snapshot renderer draws Liquid Glass as nothing (measured both ways;
see #1054). On device the same build renders the two glass groups correctly.

Committing them anyway, deliberately. A stale frame depicting a design the app
no longer has is the #1051 orphaned-baseline failure mode: it looks fine, so
nobody investigates. A current frame we have measured, know is wrong, and have
filed as a submission blocker is strictly safer — the artifact matches the app,
and the "submit before it is fixed" risk is held by #1054 (labeled `pending`,
referenced from the epic) rather than by anyone's memory.

NOT using the gate's `frame-drift-verified` escape hatch. That hatch attests the
baseline change does not alter any ASC frame; this one demonstrably does, so the
trailer would be a false statement that happened to turn the gate green.

168 slots regenerated, 28 files changed, all matching their device ASC pixel
size and RGB with no alpha.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
wei18 and others added 2 commits September 8, 2026 11:06
…nest §7 anchor

Two blockers and the must-fix list from the #1056 review.

BLOCKER 2 — a baseline was committed with ZERO opaque pixels
(`BoardViewDigitFirstTests/snapshotArmedDigit_iPhone_light`) and every gate
stayed green: a blank capture matches a blank reference, the drift gate only
fires on change, the orphan gate only proves a recording test exists.

Root cause isolated with a throwaway probe, and it is narrower AND broader than
the review's hypothesis: it is not `GlassEffectContainer` and not
`.glassProminent` — it is **TINT**. Opaque-pixel counts through this exact
capture path on a 300×200 ground:

  no glass at all                            26800
  .buttonStyle(.glass), untinted             26800
  .buttonStyle(.glassProminent)                  0
  .buttonStyle(.glass) + .tint                   0
  .glassEffect(.regular.tint(_))                 0
  .glassEffect(.regular.tint(_).interactive)     0

Any tinted glass blanks the WHOLE capture, background included. Untinted glass
leaves the rest of the screen intact (the glass itself is still invisible —
that is #1054's separate blind spot). On device the same build renders fine.

Fixes:
- `SnapshotBlankBaselineGuardTests` in BOTH apps — walks every committed
  baseline and fails on any with no opaque pixels. Content-agnostic, no
  per-fixture bookkeeping, and it would have caught this immediately.
- `BoardViewDigitFirstTests` split by what this renderer can actually capture.
  The `isSameDigit` cell tint is ordinary board content, so it stays a pixel
  snapshot — now on `BoardCellView` directly, WITH an untinted control cell
  beside it, because one image proves nothing about a highlight (the pair
  differ in 98% of pixels, so the assertion has real discriminating power).
  The armed KEY's own highlight is uncapturable here and is verified on the
  simulator instead. Re-recording the old fixture would just re-commit a blank.

BLOCKER 1 — three MS baselines were silently stale, not one. A full-suite
re-record (never a filtered subset — a filter changes the execution set and
order-dependent fixtures then bake a different state) found the iPad case the
review named plus both Mac `snapshotFlagged_*`: 0.41% / 1.07% / 1.07% drift,
every one a 224×104pt hit on the mode-toggle chip, every one inside
`.tolerantImage`'s 5% budget. Sudoku is clean. `minesweeper/ipad-13/*` ASC
frames regenerated (7 locales); the Mac ASC frame did NOT move despite its
baseline drifting, because the drifted region sits outside the marketing crop —
so the drift gate is not a proxy for baseline correctness. Class tracked as #1057.

§7 suite — the review is right that it was self-consistent algebra: `boardSide`
and the board band are the same quantity restated, so the non-overlap assertion
could not fail. It now has an empirical anchor: real frames read off a running
app with `idb ui describe-all`, asserted against the model. That immediately
earned its keep — fed the measured chrome WITHOUT safe-area terms the model
predicted a 402pt board where the device renders 392.5pt. Adding
`safeAreaTop`/`safeAreaBottom` brings the cluster's top to the measured 539.0
exactly and the board within 4.5pt.

The anchor also corrected a claim I had made from the same data: the cell PITCH
is 43.61pt, not the 44.17pt `describe-all` reports as each cell's frame width —
the hit rects are ~0.55pt wider than the pitch and overlap slightly. 43.61
clears §3.4's 43.2 but sits just UNDER the HIG 44pt default, exactly as §3.4's
ruling anticipates. And on a real 402pt device the board spans 392.5, not 402:
the layout applies no horizontal inset, but with real safe areas the square is
still height-bound by ~9.5pt, so "full-bleed" describes the layout rule, not a
guarantee of edge-to-edge on every device. Both are pinned by assertions now.

Also in this batch:
- M1: design.md §4.6 amended — each group gets its OWN `GlassEffectContainer`,
  with the B-7 reasoning (merging is proximity-driven, so one shared container
  makes "text and icons never share a background" depend on the gap between
  them; separate containers make it structural).
- M2: `fullBleed_iPhoneSE_320` renamed `heightBound_iPhoneSE_320` (baseline
  follows) — a test named for a claim its own subject disproves is the
  contradiction §3.4 just had to be corrected for. `fullBleedCellSide`'s table
  comparison scoped to 393/430, where the board actually IS width-bound; at 320
  `W/9 >= (W−4)/9` is true for every W and proved nothing.
- M4-lite: `BoardControlClusterLayout` dropped to internal, header rewritten to
  claim only what it proves, and `stackSpacing * 3` replaced by a caller-supplied
  `stackGapCount` so it stops asserting a correspondence nothing checks.
- M5: MS's dead `Spacer(minLength: 0)` deleted (the board already expands, so it
  resolved to zero height while still costing a stack gap); Sudoku's comment no
  longer describes a `Spacer` its stack does not have.
- Cosmetic: `DigitPadView+Mac.swift`'s `}}`.

GameShellKit 125/125, MinesweeperKit 410/410, SudokuKit Board|DigitPad|Snapshot
122/122. swiftlint --strict clean. Both store gates PASS.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The direct answer to CR B1: a glass restyle of one control drifted three
Minesweeper board baselines by 0.41-1.07% and passed, because the whole-board
suites use `.tolerantImage` (precision 0.95) for the antialiasing-heavy grid.
Rendering the cluster ALONE gets strict comparison on the part that must not
drift silently, without turning the board tests strict and flaky — `strict
content / tolerant board` is already the repo's convention, and this is a
content fixture.

Chosen over region-masking inside the board snapshots: same targeting, far less
machinery, and it lands where strict already belongs.

Both apps, default (untinted) cluster state only. A tinted glass control blanks
this entire capture path, so armed-digit / notes-on / flag-mode cannot be
pixel-tested here at all and stay simulator-verified; `SnapshotBlankBaselineGuardTests`
fails loudly if a future state change ever lands one of them in a fixture.

Two fixtures were checked for discriminating power rather than assumed to have
it, since a snapshot that cannot fail is worse than no snapshot:
- Sudoku enabled vs history-disabled differ in 0.14% of pixels — the #855 F-5
  gray-out is genuinely captured.
- That case is COMPACT deliberately. The conditional ink #855 installed lives
  only in the compact row; the Mac rail leaves disabled styling to the system
  and renders byte-identical enabled vs disabled through this path, so a
  regular-class variant would have asserted nothing. Whether the rail dims on a
  real Mac is not answerable here — #1039 owns macOS interaction.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
wei18 and others added 2 commits September 8, 2026 15:29
…he old design

I got these wrong once and want the reasoning on the record, because the way I
dismissed them is a trap anyone re-recording under a tolerant comparator will
hit.

`BoardViewBannerTests/snapshotAdsEnabledUnloadedSlot_iPhone_light` and
`BoardViewTests/snapshotEmpty_Mac_light` were never re-recorded in this PR
(`git log origin/main..HEAD -- <file>` is empty for both). They still showed the
PRE-#1022 board: 16pt inset and `.bordered` key fills. A full-suite re-record
produces something 35.91% / 17.12% different.

My first sweep DID flag both, and I dismissed them as artifacts of my own
harness on the grounds that "they pass against HEAD, so HEAD must be correct."
That inference is invalid, and here is why: `.tolerantImage` is
`.image(precision: 0.95, perceptualPrecision: 0.95)`. The perceptual term means
a pixel counts as matching when its delta is small — and these boards are a
low-contrast cream/white/light-grey palette, so an ENTIRE layout and styling
change is composed almost entirely of small per-pixel deltas. A visibly
different design passes.

So under a tolerant comparator, "the suite is green" says nothing about whether
a baseline matches the code. Staleness can only be established by re-recording
and diffing. The magnitude heuristic I proposed earlier — that ~1% is real
drift and 36% means the measurement is broken — was exactly backwards here: the
large number was the honest signal and I explained it away.

Sweep redone properly, deleting and re-recording EVERY baseline in both apps
from a full-suite run and treating any difference as real:
  - Sudoku: these 2, now fixed. Nothing else.
  - Minesweeper: 0 remaining (the 3 fixed earlier were the whole set).
Neither of these two feeds an ASC slot, so no marketing frame moved.

SudokuKit 412/412, MinesweeperKit 412/412, both store gates PASS.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…where it can't

NEW-1: two of the six strict cluster tests were asserting nothing. Diagnosed
before fixing, and the cause is neither of the two the review offered.

The dark variants were not byte-identical — they differ in 1469 / 6615 pixels —
but every one of those differences is alpha ≤7 antialiasing residue. Visually
identical, so the finding stands; my first measurement said "1469 differ" and
was the same over-literal reading that nearly buried the stale baselines last
round, just pointing the other way.

The real cause is fixture SCOPE, not a broken colorScheme injection and not a
capture-path limit. This path DOES flip theme-token ink (`Color(light:dark:)`
resolves through SwiftUI's `\.colorScheme`); it does NOT flip system default
label colours, which resolve from the AppKit drawing appearance `cacheDisplay`
never applies. Measured on these exact fixtures:

  compact light vs dark   5998 VISIBLE differing px, ink (20,22,25) → (239,239,242)
  rail    light vs dark   0 visible
  MS      light vs dark   0 visible

The compact row carries always-on theme ink (#855 F-5's conditional icon
colours), so its dark variant is real coverage — ADDED, it did not exist
before. The rail and MS fixtures contain no theme ink in any state this path
can capture: their only `foregroundStyle` uses sit in the PROMINENT branches
(armed digit / notes-on / flag mode), prominent means tinted, and tinted glass
blanks the whole capture. No capturable state of those views can carry a
dark-mode signal, so both dark tests are DELETED rather than left advertising
coverage they never had. Dark appearance there is simulator-verified.

M2 residual, and I got this wrong once more before getting it right. The first
replacement compared `side > tableFigure` and I wrote a comment claiming a
re-introduced 16pt inset would fail it. That was false: `fullBleedCellSide` is
a pure function of screen width and knows nothing about the app's layout, so it
could not fail either. Deleted. The table comparison now lives on the MEASURED
device geometry — `#expect(cells[0].width > 43.2)` plus an upper bound below
the HIG 44 default — where it is a statement about the board the device
actually rendered rather than a rearrangement of W/9. The surviving pure-function
test is renamed `fullBleedCellSideIsWidthOverColumns` and its doc comment says
outright that it is an identity and cannot catch an inset regression.

§3.4 backs the upper bound: it predicts this device class does NOT reach 44
("仍未達,差距 3.9→0.8pt"), only Pro Max does ("首次跨過").

GameShellKit 124/124, MinesweeperKit 411/411, SudokuKit Board|DigitPad|Snapshot|Cluster
126/126. swiftlint --strict clean on every file touched.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@wei18

wei18 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

T6 ACCEPT

Fresh-context acceptance at PR head dd02a55f (base 714a58c9). All work done in a throwaway detached worktree under /private/tmp; the main checkout and session worktrees were never touched.

1. Issue #1022 mechanical criteria

  • ✅ Per-button glass, never on the container: rg "glassEffect|GlassEffectContainer|buttonStyle\(\.glass" over BoardControlCluster.swift, MinesweeperControlClusterView.swift, DigitPadView.swift, DigitPadView+Mac.swift shows exactly 2 GlassEffectContainer hits (both in BoardControlCluster.swift), zero .glassEffect calls anywhere, and every other hit is .buttonStyle(.glass)/.glassProminent on an individual Button.
  • ✅ Two groups: BoardControlCluster renders edit and input in separate GlassEffectContainers (source read in full).
  • ✅ Full-bleed: BoardView+Layout.compactLayout and MinesweeperBoardView.compactLayout apply chrome padding per-child (header/statusBar, banner, cluster) and only .padding(.vertical, ...) on the outer stack — the board/grid itself gets no horizontal padding in either app. Mac layouts intentionally keep their margin (documented, non-full-bleed by design).
  • ✅ Non-empty a11y labels: every Button in DigitPadView.swift, DigitPadView+Mac.swift, MinesweeperControlClusterView.swift carries .accessibilityLabel(...) ("Undo"/"Redo"/"Notes"/"Erase"/"Digit N"/mode-toggle format string) — verified by direct source read, not sampling.
  • ✅ feat(minesweeper): board pinch-to-zoom + scroll-indicator clearance from board edge #815's zoom suite: git diff main...dd02a55f -- '*Zoom*' is empty; swift test --filter Zoom on MinesweeperKit → 10/10 green in isolation.

2. Deferral annotations honest — all six (#1053, #1054, #1039, #1055, #1057, #1052) verified via gh issue view: all OPEN, and each title matches exactly what #1022's deferral table claims it covers (G3→G2 fold; ASC/renderer blind spot; macOS XCUITest for #763; SE compact variant; stale-baseline sweep; MS undo). No mismatch.

3. Deleted-coverage audit

  • (a) Dark-cluster deletions: confirmed in dd02a55f's own diff — clusterRail_dark and (MS) mode-toggle dark test deleted, clusterCompact_dark added as real new coverage. Verified the claim directly in source: DigitPadView+Mac.swift's only two foregroundStyle calls sit strictly inside .buttonStyle(.glassProminent)+.tint(...) branches (armed digit / notes-on); the .glass (non-prominent) branches never call foregroundStyle. Same structure confirmed in MinesweeperControlClusterView.swift (.flag branch only). This supports the claim that the rail/MS DEFAULT-state fixtures carry no theme-token ink for the capture path to differ on.
  • (b) fullBleedCellSide tautology: confirmed deleted (widthBoundCellSidesClearTheTable, a pure-function self-comparison that was arithmetically always true). Replacement #expect(cells[0].width > 43.2) / < 44 in measuredDeviceFramesAreDisjoint derives cells[0] from a hard-coded Measured.board literal (real idb-captured geometry) — this is NOT a tautology and can fail (e.g. if the literal is edited to a bad value). Caveat for the record (non-blocking): BoardControlClusterLayout has zero production callers (grep -rl BoardControlClusterLayout only returns the two test files) — it's a parallel geometric model, not wired into BoardView/MinesweeperBoardView. So this suite protects the model + a hand-anchored snapshot of one real device, not a live regression trip-wire against a future edit to the real SwiftUI layout code. Given glass is unrenderable in this repo's snapshot path (documented elsewhere in the PR), this is a reasonable trade-off, but it means the real regression protection here is process (re-run modelMatchesMeasuredDeviceLayout's anchor by hand periodically), not CI-automatic.

4. Blank-baseline guard — SnapshotBlankBaselineGuardTests exists in both apps, enumerates __Snapshots__ from disk (FileManager.enumerator), fails on any 0-opaque-alpha PNG. Independently swept all 79 PNGs that exist at dd02a55f among the 80 changed in this PR (one is a pure delete) with a standalone PIL script reading blobs via git show — 0 blank.

5. Baseline currency (strongest check) — flipped SnapshotMode.recordMode to .all in both SudokuKit and MinesweeperKit SnapshotConfig.swift in the throwaway worktree and re-ran:

  • MinesweeperKit: full unfiltered suite, 411 tests / 69 suites, all record-mode "failures" are the expected swift-snapshot-testing notice, not real errors.
  • SudokuKit: full unfiltered run segfaults in this environment (documented pre-existing local swiftpm-testing-helper issue, reproduced independent of this PR); ran instead with a broad filter covering Board/DigitPad/Cluster/Banner/Completion/Progress/Practice/Personal/Today/DailyHub/Reminder/Audio/IAPRow/AppStoreRows (322 tests, 68 suites) skipping only the known-crashy Toast/NSWindow suite.
  • git status --porcelain after both runs, excluding the two SnapshotConfig.swift edits I made: empty. No baseline drifted. Every committed PNG in scope matches what the code renders right now.

6. Tests — GameShellKit 124/124 ✅ (exact match). MinesweeperKit 411/411 ✅ (exact match). SudokuKit filtered Board|DigitPad|Snapshot|Cluster: 126 tests collected (matches), but "live startOrResume() lands in the reachable Ready window" in BoardLeaveOrPauseStateTests.swift failed on 3 separate runs under parallel load (elapsedSeconds → 1 or 2 instead of 0 — a real-wall-clock assumption breaking under CPU contention from the other 125 parallel snapshot tests). Confirmed not a regression: the file is untouched by this PR (git diff main...dd02a55f -- '*BoardLeaveOrPauseStateTests*' empty), and the test passes in isolation (--filter BoardLeaveOrPauseStateTests) on both main and dd02a55f. This matches the dispatch brief's own note that this suite is a known wall-clock flake.

7. PR body honesty — cross-checked every disclosure item requested: MS 6pt shift arithmetic (traced to the PR's own commit history — a Spacer(minLength: 0) was added in 01c69654 and removed in the round-1 CR commit 7d303e46; net zero vs main, but the shift and its 12÷2=6.0pt math is real and honestly attributed to intra-PR evolution, not hidden), MS sim rows captured at a18d4ada and not re-run (disclosed, with reasoning), MS mode-toggle placement change (confirmed in diff: modeToggle moved from between boardGrid/bannerSlot to after bannerSlot as controlCluster), IC/RT table (present), ASC frames pre-submission blocker #1054 (disclosed, frame-drift hatch deliberately not used), waived Sudoku live-banner row (explicitly called out as WAIVED with reasoning). Nothing found claimed-but-unverifiable or true-but-undisclosed.

8. Issue references — extracted all 42 distinct #NNN refs from the PR body + full diff and checked every one via gh issue view/gh pr view: all resolve, all titles are topically consistent with their usage in context. No fabricated references found.

Verdict: ACCEPT. One non-blocking process note recorded in §3(b) above for the record (the §7 layout suite isn't wired to production layout code, so its regression protection is a hand-anchored constant, not automatic) — does not block, since the alternative (pixel snapshot) is structurally blind to Liquid Glass in this repo's capture path, which the PR already documents at length.

Sibling of the PR-body correction, found by auditing my own claims against
`main` instead of against the current head — the habit that would have caught
the original mistake.

The comment introduced in 7d303e4 read "No `Spacer` here: `boardGrid` already
expands into the slack…", which presupposes a `Spacer` existed on this stack
and was removed. It never did on `main`: the compact stack has no `Spacer`
before or after this PR, and the one deleted in round 1 was added by this PR's
own cluster extraction in 01c6965. A future reader would have taken the
comment as the aftermath of a real removal.

Rewritten to say what is actually true — this stack never had one, here is why
it should not gain one — with the intra-PR history noted explicitly so the
comment cannot be misread the same way again.

Audited the PR body's other net-change claims against `main` at the same time;
all three verified as real deltas rather than intra-PR artifacts:
  - MS mode toggle moved below the banner: main `boardGrid / modeToggle /
    bannerSlot` → `boardGrid / bannerSlot / controlCluster`. Real.
  - Sudoku board centres in its band: `.frame(maxHeight: .infinity)` +
    `.layoutPriority(1)` are absent on main. Real.
  - MS Reveal was `.borderedProminent` + accent tint on main. Real.

MinesweeperKit 411/411; swiftlint --strict clean; comment-only change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@wei18

wei18 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

T6 addendum — mutation probe on new/changed assertions

Per request, applied "make it fail" mutation testing to the assertions this PR added/changed, in a second throwaway worktree at dd02a55f. All confirmed to actually catch a broken invariant, not just pass vacuously:

  • modelMatchesMeasuredDeviceLayout: reverting stackGapCount 2→3 fails exactly as predicted — abs(bands.board.width - Measured.board.width) → 20.5) <= 6.0 (red, 20.5pt off a 6pt tolerance).
  • SnapshotBlankBaselineGuardTests: overwrote Cluster-compact-light.png with a fully-transparent image → test fails and names the exact file (clusterCompact_light.Cluster-compact-light.png). Restored from dd02a55f afterward, worktree left clean.
  • noGlassGroupIntersectsACell (§7 core sweep): removed clusterHeight from bands()'s chrome subtraction (so the board no longer yields room to the cluster) → 189 intersection failures fire immediately across the sweep. Reverted after.
  • Pixel-diff on the two snapshot pairs named in the request (independent PIL script, alpha>16 filter to exclude AA residue): Cell-light-sameDigit vs Cell-light-plain → 97.99% differing pixels (claimed ~98%, confirmed). Cluster-compact-light vs Cluster-compact-light-historyDisabled → 0.14% raw / 0.11% after AA filtering (claimed ~0.14%, confirmed — and non-zero after filtering, so it's real content difference, not just antialiasing fringe).

All five probes reproduce the implementer's claimed numbers/behavior exactly. No vacuous assertions found among the ones checked. This is additive to my earlier T6 ACCEPT (#1056 (comment)) — verdict unchanged.

@wei18
wei18 merged commit 26cec63 into main Sep 9, 2026
6 checks passed
@wei18
wei18 deleted the session/grim-crane-gqbx branch September 9, 2026 05:46
@wei18

wei18 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

T6 ACCEPT — fresh-context acceptance of dd02a55 (base 714a58c), done in a throwaway detached worktree at /private/tmp/t6-1056-accept (removed after). All checks below reproduced independently, not taken on the PR's word.

1. Mutation checks on new/changed assertions — all real, none tautological ✅

  • §7 empirical anchor (modelMatchesMeasuredDeviceLayout): mutated stackGapCount 2→3 → abs(bands.board.width - Measured.board.width) → 20.5 vs <= 6 — fails exactly as predicted. Reverted clean.
  • fullBleedCellSide anchor (measuredDeviceFramesAreDisjoint): mutated Measured.board.width 392.5→380 → cells[0].width → 42.22 fails > 43.2. Reverted clean.
  • isSameDigit vs plain cell PNG pair: measured 97.99% differing pixels (claim ~98%) — real discriminating power, not a copy.
  • Cluster enabled/disabled PNG pair: measured 0.14% diff — matches claim exactly.
  • Un-named extra I added: SnapshotBlankBaselineGuardTests — injected a synthetic all-transparent PNG into __Snapshots__; guard caught it immediately (Every committed snapshot baseline has opaque pixels failed with the injected file named). Cleaned up after.

2. Deleted-coverage audit (rail/MS dark cluster snapshots) ✅

Re-added the two deleted dark tests (clusterRail_dark, cluster_dark) under new probe names with record: .all, never touching real baselines. Raw pixel-diff counts reproduced the CR-round-2 commit's own numbers exactly (6615 / 1469 differing pixels). Composited each pair over a solid background: over black, diff = 0 pixels for both (the capture path fills fully-transparent regions with black RGB, so this is the correct reconstruction) — a stronger confirmation than the commit's own "alpha ≤7" language, same conclusion: zero color/appearance difference light-vs-dark. The kept clusterCompact_dark (real theme ink) has a genuine 5998px visible diff by contrast — the claim's own control group checks out. All probe files and generated PNGs reverted; worktree left clean.

3. Issue #1022 acceptance criteria, mechanically checked ✅

4. Baseline currency + blank guard ✅

  • Exact (non-sampled) alpha-bbox scan of all 79 PNGs added/changed in main...dd02a55f: zero blank.
  • Flipped SnapshotMode.recordMode to .all in the throwaway worktree and re-recorded BOTH apps' FULL suites (never a --filter subset, per the order-dependent-fixture trap):
    • MinesweeperKit: full suite, 411 tests, 77 benign "Record mode is on" notices, 0 real failures. git status after: zero PNG diffs (only the deliberate SnapshotConfig.swift edit).
    • SudokuKit: the documented pre-existing swiftpm-testing-helper segfault near Settings/Toast NSWindow tests reproduced 3 times (full run, --no-parallel, and skip-narrowed run all eventually crashed at a Settings-adjacent NSWindow test) — consistent with the known issue. Worked around with the sanctioned batching: one large batch skipping the 5 NSWindow/Settings/Toast suites (473 tests, 112 issues = 110 record notices + the 2 known BoardLeaveOrPauseStateTests wall-clock-flake assertions, confirmed passing in isolation) + the 5 excluded suites run individually, crash-free (15+2+10+4+7 = 38 tests, all issues benign record notices). 511 tests total, full functional coverage. git status after: zero PNG diffs (only the deliberate config edit). This is the strongest available evidence every committed baseline currently matches the code.

5. Test counts — match the PR body's claims exactly ✅

  • GameShellKit: swift test → 124/124 passed.
  • MinesweeperKit: full suite → 411/411 (post record-mode revert; the record-mode run above also hit exactly 411 tests).
  • SudokuKit Board|DigitPad|Snapshot|Cluster filter → 126 tests, 2 issues = the same documented BoardLeaveOrPauseStateTests wall-clock flake (confirmed passes in isolation, 7/7) — 126/126 net.
  • swiftlint lint --strict --no-cache on all 15 changed .swift files (direct binary, bypassing the untrusted-.mise.toml gate) → clean, 0 violations.

6. PR body honesty ✅

  • MS 6.0pt shift: verified against the actual diff in 7d303e46 — a Spacer(minLength: 0) removed from VStack(spacing: Self.compactStackGap) where compactStackGap = 12; 12÷2 = 6.0pt centering shift, arithmetic checks out against real code, not just narrative.
  • Mode-toggle reorder: verified against 01c69654's diff — order changed from boardGrid, modeToggle, bannerSlot to boardGrid, bannerSlot, controlCluster, exactly as disclosed.
  • MS sim rows captured at a18d4ada, predating the Spacer removal in 7d303e46: chronologically confirmed via git log --oneline main..dd02a55f (a18d4ad is 3 commits before 7d303e4).
  • IC/RT evidence, ASC-frame blocker (blocker(store): ASC 03-board frames cannot render Liquid Glass — snapshot pipeline is structurally unable to show G4 #1054, open), waived Sudoku live-banner row: all explicitly disclosed in-body with technical detail; no contradiction found against the diff or issue tracker.
  • docs/designs/v3/design.md diff is internally consistent with every correction claimed in the PR body (cell-size table correction, MS-no-undo, G3 deferral, snapshot-blind-to-glass note, two-containers-not-one correction) — no drift found.

No fabricated or unverifiable claims found in this pass. Recommend merge.

🤖 T6 acceptance by Claude Opus 5

@wei18

wei18 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

T6 ACCEPT (carried forward to 13c7a77) — correction to my own review above, plus head-move verification.

Correction to §6 of my prior comment. My statement that the "MS 6.0pt shift" checked out "against real code, not just narrative" was true only in a narrow, misleading sense: the arithmetic (Spacer removed from VStack(spacing: 12), 12÷2=6.0) was internally consistent, but I verified it against the wrong baseline — the intermediate commit 01c69654, not main. Checked properly (main vs dd02a55f): main has exactly one Spacer(minLength: 0) in the Mac rail stack (VStack(spacing: railContentGap)), none in the compact stack; 01c69654 briefly added a second one to the compact stack; 7d303e46 (CR round 1) removed it again. Net Spacer count and position in the compact stack is unchanged from main — the 6.0pt figure describes a delta between two commits inside this PR's own history, not anything a user or future reader of main would ever see. This was caught by the acceptance lead, not by me; I should have diffed against main rather than accepting the PR's own intermediate-commit framing. It's a good example of exactly the failure mode this PR's own "measured, not asserted" section exists to guard against.

Head-move verification. git diff dd02a55f 13c7a773 --stat — one file, MinesweeperBoardView.swift, +7/−3, and the diff is comment-only (a .swift comment correcting the same false premise above — the old comment said "No Spacer here" in a way that presupposed one had been removed from that stack on main, which never happened). No production logic, test, or baseline changed. The current PR body (as of 13c7a773) already carries the correction accurately, cross-checked against the diff:

  • "Minesweeper's compact stack has NO net Spacer change, and the board does not move relative to main" — confirmed.
  • The evidence-provenance note on the sim-table caveat (rows captured at a18d4ada, between the PR's own add-then-remove of the compact-stack Spacer) — confirmed chronologically and consistent with the corrected framing.
  • No other body claim (behaviour-changes list, baseline attribution) is anchored to the retracted premise — checked, the mode-toggle reorder, Sudoku's .frame(maxHeight: .infinity) + .layoutPriority(1), and MS Reveal's neutral-glass restyle are each independently real changes vs main, not attributed to the phantom Spacer.

Since the only delta since dd02a55f is this comment-only fix, everything else verified in my prior comment (mutation-tested assertions, deleted-coverage audit, #1022 acceptance criteria, baseline currency via full .all re-record on both apps, test counts 124/411/126, swiftlint --strict) carries forward unchanged to 13c7a773.

Net verdict unchanged: ACCEPT.

🤖 T6 acceptance by Claude Opus 5

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.

feat(board): full-bleed board + G4 two-group floating glass control cluster

1 participant