Skip to content

refactor(frontend): split types/index.ts into topic-scoped modules (Phase 6)#22

Merged
revtex merged 1 commit intodevfrom
refactor/frontend-types-split
Apr 25, 2026
Merged

refactor(frontend): split types/index.ts into topic-scoped modules (Phase 6)#22
revtex merged 1 commit intodevfrom
refactor/frontend-types-split

Conversation

@revtex
Copy link
Copy Markdown
Owner

@revtex revtex commented Apr 25, 2026

Summary

Phase 6 of the directory restructure plan. The 413-line types/index.ts god-file is split into seven topic-scoped modules; the original path becomes a barrel that re-exports everything so all existing @/types import sites continue to compile unchanged.

New layout

File Contents
types/call.ts Call, TranscriptionSegment
types/config.ts SystemConfig, TalkgroupConfig, ScannerConfig
types/ws.ts WsCommand, ConnectionStatus
types/auth.ts LoginResponse, RefreshResponse, ChangePasswordRequest
types/api.ts SetupStatus
types/admin.ts All Admin* DTOs, Capabilities, ConfigResponse, CreateUserPayload, UpdateUserPayload, RR* enrichment, SharedLinkAdmin, ServerDirectory*, transcription DTOs
types/ui.ts AvoidEntry
types/index.ts barrel re-export of all of the above

No type signatures or behaviour changed. No call-site imports needed updating because the barrel covers the existing @/types surface.

Verification

  • pnpm exec tsc --noEmit — clean
  • pnpm test -- --run — 188/188 pass

Phase progress

After this merges, only the optional Phase 7 (move backend/migrations/backend/db/migrations/) remains.

CHANGELOG

One bullet appended under [Unreleased] ### Changed.

…hase 6)

Phase 6 of the directory restructure plan. The 413-line types/index.ts
god-file is split into seven topic-scoped modules; the original path
becomes a barrel that re-exports everything so all existing @/types
import sites continue to compile unchanged.

New layout:
- types/call.ts     - Call, TranscriptionSegment
- types/config.ts   - SystemConfig, TalkgroupConfig, ScannerConfig
- types/ws.ts       - WsCommand, ConnectionStatus
- types/auth.ts     - LoginResponse, RefreshResponse, ChangePasswordRequest
- types/api.ts      - SetupStatus
- types/admin.ts    - All Admin* DTOs, Capabilities, ConfigResponse,
                      CreateUserPayload, UpdateUserPayload, RR*,
                      SharedLinkAdmin, ServerDirectory*, Transcription*
- types/ui.ts       - AvoidEntry
- types/index.ts    - barrel re-export

No type signatures or behaviour changed. tsc --noEmit clean,
188/188 unit tests pass.
@revtex revtex merged commit d9b1c95 into dev Apr 25, 2026
7 checks passed
@revtex revtex deleted the refactor/frontend-types-split branch April 25, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant