Repository navigation
test(sudoku): lock pencil-notes positional 3x3 mini-grid with a snapshot - #778
Merged
Merged
Conversation
#716 (from #688 item 4 / audit-sud-13) claimed pencil notes render as a top-left vertical list and asked for the positional 3x3 convention. Verification against current main shows the premise is stale: the only notes renderer in the app (PencilNotesGrid in BoardCellView.swift, sole call site BoardView+Highlighting.swift) has rendered digit N in its own quadrant (row (N-1)/3, column (N-1)%3) since its introduction in 99f38ea, and the NotesGrid bit convention (bits 1..9) matches on both write and read sides. Rendered proof: the new committed baseline shows {1,5,9} as the main diagonal, {2,4,6,8} as the four edge midpoints, 1...9 as the full grid, and {3,7} as opposite corners. The gap that let the audit claim go unchallenged was zero snapshot coverage of notes rendering (every existing fixture passes noteMask: 0). This adds the missing coverage as a regression lock. The test lives in its own file because BoardViewTests.swift sits at the SwiftLint file_length ceiling (422 > 400 with the test inlined). Verification: first run records the baseline, second run passes against it; BoardViewTests still 18/18; swiftlint --strict 0 violations on both test files; baseline PNG eyeballed (positional mini-grid patterns confirmed, not a list). Closes #716 Co-Authored-By: Claude Fable 5 <[email protected]>
wei18
enabled auto-merge (squash)
July 11, 2026 10:03
This was referenced Jul 11, 2026
wei18
added a commit
that referenced
this pull request
Jul 11, 2026
…722) (#782) Timeline log for the five-issue wave: cross-app coordinate a11y l10n (#755/PR #776), Sudoku state-suffix l10n (#771/PR #777), the #716 premise refutation + pencil-notes snapshot regression lock (PR #778), MS practice personal bests via seed-derived ids (#705/PR #779), and Sudoku digit-first input (#722/PR #781). Records the three pre-push review catches, the seed-reuse design decision, and process notes (haiku numeric spot-checks, reviewer send-report instruction, filtered-batch verification). Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Triage of #716 (from #688 item 4 / audit-sud-13) found the premise stale: Sudoku pencil notes do NOT render as a top-left vertical list. The only notes renderer in the repo (
PencilNotesGrid, BoardCellView.swift, sole call site BoardView+Highlighting.swift) has rendered the conventional positional 3×3 mini-grid — digit N fixed in quadrant (N-1)/3,(N-1)%3, blanks preserved — since its introduction in 99f38ea, never modified since.NotesGridbit conventions (bits 1..9) match on write and read.What let the audit claim survive was zero snapshot coverage of notes rendering (every existing board fixture passes
noteMask: 0). This PR adds that missing coverage as a regression lock — no production code changes:BoardViewPencilNotesTestsrenders the full production path (BoardView → cell() → BoardCellView → PencilNotesGrid) with visually diagnostic patterns: {1,5,9} main diagonal · {2,4,6,8} edge midpoints · 1–9 full grid · {3,7} opposite cornersVerification
BoardViewTestsstill 18/18;swiftlint --strict0 violationsCloses #716
🤖 Generated with Claude Code