feat(account): add performance tab vs Moscow Exchange index (WealthLedger/main#54) #167

Merged
codex-bot merged 3 commits from feature/54-investment-performance-vs-index into develop 2026-11-08 16:49:39 +03:00
Owner

Summary

New «Результат» tab on the account page and in «Все счета», built to approved prototype variant A:

  • KPIs: return, profit, «Те же деньги в индексе Мосбиржи», opening/lagging the market;
  • chart: net invested (step line), index, dashed reference index, current-value marker;
  • «Как считали» section.

Linked Issue

WealthLedger/main#54 · backend: WealthLedger/backend (feature/54) · spec: WealthLedger/specs#85

Changes

  • shared/lib: formatSignedPercent, formatPercentagePoints (U+2212 minus, no negative zero).
  • OpenAPI snapshot from backend + regenerated types; entity performance / usePerformance. The query runs only while the tab is open.
  • model/performance.ts:
    • tone follows the displayed (rounded) text;
    • reasons mapped to human text, unknown reason → generic text.
  • States: skeleton, local error with retry (other tabs unaffected), unavailable with reasons, syncing, incomplete with excluded accounts, period under a year («за N дн.», never «годовых»), index unavailable.
  • Index codes appear only in «Как считали».
  • Storybook stories: Ahead / Behind / ShortHistory / Incomplete.

Verification

  • npm run verify: 79 files / 590 tests passed; openapi:check, eslint, knip, depcruise, vite and storybook builds ok.
  • Browser check of the Storybook build at 1200px and 390px, all 4 stories: no horizontal overflow, dashed reference line, current-value reference line, ru dates on the axis, aria-label with totals.

Notes

The snapshot diff also includes older backend contract changes (removed sync=observe, tbank-sync/{id}). Generated types still compile and all tests pass.

## Summary New «Результат» tab on the account page and in «Все счета», built to approved prototype variant A: - KPIs: return, profit, «Те же деньги в индексе Мосбиржи», opening/lagging the market; - chart: net invested (step line), index, dashed reference index, current-value marker; - «Как считали» section. ## Linked Issue WealthLedger/main#54 · backend: WealthLedger/backend (feature/54) · spec: WealthLedger/specs#85 ## Changes - `shared/lib`: `formatSignedPercent`, `formatPercentagePoints` (U+2212 minus, no negative zero). - OpenAPI snapshot from backend + regenerated types; entity `performance` / `usePerformance`. The query runs only while the tab is open. - `model/performance.ts`: - tone follows the displayed (rounded) text; - reasons mapped to human text, unknown reason → generic text. - States: skeleton, local error with retry (other tabs unaffected), unavailable with reasons, syncing, incomplete with excluded accounts, period under a year («за N дн.», never «годовых»), index unavailable. - Index codes appear only in «Как считали». - Storybook stories: Ahead / Behind / ShortHistory / Incomplete. ## Verification - `npm run verify`: 79 files / 590 tests passed; openapi:check, eslint, knip, depcruise, vite and storybook builds ok. - Browser check of the Storybook build at 1200px and 390px, all 4 stories: no horizontal overflow, dashed reference line, current-value reference line, ru dates on the axis, `aria-label` with totals. ## Notes The snapshot diff also includes older backend contract changes (removed `sync=observe`, `tbank-sync/{id}`). Generated types still compile and all tests pass.
codex-bot added 2 commits 2026-11-08 14:22:27 +03:00
codex-bot changed title from feat(account): Result tab — return vs Moscow Exchange index (WealthLedger/main#54) to feat(account): add performance tab vs Moscow Exchange index (WealthLedger/main#54) 2026-11-08 16:22:09 +03:00
ksv741 added 1 commit 2026-11-08 16:26:15 +03:00
feat(account): add performance tab vs Moscow Exchange index (WealthLedger/main#54)
Frontend verify / commits (pull_request) Successful in 39s
Frontend verify / security (pull_request) Successful in 14s
Frontend verify / verify (pull_request) Successful in 7m3s
01689e2881
ksv741 force-pushed feature/54-investment-performance-vs-index from 2abbb3e329 to 01689e2881 2026-11-08 16:26:15 +03:00 Compare
codex-bot merged commit e2062ce837 into develop 2026-11-08 16:49:39 +03:00
codex-bot deleted branch feature/54-investment-performance-vs-index 2026-11-08 16:49:39 +03:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/frontend#167