Fund Migration Wizard
The Fund Migration Wizard guides operations and support teams through the coordinator-driven upgrade path for legacy funds. It surfaces prerequisite checks, gathers audit metadata, and invokes the backend coordinator so that investors, bank accounts, and NAV history migrate without manual scripts.
Location
- Route file:
src/routes/fund/$fundCode/migration.tsx - UI primitives:
src/components/funds/migration-wizard/* - State hooks:
src/hooks/funds/useFundMigration.ts
The wizard is routed alongside the existing fund management pages and reuses the shared Fund header to keep the migration flow contextual.
User Flow
- Eligibility scan – Displays fund metadata, last EOD date, and outstanding investor transactions. The panel mirrors the prerequisites listed in the Fund Migration Coordinator.
- Payload builder – Collects the target schema version, change ticket, and optional schedule window. Toggles allow operators to opt-in to bank account or investor migrations when phasing work.
- Dry-run verification – Encourages a dry-run execution that renders the validation findings returned by the coordinator. Errors block promotion to a live run.
- Execution – On confirmation, the wizard triggers the live migration and streams progress updates.
- Post-migration checklist – Summarizes the safeguards engaged (locks, freezes) and surfaces links to reconcile bank accounts and investor holdings.
API Integration
The wizard relies exclusively on TRPC mutations/queries:
trpc.system.funds.runMigration.mutate(command)– Submits either dry-run or live payloads. The hook wraps the mutation with toast feedback and optimistic UI state.trpc.shared.funds.getMigrationStatus.useQuery({ fundId })– Polls the coordinator for long-running migrations so system and tenant operators see synchronized status updates.
All requests include the current fund identifier (string), the changeTicket, and the authenticated operator’s identifier for audit logging. A capability guard ensures only users with CAPABILITIES.MANAGE_OPERATIONS see the call-to-action buttons.
Safeguards Presented to Users
- Concurrent activity warning – A banner is displayed when
getMigrationStatusreports an active lock, preventing operators from triggering two migrations for the same fund. - Bank account reconciliation – After a successful migration, the wizard prompts users to visit the Bank Account Service dashboards to verify opening balances.
- Investor verification – Links to the Investor Service holding views allow quick comparison against the migration diff.
Related Documentation
- Backend process: Fund Migration Coordinator
- Initial provisioning: Fund Setup Coordinator
- Operations overview: Operations Dashboard