Skip to content

test(price-chart): pin the tooltip to the day that is drawn - #15

Merged
frahlg merged 1 commit into
mainfrom
tooltip-reads-the-drawn-day
Aug 6, 2026
Merged

test(price-chart): pin the tooltip to the day that is drawn#15
frahlg merged 1 commit into
mainfrom
tooltip-reads-the-drawn-day

Conversation

@frahlg

@frahlg frahlg commented Aug 6, 2026

Copy link
Copy Markdown
Member

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

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>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp 261b6d8 Aug 06 2026, 12:38 PM

@frahlg
frahlg merged commit 708b922 into main Aug 6, 2026
2 checks passed
@frahlg
frahlg deleted the tooltip-reads-the-drawn-day branch August 6, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant