- 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.
29 lines
2.1 KiB
Markdown
29 lines
2.1 KiB
Markdown
# 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
|