Phase 3 Complete: Full App.tsx Domain Extraction (75% Slimmer Root Shell), Scoped Live Listeners & Lifecycle Routers
Completes Phase 3 of the full-codebase structural refactor by extracting all remaining core state, Firestore listener, authentication, round CRUD/RSVP/poll, deep-link routing, and lifecycle domains out of src/App.tsx, reducing the root shell by 75.4% (from 25,170 down to 6,197 lines across 14 dedicated domain hooks) while preserving 100% of Firestore schemas, security rules, and dual-user RBAC invariants ahead of the upcoming v9.0.0 major release.
Dig into all 5 changes in v8.4.0
- Phase 3 Complete: Auth, Round CRUD, RSVP, Poll & Card-Draw Domain Hooks: Extracted useAuthAndProfileActions (sign-in, profile editing, handle rename migration, social OAuth, and password reset), useRoundCrudActions (round creation/editing, weather lock, cancel/reopen, and single/series deletion), and useRoundRsvpPollsAndInvitesActions (optimistic 3-way offline RSVP merges, tee-time poll voting/auto-locking, random card draws, and friend/crew invites) out of src/App.tsx.
- Scoped Firestore Live Collections & Staff-Gated Subscriptions Hook: Extracted useFirestoreCoreCollections, useFirestoreStaffAndMigrationEffects, and useScopedMessagesSubscription into useFirestoreLiveCollections.ts, isolating bounded onSnapshot listeners, historical round archive hydration, direct-link cold-open fallbacks, Primary Admin /admins registry sync, legacy sensitive-field scrubbing, and per-thread message visibility buckets.
- Unified Deep-Link Router, Bell Rollup & Background Lifecycle Hook: Extracted useBellAlertsFeed and useDeepLinkAndLifecycleEffects to manage unified bell alert deduplication, cold-launch and popstate named-route SEO sync, offline outbox state overlays, 60-second tee-time poll auto-locks, recurring weekly round rollovers, 2-hour severe weather alerts, deferred auth action replay, and Web Push verification.
- Phase 4 Early Head-Start & Expanded Modular Architecture Guards: Registered all newly extracted Phase 3 hooks alongside early Phase 4 Admin Console (useAdminSyncController, AdminCourseSyncPanel, AdminDonationsTab) and League Hub (leagueStandingsEngine, LeagueStandingsTab, LeagueEventsTab) sub-modules in validate:tier3 so automated drift checks guard all extracted boundaries.
- Strict Hook Execution Ordering & Zero-Schema-Drift Verification: Preserved exact React hook dependency ordering across derived profile, league, and staff-access selectors while maintaining zero changes to firebase-blueprint.json or firestore.rules.