Sergey Krylov 1774c7ffd6
Some checks failed
CI / ci (pull_request) Failing after 2m32s
CI / ci (push) Failing after 2m17s
refactor(frontend): bring FSD architecture into compliance
- Remove cross-entity import (broker-position -> broker-operation)
- Extract duplicated formatters to shared/lib/formatters.ts
- Flatten shared/ui/broker-allocation-bar nesting
- Clean up entities/stock/index.ts public API

All 111 tests pass, build clean.
2026-06-20 22:43:44 +03:00

29 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# FSD Quick Fix — Tasks
- [x] Создать feature branch `codex/fsd-quick-fix`
- [x] Написать spec.md
- [x] Написать plan.md
- [x] **Task 1**: Убрать cross-entity import broker-position → broker-operation
- [x] `entities/broker-position/model/brokerDisplay.ts` — удалить re-export строк 2-8
- [x] `entities/broker-position/index.ts` — удалить BROKER_OPERATION_TYPE_OPTIONS, getBrokerOperationImpact, getBrokerOperationTypeLabel, isBrokerOperationType, BrokerOperationImpact
- [x] `entities/broker-position/model/brokerDisplay.test.ts` — перенести импорты broker-operation напрямую
- [x] **Task 2**: Дедуплицировать форматтеры
- [x] Создать `shared/lib/formatters.ts` с каноничными реализациями
- [x] `entities/broker-account/model/brokerAccountsOverview.ts` — перейти на импорт из shared
- [x] `widgets/broker-account-card/BrokerAccountCard.tsx` — убрать дубликаты
- [x] `widgets/broker-accounts-summary/BrokerAccountsSummary.tsx` — убрать дубликаты
- [x] `widgets/broker-allocation-chart/BrokerAllocationChart.tsx` — убрать дубликаты
- [x] `widgets/broker-operations-table/BrokerOperationsTable.tsx` — убрать дубликаты
- [x] `widgets/portfolio-card/PortfolioCard.tsx` — убрать дубликаты
- [x] `pages/broker-account/BrokerAccountOverviewPage.tsx` — убрать дубликаты
- [x] `pages/broker-positions/BrokerPositionsPage.tsx` — убрать дубликаты
- [x] **Task 3**: Уплостить shared/ui/broker-allocation-bar
- [x] Переместить BrokerAllocationBar.tsx из `ui/` на уровень slice
- [x] Обновить `index.ts`
- [x] Удалить пустую `ui/`
- [x] **Task 4**: Очистить entities/stock/index.ts
- [x] Убрать getShare, getShareMarketData, getShareDividends, getShareHistory, getShareCandles
- [x] **Проверка**: lint + build + тесты
- [x] Build — OK
- [x] Tests — 23/23 files, 111/111 passed