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.
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
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
New «Результат» tab on the account page and in «Все счета», built to approved prototype variant A:
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).performance/usePerformance. The query runs only while the tab is open.model/performance.ts:Verification
npm run verify: 79 files / 590 tests passed; openapi:check, eslint, knip, depcruise, vite and storybook builds ok.aria-labelwith 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.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)2abbb3e329to01689e2881