artifact: fix the-draft-race (speedup readout overlapped throughput/caption) - #168
Merged
Conversation
The detail panel is hidden by `.ef-panel-detail { display: none }`, but
showDetail() revealed it with `style.display = ''`. An empty string clears
the inline style, so the element fell back to the class rule and stayed
hidden — and since the default panel is also hidden on select, the whole
panel went blank. Set an explicit `display: 'block'` to override the rule.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THWkDxQzDdyiEbzyRP5NF3
…aption) The bottom readout drew the big speedup number, the AR/SD throughput counters, and the "speedup" caption all anchored to the same Y (spY = H * 0.88), so the number overprinted the counters horizontally and shared their baseline. On the ~200px mobile stage the band also collided with the SD lane. Reserve a fixed band at the bottom of the canvas, fit the lanes into the space above it, and stack the readout into three distinct rows (throughput / number / caption) with fonts scaled to the band so it holds from mobile inline up to a wide desktop stage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01THWkDxQzDdyiEbzyRP5NF3
blokzdev
enabled auto-merge (squash)
June 24, 2026 04:31
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
In the
the-draft-raceartifact (THE DRAFT RACE), the bottom "readout" of the race chart was unreadable: the big centered speedup number (e.g.2.40×) rendered directly on top of the live throughput counters (AR 5.8 tok/SD 13.9 tok) and thespeedupcaption. Reported from mobile inline; reproduced in fullscreen on both mobile and desktop.2.40×overprintstok/SD, all three text layers stacked on one baselineRoot cause
In
src/islands/artifacts/the-draft-race.ts, the readout block anchored all three text elements to the same Y,spY = H * 0.88:textBaseline:'middle', font 22–36px, centered atcx, spY;cx ± 18, spY;The number is far wider than the 18px flank gap, so it overprinted the counters horizontally and shared their baseline vertically. Compounding it, the lanes used fixed full-height fractions (
LANE_Y2 = H*0.62,LANE_Hup to 56), so on the ~200px-tall mobile stage (stageAspect:'3/2') the readout band also collided with the SD lane — three ~24px rows could not fit in the ~21px left below the lanes.Fix
All changes are inside
draw()— no API / manifest / layout-primitive changes:clamp(46, 76, H*0.27)for the readout, and fit the two lanes into the space above it (LANE_Y1/LANE_Y2/LANE_Hrecomputed againstlaneZone).drawTokenand the lane/label/phase-label code take these as inputs, so they follow automatically.spYanchor is gone.Scope
Not systemic — a survey of all canvas artifacts found only this one had the bug; the other three (
attention-lens,dispute-bisection,falsifier-gate) already reserve space, and the DOM/SVG artifacts position via percentages/viewBox/transforms.Verification
npm run check && npm run buildpass.AR … / SD …, thenN.NN×, thenspeedup) with no overlap between them or with the SD lane /VERIFYING/ phase label; holds across slider ranges and from mobile width (~320px) to wide desktop, inline and fullscreen.🤖 Generated with Claude Code
Generated by Claude Code