mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-22 05:26:17 +00:00
ErrorTrackingProvider wraps the whole app and keyed its window "error" and "unhandledrejection" listener effect on trackError. trackError is rebuilt on every render because it closes over posthog, session and pathname, so the two global listeners were torn down and re-added on every render of the provider, including on each navigation and session tick. Hold the latest trackError in a ref and register the listeners once for the provider's lifetime, dispatching through the ref so reports still use current posthog/session/pathname context. |
||
|---|---|---|
| .. | ||
| api.ts | ||
| auth-context.tsx | ||
| auth.middleware.ts | ||
| auth.ts | ||
| constants.ts | ||
| error-tracking.tsx | ||
| generate-id.ts | ||
| glass-effect-manager.ts | ||
| package.json | ||
| posthog.tsx | ||
| queries.ts | ||
| query-client.tsx | ||
| similarity.ts | ||
| tsconfig.json | ||
| types.ts | ||
| utils.ts | ||