Repository navigation
PostHog events for what visitors wait for on the analysis page - #335
Merged
Merged
Conversation
…n it dies Three PostHog events, so that round 10 and later changes can be judged on real visitors, by engine, build, device and release: - analysis_engine_load: the first position of a visit (Maia, the chart, Stockfish's first depth, d12, d18, lines settled, search done). - analysis_engine_steps: a summary of the positions moved to after it, sent when the page is hidden or left: medians, and how many reached each stage. d18 now means the best line, so "lines settled" is what compares across round 10. - analysis_page_ended_unexpectedly: the last analysis page in this tab was never left, as when a phone runs out of memory, and whether it was on screen. stockfish_engine_ready and _failed also give the engine and its memory retries, and Maia's start is reported as maia_engine_ready and _failed, with its restarts. Nothing reads the page: a few timestamps per engine update. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ashtonanderson
marked this pull request as ready for review
November 5, 2026 04:11
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds PostHog events that show what real visitors wait for on the analysis page, and when it dies, so that #334 and later changes can be judged on real devices rather than emulated ones.
Events
analysis_engine_load: one per visit, for the first position: Maia, the chart, Stockfish's first depth, d12, d18, lines settled, search done.analysis_engine_steps: a summary of the moves stepped through, sent when the page is hidden or left, and every 30 moves: medians, and how many reached each stage.analysis_page_ended_unexpectedly: the last analysis page in this tab was never left, as when a phone runs out of memory, with whether it was on screen.stockfish_engine_readyand_failed: now also giveengineandmemory_retries.maia_engine_readyand_failed: new here, withrestarts. The tracking functions existed but were never called.All the timing events are split by
engine,engine_build,is_phone,cores,releaseand PostHog's own$osand$browser.LOADING.md, round 11, explains how to read them and has SQL for PostHog's editor: crash rate, what visitors wait for, and Stockfish before and after #334.Things to know
stockfish_engine_ready,stockfish_engine_failed,$web_vitalsand$exceptionexisted before it went live. The new events have no "before", so they compare later changes against it.release: it relies on Vercel exposingNEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA. That isn't confirmed; locally it's empty.Testing
npm test(85),npx tsc --noEmitandnpm run lintpass.was_visibletrue. This run found and fixed a bug where every normal reload would have counted as a crash.🤖 Generated with Claude Code