Session 28 — User Switcher + No-Show Automation + Workbench Filters

What was built

  • User switcher — sidebar toast menu with “Switch User” submenu listing test accounts grouped by branch
    • createPortal rendering, JWT impersonation flow, gold banner when impersonating, “Return to Owner” restores session
  • Role rename: scheduler_assistant to assistant — updated across Login.tsx and sidebar
  • Scroll restoration fix — triple-attempt pattern in CommandCenter and OwnerProjects
  • No-show automation — site visit marked “No-Show” triggers fire-and-forget async hook
    • Auto-creates ADM-MISS SOW line ($400), sets needs_return_visit flag, creates RFI, sends WhatsApp alert
    • Dedup check prevents duplicate ADM-MISS lines
  • Backend cert_validate.py scoping — PRODUCTS_REQUIRING_DRIVE_LOGS, PRODUCTS_REQUIRING_PRODUCTION_DAYS, Check 11 added
  • test_account bool fix — portal_auth.py converts SQLite integer to Python bool
  • Workbench filter bar — 5 filters: date range, branch, project status, invoice status, cert status
  • Project Graph for admin — RoleRoute updated, added to admin sidebar

Services touched