272 Commits

Author SHA1 Message Date
75fead68b8 refactor: split MoexClientService into domain-specific clients
- MoexHttpClient: infrastructure (axios, rate limiter, circuit breaker)
- MoexSecuritiesClient: search and security descriptions
- MoexMarketDataClient: share/bond market data and batch queries
- MoexCandlesClient: candle data
- MoexHistoryClient: share/bond history
- MoexDividendsClient: dividend data
- Removed @Global() from MoexClientModule
- Updated all 7 consumers with explicit DI
- All 141 tests passing
2026-06-25 20:49:17 +03:00
d2457d13af docs: add ADR-020 and feature docs for MoexClientService split 2026-06-25 20:42:28 +03:00
238836c850 refactor(backend): connect RequestLoggingMiddleware through DI
- AppModule implements NestModule with configure() for middleware
- Remove manual middleware instantiation from main.ts
- 120 tests pass, build succeeds
2026-06-25 20:37:10 +03:00
6e8efd2b80 feat(backend): improve health check with dependency probes 2026-06-25 20:34:37 +03:00
9f85dc5dde refactor(backend): introduce domain exception hierarchy
- Add DomainException base class extending HttpException
- Add EntityNotFoundException, PortfolioAccessDeniedException,
  MoexApiException, TBankApiException, TBankNotConfiguredException
- Update HttpExceptionFilter with unhandled error logging
- Replace generic NestJS exceptions in services with domain exceptions
- Update all affected tests
- 117 tests pass, build succeeds
2026-06-25 20:30:45 +03:00
3b919ecdc6 perf(backend): add dedicated screenerTtl config for screener caching
- Add CACHE_SCREENER_TTL env var (default 900s) to configuration
- Move screener from marketDataTtl to dedicated screenerTtl
- Add test verifying cache key prefix, parts, and TTL config key
- 117 tests pass, build succeeds
2026-06-25 20:25:53 +03:00
ccb1082535 refactor(backend): unify envelope DTOs and fix shares/bonds inconsistency
- Replace 4 duplicate meta DTOs (AuthResponseMetaDto, PortfolioResponseMetaDto,
  BrokerResponseMetaDto, ScreenerResponseMetaDto) with shared ApiResponseMeta
- Wrap shares getShare() in ApiEnvelopePayload (was raw object, unlike bonds)
- Remove unnecessary CacheModule import from securities module
- Update portfolio controller nullDataEnvelopeSchema to use shared ApiResponseMeta
- All 116 tests pass
2026-06-25 20:20:59 +03:00
8d6410b37b docs: mark pagination-loading-overlay and broker-account-analytics as implemented
All checks were successful
CI / ci (push) Successful in 13m33s
2026-06-25 06:44:31 +03:00
1fc7386568 Merge branch 'codex/api-envelope-contract'
All checks were successful
CI / ci (push) Successful in 13m12s
2026-06-25 06:15:38 +03:00
e69f183372 feat: finalize api-envelope-contract — tests, frontend simplify, contract tests, docs 2026-06-25 06:15:26 +03:00
b092caf8d6 feat: migrate services to ApiEnvelopePayload, controllers to plain returns 2026-06-24 19:39:30 +03:00
3a89cef76c feat: add ApiEnvelopePayload carrier, update TransformInterceptor to handle it 2026-06-24 19:36:28 +03:00
659be4636c docs: mark portfolio-analytics and quality-gate-contract-docs as completed in spec/plan
All checks were successful
CI / ci (pull_request) Successful in 12m44s
CI / ci (push) Successful in 14m21s
2026-06-24 19:06:24 +03:00
de776f477c docs: update roadmap — mark portfolio-analytics and quality-gate-contract-docs as completed 2026-06-24 19:04:28 +03:00
194a8be3e4 fix: remove invalid vitest workspace config, fix test:storybook script
vitest v4 removed defineWorkspace API, causing CI failure.
No .stories.test.* files exist, so test:storybook is a no-op.
2026-06-24 19:00:37 +03:00
95e9e7f71f feat: complete portfolio analytics Phases 2-3 and sync OpenAPI artifacts
- Phase 2: dividend income — batch MOEX dividend fetching with buyDate filtering, UI cards
- Phase 3: target allocation — backend targets parsing + deviation calc, frontend inputs + display
- Add openapi-artifacts.spec.ts for checked-in contract verification
- Regenerate frontend types from Swagger (auth/screener/portfolio paths)
2026-06-24 18:53:46 +03:00
ba0a4cbfef docs: mark broker-operations-ui-improvements and broker-positions-pagination as completed
Some checks failed
CI / ci (pull_request) Failing after 13m15s
CI / ci (push) Failing after 12m58s
2026-06-24 17:55:22 +03:00
f2fe6a4829 chore: untrack graphify-out generated artifacts
Some checks failed
CI / ci (push) Has been cancelled
CI / ci (pull_request) Failing after 14m29s
2026-06-24 17:49:40 +03:00
f0b6785540 feat: finalize broker-events — visual separation, docs update, roadmap 2026-06-24 17:47:06 +03:00
2af2ff32c1 feat: finalize table-migration — fix DataTable types, remove legacy helpers, update docs
Some checks failed
CI / ci (pull_request) Failing after 12m13s
CI / ci (push) Failing after 11m35s
2026-06-24 15:24:56 +03:00
2ed356fbcd docs: document MCP tools setup (code-index-mcp, serena, graphify)
- Add code-index-mcp and serena sections to AGENTS.md
- Update AGENTS.md MCP tools description in obligatory approach
- Add graphify hooks (post-checkout, post-commit) for auto graph rebuild
- Add serena project config
- Add graphify-out knowledge graph artifacts
- Ignore dev.db and graphify-out/cache/ in .gitignore
2026-06-24 13:32:10 +03:00
a72f951033 fix(ci): build design-system before frontend tests to resolve @moex-vibe/design-system import
Some checks failed
CI / ci (pull_request) Failing after 16m40s
CI / ci (push) Failing after 4m16s
2026-06-24 12:36:20 +03:00
3dfcf5aaa8 feat: complete broker account analytics with sync button, tests, and state filter
Some checks failed
CI / ci (pull_request) Failing after 3m39s
CI / ci (push) Failing after 3m10s
- Add state filter (EXECUTED/null) to analytics query (spec compliance)
- Add service unit tests (11 tests) and controller test
- Add sync button to operations page with mutation hook
- Regenerate frontend types via codegen
- Update tasks.md marking all items complete

Backend: 114 tests, Frontend: 116 tests — all pass
2026-06-24 11:29:09 +03:00
ef4bc48e50 feat: add analytics route and tab navigation for broker account 2026-06-24 09:46:38 +03:00
a1e68fb13a feat: add BrokerAnalyticsPage component with loading/error/empty states 2026-06-24 09:45:59 +03:00
3f0fb42d99 feat: add BrokerAnalyticsDto type, API function, and hook 2026-06-24 09:44:35 +03:00
abf3676ba1 fix(backend): export BrokerAnalyticsService from TBankModule 2026-06-24 09:42:35 +03:00
5cd56b239a feat: wire up broker analytics endpoint, cache config, and module registration
- Add analytics cache key to TBANK_CACHE_KEYS
- Add tbankAnalyticsTtl to cache configuration
- Register and export BrokerAnalyticsService in TBankModule
- Add BrokerAnalyticsEnvelopeDto to broker envelope DTOs
- Add GET /accounts/:accountId/analytics endpoint to TBankController
- Fix TBankController spec to pass new constructor dependency
2026-06-24 09:41:57 +03:00
5184d34262 fix(backend): handle malformed payment JSON in analytics service 2026-06-24 09:40:41 +03:00
61e3398c71 feat(backend): add broker analytics DTO and service 2026-06-24 09:38:25 +03:00
15427be384 docs: add spec for broker account analytics 2026-06-24 09:30:03 +03:00
0c4250fa6c feat(frontend): complete frontend debt audit with reconciled backlog
Some checks failed
CI / ci (pull_request) Failing after 2m54s
CI / ci (push) Failing after 3m9s
2026-06-24 09:09:50 +03:00
d529d51612 docs(frontend): complete debt backlog features with test conventions 2026-06-24 08:51:42 +03:00
9ad0f571d5 docs(frontend): mark docs sync done 2026-06-24 08:21:57 +03:00
410f35bbd7 docs(frontend): harden infra docs 2026-06-24 08:09:05 +03:00
afa0ec05e7 docs(frontend): sync frontend docs with current state 2026-06-24 08:00:23 +03:00
41668ea452 docs(frontend): add test hygiene plan 2026-06-24 07:19:22 +03:00
2a6cb1cec9 docs(frontend): add shared boundary cleanup plan 2026-06-24 07:16:39 +03:00
5b8bf1c4b4 docs(frontend): add infrastructure hardening plan 2026-06-24 07:14:32 +03:00
3e054ee6c4 docs(frontend): add docs sync plan 2026-06-24 07:10:40 +03:00
204152907c docs(frontend): add debt backlog epic and specs 2026-06-23 22:00:09 +03:00
a13b5145f7 docs(frontend): align tooling spec with implementation
Some checks failed
CI / ci (pull_request) Failing after 3m32s
CI / ci (push) Failing after 2m50s
2026-06-23 21:30:11 +03:00
b26021016c fix(frontend): clean up mock setup and route params 2026-06-23 21:22:37 +03:00
76cffc061d fix: provide portfolio via BrokerAccountContext, fix Обзор link adding trailing dot 2026-06-23 20:41:23 +03:00
aea74bda3b fix: sync SessionProvider auth state to Zustand store for router guard
requireAuth() in routeTree.tsx reads isAuthenticated from useSessionStore
(Zustand), but SessionProvider only managed state via React context.
After login, the Zustand store stayed false, causing protected route guards
to redirect to /login even when authenticated.
2026-06-23 20:27:50 +03:00
9932278b64 feat: complete Phase 3 API type unification, delete stale test file
- Delete shared/api/responses.ts, move type re-exports to index.ts
- Update all 55+ imports from shared/api/responses to shared/api
- Delete stale client.test.ts (tested deleted client.ts)
- Run biome checks and fix import ordering
- Update tasks.md and plan.md to reflect actual approach
2026-06-23 20:24:16 +03:00
063e80c375 feat(openapi): unify frontend types with codegen, fix backend nullable DTOs
- Fix ApiResponseMeta nullable property (add type: String) to prevent Record<string, never> in codegen
- Fix broker events DTO nullable fields with proper type annotations
- Regenerate frontend types.ts from updated Swagger schema
- Replace all hand-written types in responses.ts with codegen aliases
- Remove stale BrokerPortfolioEvent/BrokerEventsSummary/BrokerEventsData interfaces
- Fix codegen output path in frontend package.json
2026-06-23 19:58:23 +03:00
5b794c0419 feat: add Swagger response DTOs for all missing endpoints
- Shares: ShareEnvelopeDto, ShareMarketDataEnvelopeDto, DividendsEnvelopeDto,
  ShareHistoryEnvelopeDto, DividendItemDto, HistoryItemDto
- Bonds: BondEnvelopeDto, BondMarketDataEnvelopeDto, BondHistoryEnvelopeDto,
  BondHistoryItemDto
- Candles: CandleItemDto, CandleEnvelopeDto
- Securities: SearchResultItemDto, SearchEnvelopeDto
- Health: HealthResponseDto, HealthEnvelopeDto
- Add @ApiOkResponse decorators to all previously undocumented endpoints
- Reuse ApiResponseMeta from common for all envelope DTOs
2026-06-23 07:17:30 +03:00
cbb5d09bc3 docs: update tasks.md — mark Phase 2 prettier removal as complete 2026-06-23 06:58:55 +03:00
c7a8993b4a chore: remove prettier, consolidate formatting under biome
- Remove prettier dependency and config files (.prettierrc, .prettierignore)
- Update root format/format:check scripts to use biome only (via frontend)
- Update lint-staged: remove prettier --check, keep biome + eslint
- Update CI: remove redundant format:check step
- Update ADR-018 with code-first TanStack Router approach note
2026-06-23 06:58:35 +03:00