test(price-chart): pin the tooltip to the day that is drawn - #15
Merged
Conversation
Found by Fredrik scrubbing the chart on his phone. The bars come from the filtered horizon; the tooltip looked its slot up in every slot the box sent. Both days start at midnight, so with TOMORROW showing it printed the right clock time over the wrong day's price — a bar at the top of a 96 öre axis read "9.00 öre". Fixed upstream in srcfl/ftw#839 and re-vendored. The behavioural test lives here because this side has a DOM: two days, one cheap and one dear, so a mix-up shows up as an order of magnitude rather than a rounding difference. Reverting the fix makes it report today's price over tomorrow's bar. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | 261b6d8 | Aug 06 2026, 12:38 PM |
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.
Re-vendors the fix from srcfl/ftw#839 and adds the behavioural test, which lives on this side because this side has a DOM.
Fredrik, scrubbing the chart on his phone: "när jag scrollar med tummen över på de olika så ser det inte alls ut att stämma". A bar at the top of a 96 öre axis read 9.00 öre under his thumb.
The bars are drawn from the filtered horizon; the tooltip resolved its slot against every slot the box had sent. Both days start at midnight, so the clock time printed correctly over the wrong day's price.
The test uses two days that cannot be confused — today cheap, tomorrow dear — so a mix-up shows as an order of magnitude rather than a rounding difference. Reverting the fix:
the tooltip said "7.00 öre" over a bar drawn from tomorrow.🤖 Generated with Claude Code