Skip to content

[#936] Redesign airdrop hero + chart as combined section#937

Merged
realproject7 merged 4 commits intomainfrom
task/936-hero-chart-redesign
Apr 22, 2026
Merged

[#936] Redesign airdrop hero + chart as combined section#937
realproject7 merged 4 commits intomainfrom
task/936-hero-chart-redesign

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Combined hero and chart into one cohesive CampaignHero section with live d:h:m:s countdown, expanded campaign explanation, lock-up proof link, and a 6-month SVG timeline chart
  • Chart renders 3 lines: actual FDV (solid), linear projection to Diamond (dashed), and pool value step line (filled area), with milestone markers and heartbeat-animated current position dot
  • Added /api/airdrop/daily-prices endpoint serving historical FDV data from pl_daily_prices for the timeline chart; removed standalone MilestoneTrack from sidebar

Fixes #936

Test plan

  • Verify hero section renders with title, expanded explanation, countdown, stats row
  • Confirm countdown updates live every second (d:h:m:s format)
  • Check lock-up proof link shows "pending" when no LOCKER_ID, clickable link when set
  • Verify chart renders 6-month x-axis with M1–M7 labels
  • Confirm 3 chart lines: actual FDV (solid dark), linear projection (dashed), pool value (brown filled)
  • Check 4 milestone markers (🥉🥈🥇💎) with horizontal dashed lines
  • Verify heartbeat-animated dot pulses at current FDV position
  • Confirm current FDV, zone label, and pool value display below chart
  • Test pool value calculation: $0 below Bronze, correct % at each tier
  • Verify /api/airdrop/daily-prices returns date + fdv array
  • Check MilestoneTrack no longer appears in sidebar
  • Test responsive on mobile (min-width 320px chart)

🤖 Generated with Claude Code

- Combined CampaignHero and chart into one cohesive section
- Live countdown (d:h:m:s) updating every second
- Expanded explanation (5% supply, milestone-based, burn)
- Lock-up proof link (placeholder when LOCKER_ID not set)
- 6-month timeline chart with 3 lines: actual FDV, linear projection, pool value
- Milestone markers (Bronze/Silver/Gold/Diamond) with emojis
- Heartbeat-animated dot on current FDV position
- Current FDV + zone + pool value displayed below chart
- Correct pool value calculation per tier
- New /api/airdrop/daily-prices endpoint for historical FDV data
- Removed standalone MilestoneTrack from sidebar

Fixes #936

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 7:08am

Request Review

…icks

- Linear projection now starts from current time (nowX) instead of chart start
- Removed yRightTicks labels that overlapped with milestone emoji labels

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: REQUEST CHANGES

Summary

The combined hero/chart is directionally right, but the chart logic hard-codes the production FDV thresholds and max target instead of using the active airdrop config. That breaks the existing NEXT_PUBLIC_AIRDROP_MODE=test path and makes the milestone lines, pool-value math, current zone label, and projection incorrect outside prod.

Findings

  • [high] Chart math ignores the active campaign milestone configuration
    • File: src/components/airdrop/CampaignHero.tsx:35
    • Suggestion: Stop hard-coding TIERS, DIAMOND_FDV, and the pool/zone thresholds. Use the milestone values already returned by /api/airdrop/status (or a shared config source) so prod and test mode render the same logic.
  • [medium] Pool area starts from the first DB row even when that row predates the campaign window
    • File: src/components/airdrop/CampaignHero.tsx:216
    • Suggestion: Derive firstX from the first in-range daily price, not dailyPrices[0], so the filled area cannot start left of the chart when historical rows exist before campaignStart.

Decision

Requesting changes because the first issue is a behavior regression in a supported mode, not just a visual polish item.

- Derive tier thresholds from API milestones (respects test/prod config)
- poolValueAtFdv/currentZoneLabel now accept tiers parameter
- Clamp pool area fill start to campaignStart (fixes pre-campaign data)
- Remove hardcoded DIAMOND_FDV constant

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: REQUEST CHANGES

Summary

The first two issues are fixed, but the chart still keeps one production-only constant in its FDV scaling. That means the visualized timeline is still wrong in NEXT_PUBLIC_AIRDROP_MODE=test.

Findings

  • [high] FDV chart scale is still hard-coded to the prod ceiling
    • File: src/components/airdrop/CampaignHero.tsx:140
    • Suggestion: derive the FDV axis max from the active milestone set (for example from the Diamond tier, with a small headroom factor) and pass it into fdvToY, instead of hard-coding 200_000_000. With the current code, test-mode milestones like $7k/$10k/$35k/$50k all collapse near the chart bottom and the chart no longer reflects the configured campaign.

Decision

Keeping this in request-changes because the issue is a functional regression in the supported test configuration, not just a styling preference.

- fdvToY now accepts logMax param derived from diamond FDV (2x headroom)
- Removes last hardcoded prod value (FDV_LOG_MAX=200M)
- Test mode milestones now render correctly across the chart

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 fixes are in place. The chart now derives milestone math and FDV scaling from the active campaign config, and the area fill is clamped to the campaign window.

Findings

  • None.

Decision

Approving because the prior blocking issues were resolved and the required checks are now passing.

@realproject7 realproject7 merged commit 682dbda 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] Redesign hero + chart as combined section with live countdown and 3-line chart

2 participants