Sessions: filters, search, and geo/device context (#192)#269
Conversation
Ship search and Environment/Release/Country filters on the sessions page, persist country/device/email on Session ingest, and surface context in the enriched table and detail view. Co-authored-by: Cursor <cursoragent@cursor.com>
Use a single Event EXISTS clause when both filters are set so one event row must match environment and release, matching events list semantics. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 625e124. Configure here.
| const cfg = getConfigOrNull(); | ||
| if (cfg && sessionId) { | ||
| void postSession(cfg); | ||
| } |
There was a problem hiding this comment.
Stale email after user switch
Medium Severity
identify only updates in-memory userEmail when traits include email, but always posts the current session afterward. Calling identify with a new user id without traits leaves the previous email attached and sends it with the new user_id, so the dashboard can show the wrong email for that session.
Reviewed by Cursor Bugbot for commit 625e124. Configure here.
| platform: cfg.platform ?? undefined, | ||
| environment: cfg.environment ?? undefined, | ||
| user_id: userId ?? undefined, | ||
| user_email: userEmail ?? undefined, |
There was a problem hiding this comment.
Cleared identity not persisted
Medium Severity
Session ingest updates only fields present in the JSON body, but buildSessionPayload drops null user_id and user_email via ?? undefined, so they are omitted from the request. identify(null) or { email: null } clears client state yet leaves the stored session row unchanged, so list and detail views can still show the old identity.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 625e124. Configure here.


Summary
POST /ingest/sessionwithcountry,device_browser,device_os, anduser_email; SDK sends browser/OS/country context and patches identity onidentify(id, { email })Closes #192
Test plan
pnpm lint && pnpm test && pnpm build20260708120000_session_geo_device_emailin dev/stagingidentify(userId, { email }); verify email shows in table and detailMade with Cursor