mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-08 06:45:55 +02:00
Two blockers from PR review: 1. `posthog.reset()` wipes persisted super-properties, so after logout or account switch the next session's events silently dropped `client_type` and `app_version` until a full reload. Cache the set at init time and re-register it inside `resetAnalytics()` so the breakdown survives the auth transition. Added unit tests to pin the invariant. 2. Desktop `PageviewTracker` only watched the active tab path, which missed pre-workspace overlays (`/onboarding`, `/workspaces/new`, `/invite/<id>`) — those aren't tab routes on desktop — and also missed the logged-out `/login` state. Move the tracker to the app root and derive the visible path from `(user, overlay, activeTabPath)` with overlay > tab precedence so the `$pageview` stream matches the surface the user actually sees.