Skip to content

fix(rq-cm21): A stepped dot kept apart from its neighbour never slides into the words - #1109

Merged
rmstdope merged 3 commits into
mainfrom
rq-cm21-a-stepped-dot-kept-apart-from-its
Nov 11, 2026
Merged

rmstdope merged 3 commits into
mainfrom
rq-cm21-a-stepped-dot-kept-apart-from-its

Conversation

@rmstdope

Copy link
Copy Markdown
Owner

Bead: rq-cm21 (bugfix).

Bug: keepMarksApart judged a spot a dot slides to by its middle alone, so Books (giving way to Shelves in Elior's Cottage, words open) landed with its right half under the short spoken line and a press on its centre did nothing.

Fix: a spot a mark slides to must keep its whole dot (MARK_RADIUS from its middle) off the words. The spot a mark already stands on is judged as before, so unblocked marks do not move.

Reproduction test: areaNames.test.ts › keepMarksApart › never slides a stepped mark so its dot lies half under the words beside it (red before: dot middle 1px from the words; green after).

Validation: fast gate green (eslint, prettier, vue-tsc, vitest 6968 tests).

Formatting constraints verified.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WCDKeye47AT4ZyGRvKH933

rmstdope and others added 2 commits November 11, 2026 23:47
…s into the words

keepMarksApart checked only a slid dot's middle against the cards and
spoken lines, so a dot could land half under a line. A spot a mark
slides to now keeps the whole dot off the words.

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

Navigator's answer to review finding 1: rather than jump across the
spoken line, a slid mark whose slide reaches the words moves on to the
next row, beside its neighbour. The test now asserts the full 8px.

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

Copy link
Copy Markdown
Owner Author

Review (cold read, reviewed_head: 71a79e30ae0cca42fc96c2e5c75b2d11b1c2c072) — 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: the diff was read against the bead's bug claim and the reproduction test.)

  1. web/src/lantern/areaNames.ts — user-facing side effect (not a defect against the bead): with the words blocking Books' slide to the right, Books goes elsewhere on its row, either reversing the order of Shelves and Books or far from its thing, while a clear spot one row up (155, 86 in the test) loses only because the search tries the whole row first. For the navigator to decide.
  2. web/src/lantern/areaNames.test.ts, 'never slides a stepped mark so its dot lies half under the words beside it' — the test asserts 6px while the code keeps 8px (MARK_RADIUS); asserting 8 fits the code better. The sideways-stepped and standing-on-thing cases are untested (suggestion).
  3. web/src/lantern/areaNames.ts, keepMarksApart doc comment — one over-long line in the edited paragraph; reflow it.

@rmstdope

Copy link
Copy Markdown
Owner Author

Answers to the review (fixes in 240a884d)

  1. Measured: at 71a79e30 Books actually landed at x 347, across the whole spoken line (in the cottage that would be ~500px from its thing), not at 107. Put to the navigator, who chose "Row above": when a slide reaches the words it ends, and the mark gives way one row further out, beside its neighbour. Done in keepMarksApart; new test 'gives way one row further out, beside its neighbour, when the words end its slide' pins Books at (155, 134), right of Shelves.
  2. The test now asserts the full 8px. The sideways-off-a-panel and standing-on-its-thing cases go through the same touchesWords check on the same search loop; I left them without their own tests to keep the fix small.
  3. Reflowed.

… on the other side

Delta review: the words ending a slide left two dots stacked when no row
lay further out. The other side is now tried in a second pass, never
across the words; a level spot touching the words no longer ends the
row. The row test now matches the cottage (stepped up, row above).

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

Copy link
Copy Markdown
Owner Author

Review (follow-up delta, 71a79e30..240a884d) — reviewed before merge under the producer's review practice, by an agent given the diff, the bead, and the previous round's findings and answers, not the producer's reasoning.

  1. areaNames.ts, keepMarksApart: when no row lies further out (marks at the foot), the words-end rule skips the other side of the row, so Books keeps its spot 5px from Shelves: two stacked dots. Needs a fallback and a test (blocking).
  2. areaNames.ts / test 'gives way one row further out…': the navigator chose "Row above"; the test puts Books at (155, 134), one row down, because its things lie above. Confirm the spot matches the choice.
  3. areaNames.ts, the lift loop: a level spot that touches the words ends the row before the own-line spot at the same step is tried (suggestion).
  4. areaNames.ts doc comment: one line still 120 characters (minor).
  5. areaNames.test.ts: the rule applies to sideways and standing marks too; only the bug's case is tested. Finding 1's input should become a test (suggestion).

@rmstdope

Copy link
Copy Markdown
Owner Author

Answers to the follow-up review (fixes in the head after 240a884d)

  1. Fixed. The search now runs twice: first the words end a slide and send the mark to the next row further out; only when no row has a spot is the other side of the row tried as well, still never across the words. New test 'gives way to the other side of its neighbour when the words end its slide and no row lies further out' uses your foot input; Books lands left of Shelves on its own row.
  2. The navigator's option read "try one row (24px) further from where it came, beside Shelves". In the cottage both dots stepped up off their things, so further out is the row above. The test now matches that geometry (things below at y 160) and pins Books at (155, 86), the row above, right of Shelves.
  3. Fixed: only the mark's own-line spot ends the row; a level spot touching the words is just not free.
  4. Fixed; the edited paragraph is reflowed. (Line 348, the MARK_APART one-liner, predates this PR.)
  5. Finding 1's input is now a test. No separate sideways test: the sideways path runs the same two-pass search, and your probes of it gave sensible results.

@rmstdope

Copy link
Copy Markdown
Owner Author

Review (follow-up delta, 240a884d..6cd98478) — reviewed before merge under the producer's review practice, by an agent given the diff, the bead, and the previous round's findings and answers, not the producer's reasoning.

All five previous answers checked against the code and confirmed (the foot test fails on 240a884d, passes now; Books lands at (155, 86) in the cottage layout). Nothing in this delta blocks the merge.

  1. Non-blocking and older than this PR: at the foot with the words on both sides (x 0–120 and 180–330), a mark can still keep its spot 5px from its neighbour, because the 24px steps from where it started miss the one free x (169). That is the documented "keeps where it is" rule, unchanged by this PR; a tight layout outside the bead's claim.

@rmstdope

Copy link
Copy Markdown
Owner Author

Answer to the third review

  1. Not changed here: the behaviour is the documented fallback of keepMarksApart and predates this PR, and the bead's claim is the cottage case. Left out of scope; no bead filed, since nothing in a real room shows it yet.

@rmstdope
rmstdope merged commit da85a0b into main Nov 11, 2026
7 checks passed
@rmstdope
rmstdope deleted the rq-cm21-a-stepped-dot-kept-apart-from-its branch November 11, 2026 23:22
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