fix: show the crossing animation only on racing pages - #132
Merged
Conversation
TheAngryRaven
force-pushed
the
claude/crossing-overlay-race-pages
branch
from
August 5, 2026 00:25
7112d60 to
2fb961d
Compare
Coverage — host-testable units📂 Overall coverage
📄 File coverage
|
Reported from the bench: setting a course-creator point while parked near an existing timing line showed the crossing flags over the creator screen. The overlay was gated by a BLOCKLIST — six pages it must not draw over — which meant it drew over everything else by default. That list never grew as pages were added, so the camera pages, the replay browser, the transfer menus, the main menu and (newest) the course creator all inherited it. And the trigger is not rare: the crossing zone reads true while STATIONARY inside it, which is precisely the state of someone standing at a timing line using the device. Inverted to a positive test. The running rotation is a contiguous id block, so "is this a racing page" is a range check; the two diagnostic pages at the bottom and the stop-logging page at the top stay excluded exactly as before, and everything outside the block — negative menu ids, the 90+ confirm/warning/fault pages, the 900+ boot pages — is now excluded by construction rather than by remembering to list it. Strictly more restrictive than the old condition on every input. The new golden fixture parks on the OKC start/finish line with the track detected and locks that the menu still renders as a menu. It is NOT a regression test for this bug and says so: a true crossing flag needs an ARMED timer, and OKC ships eight courses so CourseDetector never locks one without driving a real lap. Confirmed by restoring the old blocklist — the fixture does not budge. The gate itself is argued from the page-id ranges. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESkRRtF4vRrANPL6huSgmD
TheAngryRaven
force-pushed
the
claude/crossing-overlay-race-pages
branch
from
August 5, 2026 04:34
2fb961d to
e8d9a5b
Compare
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.
Summary
Reported from the bench: setting a course-creator point while parked near an existing timing line showed the crossing flags over the creator screen.
The overlay was gated by a blocklist — six pages it must not draw over — which means it drew over everything else by default, and that list never grew as pages were added:
So the camera pages, the replay browser, the transfer menus, the main menu and (newest) the course creator all inherited it. This is not a rare trigger either: the crossing zone reads true while stationary inside it, which is exactly the state of someone standing at a timing line using the device.
Inverted to a positive test. The running rotation is a contiguous id block (
GPS_DEBUG…LOGGING_STOP, seeBirdsEye.ino), so "is this a racing page" is a range check:The two diagnostic pages at the bottom and the stop-logging page at the top stay excluded exactly as before; everything outside the block — negative menu ids, the 90+ confirm/warning/fault pages, the 900+ boot pages — is now excluded by construction rather than by remembering to list it. Strictly more restrictive than the old condition on every input, so no racing page loses the animation.
Type of change
How it was verified
clang-tidyclean — not run locally (CI covers it)arduino-clihereChecklist
CHANGELOG.mdupdated under[Unreleased]ARCHITECTURE.md/CLAUDE.md— no interface change; the overlay's behaviour is described only by the code comment, which is rewrittenNotes for reviewers
Read this before trusting the new fixture.
main_menu_parked_on_lineparks on the OKC start/finish line with the track detected and locks that the menu still renders as a menu (its hash is identical tomain_menu_race). It is not a regression test for this bug, and the comment in the fixture says so.I tried to make it one and it doesn't work: reaching a true crossing flag needs an armed timer, and the sim's bundled OKC track ships eight courses, so
CourseDetectornever locks one without driving a real lap. I confirmed this by restoring the old blocklist and re-running — the fixture does not budge. Shipping it while implying it covers the bug would repeat the exact failure mode we just hit in the web app, where a test asserted the broken behaviour and thereby protected it.So the gate is argued from the page-id ranges rather than proven by test. The argument is small enough to check by hand: every id the old condition admitted and the new one rejects is a non-racing page, and no id in
(GPS_STATS, LOGGING_STOP)changed status.A real regression test wants a single-course track in the sim assets so detection locks immediately, or a hook to arm the timer directly. Worth doing, bigger than this fix.
Related issues
Third bug from the same bench session, alongside #131 (auto-race hijacking the menu) and the web-app sync/render fixes. Found via the course creator in #128 but entirely pre-existing, which is why it targets
BETAon its own.Generated by Claude Code