Skip to content

fix: highlight given diagonal cell's note on the piano keyboard when clicked - #129

Merged
privera-git merged 1 commit into
mainfrom
fix/given-cell-keyboard-highlight
Jul 13, 2026
Merged

privera-git merged 1 commit into
mainfrom
fix/given-cell-keyboard-highlight

Conversation

@privera-git

Copy link
Copy Markdown
Owner

Summary

  • MatrixGrid.vue's handleClick short-circuited for given cells before ever emitting cell-click, so PlayingView never tracked them as the active cell.
  • PlayingView.vue's activeCellNote getter only read the player-answers grid, which is permanently null for given cells (submitAnswer rejects writes to them) — added the same isGiven fallback to puzzle.cells[row][col].note that displayCells already uses.

Test plan

  • Inverted the existing MatrixGrid.spec.ts test that codified the bug (does not emit cell-click when a given cell is clicked → now asserts it does)
  • Added 2 new PlayingView.spec.ts tests: active-cell selection and piano keyboard highlight for a given cell
  • npm run lint
  • npm run test:unit -- --run (482 tests pass)
  • npm run build

Fixes #120

…clicked

handleClick short-circuited for given cells before emitting cell-click, so
PlayingView never tracked them as the active cell. Even if it had,
activeCellNote only read from the player-answers grid, which is always null
for given cells since submitAnswer rejects writes to them.

Fixes #120
@privera-git
privera-git merged commit 99b05dc into main Jul 13, 2026
2 checks passed
@privera-git
privera-git deleted the fix/given-cell-keyboard-highlight branch July 13, 2026 02:57
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: highlight given diagonal cell's note on the piano keyboard when clicked

1 participant