Skip to content

fix(frontend): stabilize grouped dashboard account metrics#746

Open
AtomicTrxn wants to merge 6 commits intoafadil:mainfrom
AtomicTrxn:codex/fix-dashboard-grouped-account-secondary-metric
Open

fix(frontend): stabilize grouped dashboard account metrics#746
AtomicTrxn wants to merge 6 commits intoafadil:mainfrom
AtomicTrxn:codex/fix-dashboard-grouped-account-secondary-metric

Conversation

@AtomicTrxn
Copy link
Contributor

Description

Root cause:

  • grouped child account rows on the dashboard hid the secondary metric line whenever gain data was zero or unavailable
  • that made some expanded rows render with two lines and others with one line, which looked like rows were switching between balance and gain displays
  • the primary metric was already correct; the bug was inconsistent secondary-metric rendering

Fix summary:

  • keep the primary line as account value for all rows
  • for nested expanded group rows, always render a secondary line
  • show gain amount/percent when gain data exists
  • show neutral zero-gain output when gain is zero
  • show - when valuation/gain data is unavailable
  • keep group headers and standalone account cards unchanged

Validation:

  • pnpm --filter frontend test -- accounts-summary
  • pnpm --filter frontend type-check
  • pnpm --filter frontend lint
  • pnpm exec prettier --check apps/frontend/src/pages/dashboard/accounts-summary.tsx apps/frontend/src/pages/dashboard/accounts-summary.test.tsx

Checklist

By submitting this PR, I agree to the
CLA.

@afadil
Copy link
Owner

afadil commented Mar 19, 2026

changed to logic in this pr #759

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.

2 participants