Commit 45ecc3d
refactor: simplify seat assignment with SeatAssignmentTarget pattern
Introduce SeatAssignmentTarget dataclass to unify the seat creation logic.
The only branching point is now resolving the target (who the seat is for),
while seat creation, token generation, and notifications are unified.
Changes:
- Add SeatAssignmentTarget dataclass with customer_id, member_id, email, seat_member_email
- Add _resolve_member_model_target() for member_model_enabled=True path
- Add _resolve_legacy_target() for member_model_enabled=False path
- Refactor assign_seat() to use unified seat creation logic
- Simplify claim_seat() to share validation and claim logic between paths
This reduces code duplication and makes the feature flag logic clearer.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 738bbde commit 45ecc3d
1 file changed
+218
-208
lines changed
0 commit comments