stack/packages/template/src/lib/stack-app
BilalG1 310278781a
Fix EventTracker silently dormant in real browsers (#1327)
`window.screen` and `window.history` are accessor properties on
`Window.prototype`, so `Object.getOwnPropertyDescriptor(window,
X)?.value` returned undefined in real browsers, causing `start()` to
short-circuit and never capture or send any $page-view / $click events.
Read the globals directly instead; the jsdom-based regression test pins
the accessor-descriptor shape so this can't silently come back.

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Added a new test suite verifying event batching, timing, page-view and
click event capture, and client-side navigation behavior using simulated
timers and DOM environment.

* **Bug Fixes**
* Improved event tracker reliability by changing how browser screen and
history are read, yielding more consistent detection of screen
dimensions and navigation for analytics capture.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-13 09:24:40 -07:00
..
api-keys Api Keys (#590) 2025-04-04 13:03:10 -07:00
apps Fix EventTracker silently dormant in real browsers (#1327) 2026-04-13 09:24:40 -07:00
connected-accounts More connected accounts (#1165) 2026-02-18 15:19:35 -08:00
contact-channels Improve user profile page (#712) 2025-07-02 02:59:12 +02:00
customers inline product cancelling (#1199) 2026-02-17 20:28:16 -08:00
data-vault Data vaults (#871) 2025-08-30 23:42:56 -07:00
email [Refactor][Feat][Fix] Rework Email Section With New Sent Page, Better Drafts Page, and Settings Page (#1221) 2026-03-11 12:01:36 -07:00
email-templates Split stack-app.ts file into multiple files (#492) 2025-03-02 21:20:42 -08:00
internal-api-keys Fix package build with explicit index.js imports (#677) 2025-05-15 23:55:59 +02:00
notification-categories Send email route and notification settings page (#717) 2025-07-01 19:17:53 -07:00
permissions Config DB migration step 2 (#629) 2025-04-29 14:52:45 -07:00
project-configs [Fix] [Feat] Update OAuth Sign-In and Get Token Functions to Work (#1130) 2026-01-28 02:17:27 +00:00
projects Add onboarding status to Project model and implement related database… (#1246) 2026-03-13 12:00:40 -07:00
session-replays analytics replay filters (#1213) 2026-02-24 13:00:45 -08:00
teams Add server-side flags for anonymous users 2026-04-03 10:43:34 -07:00
users Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
common.ts New { type: "hosted" } for page URLs (#1261) 2026-03-27 14:48:01 -07:00
index.ts New { type: "hosted" } for page URLs (#1261) 2026-03-27 14:48:01 -07:00
url-targets.test.ts Fix dashboard loading bug 2026-03-29 12:49:40 -07:00
url-targets.ts Fix dashboard loading bug 2026-03-29 12:49:40 -07:00