fix(hl): biggest day marker always from displayed series - #548
Merged
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Flotapponnier added a commit
that referenced
this pull request
Jun 19, 2026
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 freeto 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.
Bug: on /products/, the BIGGEST DAY marker landed one or two bars to the left of the visually tallest bar after a new high day rolled in.
Root cause: race between two data sources. The page server-renders biggest_day_unix from a Prom scalar cached for the ISR window (60-300s) while the chart fetches /api/builder//daily-series at hydration and gets the fresh JSON straight from the harness. When a new biggest day rolls in between those two reads, the server prop points at the previous biggest (still in the series but no longer max), so the marker misses the tallest bar.
Fix: derive biggest day directly from the displayed series (same source as the bars themselves). Keep the server prop only as a cold-start fallback when the entire series is zero (very rare, brand new builder).
Verified on /products/fomo (currently shows biggest day = 17/06 = $29.3K, the actual tallest bar). Same logic applies to every Hyperliquid frontend dashboard.