Skip to content

[975] Frontend: Implement account risk summary card with actionable warnings - #1031

Merged
Junirezz merged 3 commits into
Junirezz:mainfrom
UzyKhs:fix/975-frontend-implement-account-risk-summary-card-with-actionable-warnings
Jul 28, 2026
Merged

[975] Frontend: Implement account risk summary card with actionable warnings#1031
Junirezz merged 3 commits into
Junirezz:mainfrom
UzyKhs:fix/975-frontend-implement-account-risk-summary-card-with-actionable-warnings

Conversation

@UzyKhs

@UzyKhs UzyKhs commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extracts the inline RiskSummaryCard from VaultDashboard.tsx into a presentational frontend/src/components/RiskSummaryCard.tsx that receives all copy via props, exposes itself as a labelled role="region", and announces warning changes via aria-live="polite".
  • Adds an optional healthyAction CTA to the all-clear state; the dashboard passes a "Compare strategies" action that navigates to /compare.
  • Moves all risk-summary copy to i18n under vaultDashboard.riskSummary.* in en.ts and mirrors it with Spanish translations in es.ts; the XLM-fee warning CTA label changes from "Adjust amount" to "Review deposit".
  • Adds RiskSummaryCard.test.tsx covering warning rendering + CTA click handlers, the labelled region, the all-clear state with/without the healthy CTA, and singular vs. plural badge labels.
  • Documents the signals and CTAs in docs/frontend/account-risk-summary.md.

Closes #975

Test plan

  • npm run test:run -- src/components/RiskSummaryCard.test.tsx src/components/VaultDashboard.test.tsx src/components/VaultDashboard.emptystate.test.tsx — 3 files, 26 tests, all passing
  • Manually verify the dashboard's risk card in healthy and warning states, including the "Compare strategies" and "Review deposit" CTAs
  • Switch locale to Spanish and confirm the risk summary copy is translated

@Junirezz
Junirezz merged commit a1135f5 into Junirezz:main Jul 28, 2026
11 of 15 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.

Frontend: Implement account risk summary card with actionable warnings

2 participants