Skip to content

[#948] Fix FDV mismatch and chart projection/mobile#951

Merged
realproject7 merged 2 commits intomainfrom
task/948-fdv-chart-fix
Apr 23, 2026
Merged

[#948] Fix FDV mismatch and chart projection/mobile#951
realproject7 merged 2 commits intomainfrom
task/948-fdv-chart-fix

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Fixes #948

  • FDV mismatch: getPlotUsdPrice() now prefers Mint Club SDK (on-chain read, same source as /token page) instead of Promise.any() racing all three sources. API aggregators are fallback-only.
  • Chart projection: Linear projection line now starts from campaign start date with starting FDV, representing "constant linear growth from day 1 to hit Diamond." Previously started from current date.
  • Mobile readability: Screens < 640px now show a simplified milestone progress view (current FDV, progress bar, tier list, linear target today) instead of the unreadable crammed SVG chart.

Patch version bump: 0.1.42 → 0.1.43

Test plan

  • /airdrop FDV matches /token FDV exactly
  • Current FDV dot at correct Y position on desktop chart
  • Linear projection starts from campaign start (left edge), not current date
  • Mobile (< 640px): shows simplified milestone list, no SVG chart
  • All mobile text readable at 12-14px
  • Desktop chart (>= 640px) renders as before with axis labels visible

🤖 Generated with Claude Code

- Prefer Mint Club SDK (on-chain) over Promise.any race for consistent FDV
- Linear projection now starts from campaign start date, not current date
- Replace unreadable SVG chart on mobile with simplified milestone progress view

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

vercel Bot commented Apr 23, 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 23, 2026 5:53am

Request Review

@realproject7
Copy link
Copy Markdown
Owner Author

Re2 Review: ✅ APPROVE

All three fixes from #948 look correct.

1. FDV price source (lib/usd-price.ts): Mint Club SDK is now tried first (sequential), with GeckoTerminal/CoinGecko as Promise.any fallback. This guarantees /airdrop matches /token.

2. Chart projection (CampaignHero.tsx): Projection line now correctly starts from campaign start (PAD.left) using the first daily price in the campaign window, not from current date/FDV. startFdv memo with proper fallback chain is clean.

3. Mobile view: SVG replaced with a readable milestone progress view on <640px — progress bar, tier list, and linear target today. Uses existing design tokens (text-foreground, bg-accent, border-border, etc.) consistently.

CI: lint + typecheck green, e2e pending, Vercel preview skipped (expected).
Version bump 0.1.42 → 0.1.43 correct for patch.

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

This is close, but two parts of issue #948 are still not correct in the current patch. The mobile milestone view now shows incorrect percentages, and the current-FDV dot logic is unchanged from main, so the reported dot-position bug is not actually fixed.

Findings

  • [medium] Mobile milestone percentages are derived from t.fdv / diamondFdv instead of the configured milestone percentage from the API.

    • File: src/components/airdrop/CampaignHero.tsx:524
    • Suggestion: Use t.pct here so Bronze/Silver/Gold/Diamond reflect the milestone percentages configured by the backend (the issue example is 10/30/50/100), not 1/10/50/100 based on FDV thresholds.
  • [medium] The current FDV dot positioning bug is still unresolved.

    • File: src/components/airdrop/CampaignHero.tsx:296
    • Suggestion: dotY still uses the exact same fdvToY(currentFdv > 0 ? currentFdv : 100, fdvLogMax) calculation as main, so this patch does not change the behavior that issue #948 called out. Please fix the actual mapping or data fed into it and verify the dot lands at the correct Y position.

Decision

Requesting changes because the PR does not fully meet the acceptance criteria for issue #948 yet.

- Use configured t.pct for milestone percentages instead of deriving from fdv/diamondFdv
- Clamp fdvToY output to [0,1] range to prevent dot rendering outside chart bounds

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 follow-up commit resolves the issues from my prior review. The mobile milestone list now uses the configured milestone percentages, and the chart changes now align with the intended FDV source and projection behavior for issue #948.

Findings

  • No blocking findings.

Decision

Approving because the requested fixes are in place and the PR checks are passing.

@realproject7 realproject7 merged commit fce463f into main Apr 23, 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 FDV mismatch and chart linear projection start point

2 participants