Skip to content

[#860] Show full USD token price in header#866

Merged
realproject7 merged 1 commit intomainfrom
task/860-full-usd-token-price
Apr 12, 2026
Merged

[#860] Show full USD token price in header#866
realproject7 merged 1 commit intomainfrom
task/860-full-usd-token-price

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Header token price box was showing < $0.01 for small USD values, hiding the actual price
  • Added formatUsdTokenPrice() in lib/usd-price.ts that shows 2 significant digits for values below $0.01 (e.g. $0.0054, $0.00000012)
  • TokenPriceBox now uses this formatter; generic formatUsdValue() unchanged for other contexts

Test plan

  • View a story with a token price below $0.01 → verify header shows actual USD value (e.g. $0.0054) instead of < $0.01
  • View a story with a token price above $0.01 → verify header still formats normally

Fixes #860

🤖 Generated with Claude Code

Add formatUsdTokenPrice() that shows significant digits for small USD
values (e.g. $0.0054 instead of < $0.01). Used in TokenPriceBox for
the story page header. The generic formatUsdValue() is unchanged for
other contexts.

Fixes #860

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

vercel Bot commented Apr 12, 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 12, 2026 10:14am

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: APPROVE

Summary

This matches issue #860. The story header token price now uses a dedicated formatter that exposes the actual USD value for sub-cent prices instead of collapsing to < $0.01, while the generic USD formatter remains unchanged for other contexts.

Findings

  • No blocking findings.

Decision

Approving. The change is focused and consistent with the requested scope. GitHub checks were still pending when I reviewed.

@realproject7 realproject7 merged commit 182bc4c into main Apr 12, 2026
5 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.

[Follow-up] Header token price: show full USD value, not '< /bin/zsh.01'

2 participants