[#858] Show live current price on chart + simplify header token box#859
[#858] Show live current price on chart + simplify header token box#859realproject7 merged 2 commits intomainfrom
Conversation
Chart changes: - Append live current price as rightmost point via usePlotUsdPrice hook - Dashed line from last historical trade to live price (visually distinct) - Price label below chart now reads "Current price · $X.XX" instead of showing the last historical trade price - Footnote clarifies dashed line = live price Header token price box: - Simplified to 2 lines: USD price + "Token Price" label - Removed secondary PLOT-denominated line Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
realproject7
left a comment
There was a problem hiding this comment.
re2 APPROVE — Historical data preserved, live price correctly appended as dashed-connector endpoint. Empty-state guard properly checks historicalPoints not chartPoints. Stale isLatest logic cleanly removed. Dual dashed-line semantics (live + approx) addressed in footnote. TokenPriceBox simplified to 2 lines as requested.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The live-current-price concept is right, but the new point insertion mixes units when the USD hook has not resolved yet.
Findings
- [high] USD mode can append a PLOT-valued live point while labeling it as USD
- File:
src/components/PriceChart.tsx:156 - Suggestion: In
effectiveMode === "usd", only append the live point whencurrentUsdPrice !== null. Otherwise keep the chart purely historical in USD mode, or temporarily fall back the whole chart to reserve mode. Right nowlivePricefalls back tocurrentPrice(PLOT) even though the surrounding series and footer are still labeledUSD, which can show a bogus final point and incorrect "Current price" text untilusePlotUsdPrice()resolves.
- File:
Decision
Requesting changes because this produces an incorrect price/value in the chart’s primary USD mode, which is the core behavior of #858.
…able In USD mode, only append the live current price point when plotUsd is resolved. Prevents plotting a PLOT-denominated value on a USD chart while the rate hook is still loading. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up fixes the USD/PLOT unit-mixing bug in the live chart point. In USD mode, the live point is now only appended when the USD rate is available, and the footer correctly shows loading… instead of a mislabeled PLOT value.
Findings
- [info] GitHub checks are still pending at review time (
e2e,lint-and-typecheck,visual-regression)- File:
PR #859 - Suggestion: Let CI finish before merge.
- File:
Decision
Approved because the revised chart logic preserves unit correctness in USD mode and matches issue #858 without falsifying the historical series.
Summary
How live current price is represented
The live price point (from
usePlotUsdPrice× on-chaincurrentPriceRaw) is appended as the last chart point withisLive: true. The segment from the last historical trade to this point renders as a dashed line at 60% opacity, matching the existing approximate-data visual language. The pulse marker animates on the live point. Historical data points remain untouched.Fixes #858
Test plan
🤖 Generated with Claude Code