Skip to content

Commit e20c44c

Browse files
Merge pull request #550 from TimeWarpEngineering/Cramer/2025-07-08/planning
Add task 032: Migrate from MediatR to TimeWarp.Mediator
2 parents dc6846d + 8255290 commit e20c44c

3 files changed

Lines changed: 81 additions & 256 deletions

File tree

.clinerules

Lines changed: 0 additions & 256 deletions
This file was deleted.
File renamed without changes.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Task 032: Migrate from MediatR to TimeWarp.Mediator
2+
3+
## Description
4+
5+
- Migrate TimeWarp.State from MediatR to TimeWarp.Mediator (a fork of MediatR)
6+
- Since TimeWarp.Mediator maintains API compatibility with MediatR, this should be primarily package references and namespace updates
7+
- Create migration documentation for both TimeWarp.State users and general MediatR users
8+
9+
## Requirements
10+
11+
- Replace MediatR package references with TimeWarp.Mediator in all project files
12+
- Update all namespace imports from MediatR to TimeWarp.Mediator
13+
- Update service registration to use TimeWarp.Mediator methods
14+
- All existing tests must continue to pass
15+
- Create comprehensive migration documentation
16+
- Document any API differences discovered during migration
17+
18+
## Checklist
19+
20+
### Design
21+
- [x] Research current MediatR usage across codebase (40+ files identified)
22+
- [ ] Run all tests to ensure baseline functionality before migration
23+
- [ ] Run ./RunTests.ps1 to verify unit tests pass
24+
- [ ] Run ./RunE2ETests.ps1 to verify end-to-end tests pass
25+
- [ ] Run ./RunTestApp.ps1 to verify test application works
26+
- [ ] Verify architecture tests in TimeWarp.State.Policies still pass
27+
- [ ] Identify TimeWarp.Mediator package version and compatibility
28+
- [ ] Plan migration strategy for minimal disruption
29+
30+
### Implementation
31+
- [ ] Update Directory.Packages.props with TimeWarp.Mediator version
32+
- [ ] Update package references in 2 .csproj files:
33+
- [ ] Source/TimeWarp.State/TimeWarp.State.csproj
34+
- [ ] Tests/Test.App/Test.App.Contracts/Test.App.Contracts.csproj
35+
- [ ] Update global using statements in 8 GlobalUsings.cs files:
36+
- [ ] Source/TimeWarp.State/GlobalUsings.cs
37+
- [ ] Source/TimeWarp.State.Plus/GlobalUsings.cs
38+
- [ ] Tests/TimeWarp.State.Tests/GlobalUsings.cs
39+
- [ ] Tests/Test.App/Test.App.Contracts/GlobalUsings.cs
40+
- [ ] Tests/Test.App/Test.App.Client/GlobalUsings.cs
41+
- [ ] Tests/Client.Integration.Tests/GlobalUsings.cs
42+
- [ ] Samples/02-ActionTracking/Wasm/Sample02Wasm/GlobalUsings.cs
43+
- [ ] Update service registration in ServiceCollectionExtensions.AddTimeWarpState.cs
44+
- [ ] Verify all MediatR interfaces still work (IRequest, IRequestHandler, IMediator, ISender, IPublisher)
45+
- [ ] Test pipeline behaviors (5 implementations)
46+
- [ ] Test pre/post processors (6 implementations)
47+
- [ ] Test notification handlers (9 implementations)
48+
- [ ] Verify Redux DevTools integration continues to work
49+
- [ ] Verify all builds pass after package updates
50+
- [ ] Test NuGet package creation with ./BuildNuGets.ps1
51+
52+
### Documentation
53+
- [ ] Create migration guide for TimeWarp.State users
54+
- [ ] Create general MediatR → TimeWarp.Mediator migration document
55+
- [ ] Update ai-context.md with new dependency information
56+
- [ ] Update Claude.md to reflect new TimeWarp.Mediator dependency
57+
- [ ] Document any breaking changes or API differences
58+
59+
### Review
60+
- [ ] Consider Accessibility Implications
61+
- [ ] Consider Monitoring and Alerting Implications
62+
- [ ] Consider Performance Implications (should be minimal/none)
63+
- [ ] Consider Security Implications (should be minimal/none)
64+
- [ ] Code Review
65+
66+
## Notes
67+
68+
- TimeWarp.Mediator is a fork of MediatR, so API compatibility should be maintained
69+
- Current MediatR usage includes:
70+
- Core interfaces: IRequest, IRequestHandler, IMediator, ISender, IPublisher
71+
- Pipeline behaviors: 5 implementations for Redux DevTools, state transactions, action tracking
72+
- Pre/post processors: 6 implementations for state initialization, render subscriptions, persistence
73+
- Notifications: 9 handlers for various state management events
74+
- Migration should be primarily mechanical (package + namespace changes)
75+
- Need to create documentation for both internal migration and general MediatR users
76+
77+
## Implementation Notes
78+
79+
- Start with package references, then global usings, then service registration
80+
- Test thoroughly at each step to ensure no breaking changes
81+
- Document any unexpected API differences for future reference

0 commit comments

Comments
 (0)