stack/packages
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
..
dashboard-ui-components chore: update package versions 2026-04-09 13:36:23 -07:00
init-stack chore: update package versions 2026-04-09 13:36:23 -07:00
js chore: update package versions 2026-04-09 13:36:23 -07:00
react chore: update package versions 2026-04-09 13:36:23 -07:00
stack chore: update package versions 2026-04-09 13:36:23 -07:00
stack-cli chore: update package versions 2026-04-09 13:36:23 -07:00
stack-sc chore: update package versions 2026-04-09 13:36:23 -07:00
stack-shared Backend fallback (cloud run) (#1306) 2026-04-11 00:57:37 +00:00
stack-ui chore: update package versions 2026-04-09 13:36:23 -07:00
template Fix EventTracker silently dormant in real browsers (#1327) 2026-04-13 09:24:40 -07:00