Skip to content

[#938] Fix chart: empty state, projection, mobile overflow#941

Merged
realproject7 merged 2 commits intomainfrom
task/938-chart-fixes
Apr 22, 2026
Merged

[#938] Fix chart: empty state, projection, mobile overflow#941
realproject7 merged 2 commits intomainfrom
task/938-chart-fixes

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Chart now shows current FDV point and pool value line even with no daily price history (empty pl_daily_prices), so the chart never looks empty
  • Heartbeat dot always visible at current FDV position regardless of historical data
  • Removed minWidth: 320 that caused horizontal scroll on mobile; axis labels and Y-left ticks hidden on small screens via Tailwind responsive classes

Fixes #938

Test plan

  • Verify chart shows current FDV dot + $0 pool line with no daily price data
  • Confirm heartbeat dot pulses at current FDV even without history
  • Check projection line starts from current time/FDV position
  • Test on mobile viewport — no horizontal scroll
  • Verify axis labels hidden on small screens, visible on desktop
  • With daily price data present, chart renders all 3 lines as before

🤖 Generated with Claude Code

- Show current FDV point and $0 pool line when no daily price history
- Heartbeat dot always visible at current FDV position
- Pool value line renders flat $0 pre-Bronze or stepped if in a tier
- Remove minWidth:320 to let SVG scale freely on mobile
- Hide axis labels and Y-left ticks on mobile (< 640px)

Fixes #938

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 22, 2026 9:13am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The empty-state changes are close, but there is still a correctness bug in the timeline positioning before the campaign starts.

Findings

  • [high] Empty-state current point can render left of the chart before campaign start
    • File: src/components/airdrop/CampaignHero.tsx:183
    • Suggestion: clamp the time used for nowX to the campaign window on both ends, not just the upper bound. Right now timeToX(Math.min(nowMs, endMs), ...) allows dates before campaignStart, so before kickoff the synthesized point/heartbeat/pool path can be drawn left of PAD.left and partially disappear. Use something like Math.max(startMs, Math.min(nowMs, endMs)).

Decision

Requesting changes because the new acceptance criterion says the chart should still show the current state even before there is daily history, and this case still breaks before the campaign window begins.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The requested timeline clamp fix is in place, and the empty-state/mobile chart updates now satisfy the issue requirements.

Findings

  • None.

Decision

Approving because the prior blocking issue was resolved and the required checks are now passing.

@realproject7 realproject7 merged commit 5605510 into main Apr 22, 2026
4 checks passed
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.

[Airdrop] Fix chart: missing lines, incorrect projection, mobile responsiveness

2 participants