Skip to content

Add annualized rate to vault share price chart#605

Open
starksama wants to merge 1 commit into
masterfrom
add-vault-share-price-annualized-rate
Open

Add annualized rate to vault share price chart#605
starksama wants to merge 1 commit into
masterfrom
add-vault-share-price-annualized-rate

Conversation

@starksama

@starksama starksama commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an Annualized APY/APR stat next to Current and period Change in the vault share price chart
  • derive the rate from the same share-price points already used by the chart
  • respect the existing APY/APR display preference and rate label

Validation

  • pnpm exec ultracite fix src/features/vault/components/vault-share-price-chart.tsx
  • pnpm exec ultracite check src/features/vault/components/vault-share-price-chart.tsx
  • pnpm typecheck
  • pnpm lint:check
  • pnpm build

Notes

  • Kept the diff scoped to the chart component only.

Summary by CodeRabbit

  • New Features
    • Added an annualized performance metric to the vault share price chart.
    • The metric adapts to the configured rate format and uses the same visual indicators as existing change values.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
monarch Ready Ready Preview, Comment Jul 10, 2026 4:17pm

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3a3dc32b-fa14-46fa-a747-b90c17f77dca

📥 Commits

Reviewing files that changed from the base of the PR and between f8a3561 and cb0d364.

📒 Files selected for processing (1)
  • src/features/vault/components/vault-share-price-chart.tsx

📝 Walkthrough

Walkthrough

VaultSharePriceChart now calculates an annualized APY or APR from chart-point growth and displays it alongside current and timeframe change values.

Changes

Vault annualized rate display

Layer / File(s) Summary
Annualized rate calculation
src/features/vault/components/vault-share-price-chart.tsx
The chart reads APY/APR settings, computes annualized growth from the first and last points, and formats unavailable values as --.
Annualized rate rendering
src/features/vault/components/vault-share-price-chart.tsx
The chart header displays the new “Annualized” metric with the configured rate label and existing change color logic.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant VaultSharePriceChart
  participant AppSettings
  participant RateLabel
  participant RateMath
  VaultSharePriceChart->>AppSettings: read isAprDisplay
  VaultSharePriceChart->>RateLabel: get rateLabel
  VaultSharePriceChart->>RateMath: calculate annualized rate from chart endpoints
  RateMath-->>VaultSharePriceChart: return annualized APY
  VaultSharePriceChart->>VaultSharePriceChart: render formatted annualized metric
Loading

Possibly related PRs

Suggested labels: ui

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an annualized rate to the vault share price chart.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-vault-share-price-annualized-rate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an annualized rate display to the vault share price chart. It calculates the annualized APY based on the share price growth over the selected timeframe and displays it formatted as either APR or APY according to the user's settings. No review comments were provided, and the changes look correct, so there is no additional feedback.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui User interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant