Skip to content

fix(rq-kgtp): Dots laid out beside the words stay clear of them after the words scroll - #1110

Merged
rmstdope merged 2 commits into
mainfrom
rq-kgtp-dots-laid-out-beside-the-words-stay
Nov 12, 2026
Merged

rmstdope merged 2 commits into
mainfrom
rq-kgtp-dots-laid-out-beside-the-words-stay

Conversation

@rmstdope

Copy link
Copy Markdown
Owner

Fixes bead rq-kgtp: with Showing on, scrolling the words left dots under cards.

The bug

AreaNames steps a dot clear of the cards and spoken lines whenever it measures them. It measured on mount, on a resize, and when relayout/showing changed, but never when the story scrolled. A scroll could therefore carry a card over a stepped dot (Shelves and Hearth in Elior's Cottage), and a press on the dot hit the words.

The fix

AreaNames.vue listens for scroll in the capture phase on the scope it measures (.lq-main, else the stage) and measures again once per animation frame. It removes the listener and cancels a pending frame on unmount.

Reproduction

AreaNames.test.ts, covered things (rq-qz71) › steps a dot clear of the words again when the story scrolls them over it (rq-kgtp): the card moves over the stepped dot and a scroll fires on .lq-story. Before the fix the dot stayed inside the card; it now steps clear again.

Validation

Fast gate green locally: eslint, prettier --check, vue-tsc, npm run test (514 files, 6971 tests). No deviations; a bug bead has no plan, so the reproduction test is the plan.

Formatting constraints verified

🤖 Generated with Claude Code

https://claude.ai/code/session_01WCDKf2sgVNR7sEgxh9yNgE

… the words scroll

AreaNames measured the cards only on mount, resize and relayout, so a
scrolled story could move a card over a dot stepped clear of it. It now
listens for scroll in the capture phase on its scope and measures again
once a frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCDKf2sgVNR7sEgxh9yNgE
@rmstdope

Copy link
Copy Markdown
Owner Author

Review (cold read, reviewed_head: e71686d66a92f720dcd3f42ccd8e8c27279b9058). Reviewed before merge under the producer's review practice, by an agent given the diff and the bead, and not the producer's reasoning. A bug bead has no plan, so the diff was read against the bead's bug claim and the reproduction test.

The fix addresses the cause the bead names. The reviewer confirmed in LanternLayout.vue that the stage and .lq-story both sit inside .lq-main, and that the new test fails against the old AreaNames.vue.

  1. Test strength. AreaNames.test.ts, the rq-kgtp test. The test has no .lq-main and puts the story inside the stage, so it only exercises the ?? el fallback. scrolled = el would pass the test while the bug returned in the game. Suggestion: put the story outside the stage, under a shared .lq-main.
  2. Performance, a question. AreaNames.vue onScroll. It re-measures every card on every scroll in .lq-main, even with Showing off. Either guard on showing, or say in the doc comment why the measure is needed.
  3. Determinism, minor. The test waits a real 50 ms for jsdom's rAF. Stubbing rAF would make it exact. Optional.

Answers review findings 1-3: the test puts the story outside the stage
under .lq-main, as the layout does, and stubs requestAnimationFrame; the
scroll handler says why it measures while not showing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCDKf2sgVNR7sEgxh9yNgE
@rmstdope

Copy link
Copy Markdown
Owner Author

Answers to the review, at 7caf8be8f49d5827d47a368488f2d69d0caf782e:

  1. Fixed. The test now mounts the stage in a .lq-main and moves the story wrap out of the stage, so it sits beside the stage as in LanternLayout. I checked it against the named mutation: with scrolled = el, the test fails.
  2. No change; documented. Pointed and focused names do need the measure while Showing is off. A focused thing's dot is stepped clear of the words then too (see the existing test 'shows a focused covered thing's dot and name at the stepped spot while not showing'), so a showing guard would bring the bug back for keyboard focus. The handler's doc comment now says so. The work is capped at one measure per frame.
  3. Fixed. The test stubs requestAnimationFrame to run at once and no longer waits on real time.

No follow-up review: these are test-only changes plus a doc comment, and none of them changes behaviour.

@rmstdope
rmstdope merged commit 153fe05 into main Nov 12, 2026
7 checks passed
@rmstdope
rmstdope deleted the rq-kgtp-dots-laid-out-beside-the-words-stay branch November 12, 2026 00:25
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