Local dev setup discoveries (Feb 23, 2026, pre-compaction)
- Twill app now uses a role-based, multi-portal architecture: (master), (partner), (merchant), and (guest) routes.
- GuestLayout.tsx handles routing after Supabase login: reads
user_typefrom/meon the facade and redirects:user_type: 'master'→ /master/dashboarduser_type: 'partner'(with partner_owner/rep roles) → /partner/dashboarduser_type: 'partner'(with merchant role) → /merchant/application
- In local mock auth,
/mealways returns a hardcodedpartner_owneruser unless path includes/master/(then returns master user). - Spinner during dashboard loads is caused by absence of seeded test data for merchants/partners — not tenant issues.
- The old tenant-based architecture has been deprecated. Local development does NOT require manual tenant creation anymore — only user roles matter.
- To test each portal locally:
- Partner: login as usual → auto-routes to /partner/dashboard (mock user)
- Master: visit /master/dashboard (mock auth switches to master user)
- Merchant: would need mock auth tweak to return merchant user for /me
- LeadGen subagent and other automations should target the new role-based structure, not legacy tenant flows.
Do not overwrite this file on future pre-compaction turns — append only.