Marshaling: current-run scoring + dual-adapter crash + topmost drag handles#350
Merged
Conversation
…g handles
Three fixes from live tune-detection testing (2026-07-03):
- CURRENT-RUN SCORING: heat_window_offsets now folds everything except the
heat-loop events from the heat's current run (live_state::current_run_start
— the latest Running / past the latest Abort/Restart, the same rule the
live standings already used). A Restarted-and-re-raced heat scored BOTH
runs' passes — the abandoned ghost run out-ranked the real one and the
same pilot held two positions. Pre-restart rulings drop with their run;
post-restart rulings apply.
- DUAL-ADAPTER CRASH: the same competitor ref can hold two lap-list entries
(one per adapter — mid-heat source failover, or historic mixed-source
debris). Bare-ref {#each} keys collided and crashed the whole Marshaling
screen (svelte each_key_duplicate) — the 'can't slide anything anymore'
report. Lap sections key by the full adapter/ref key, the competitors
list dedups, and the tune diff flattens laps across a pilot's entries.
- TOPMOST HANDLES: the graph's threshold drag handles rendered BEFORE the
signal line and lap/preview markers, so a lap-dense pilot's markers sat
on top and ate the pointer — dead handles on exactly the pilots with the
most laps. Handles now paint last (topmost); the threshold lines stay in
the background layer.
Verified end-to-end in a real browser against the live rig's polluted heat:
drag → switch pilot → drag → return → drag all work, zero page errors.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Three fixes from live tune-detection testing (the 'can't slide thresholds after switching pilots' report). Root-caused in a real browser against the rig's actual heat data — the report unfolded into three distinct defects:
heat_window_offsetsfolded every pass the heat ever saw across Aborts/Restarts — the abandoned ghost run out-ranked the real one (observed live: one pilot holding positions 1 AND 2 with 39 ghost laps). The window now folds from the heat's current run (current_run_start, the exact rule the live standings adopted in June); pre-restart rulings drop with their run, post-restart rulings apply. Regression test included.{#each}keys and hard-crashed the whole Marshaling screen (each_key_duplicate). Full-key keying + deduped picker list + the tune diff flattens a pilot's entries. Crash-repro test included.Gates: 37 Rust suites (incl. the new restart-rescore test), 526 console tests, both check passes, lint, contract 90/90.
🤖 Generated with Claude Code