maniator / maniator/verticopolis
[Feature]: [P3] Add a coarse speed-engagement app_action (deferred from CAP-4)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Deferred during implementation of the app-chrome telemetry (CAP-4, PR for spec-posthog-error-tracking). The design party kept a coarse, session-latched speed bit ("did the player actively change the game speed"), but implementation hit two contamination sources and a file-size wall, so it was dropped from the first pass rather than ship a polluted signal.
Why it was hard:
setSpeedis called PROGRAMMATICALLY (appBootpauseForSplashdoessetSpeed(1)on splash dismiss, so the game auto-runs at Slow), so instrumenting thesetSpeedchoke would fire for every session.- The
onSpeedcommand callback (the obvious hook) is ALSO the dialog pause path:showComparepauses viaui.cb.onSpeed(0)and restores viaonSpeed(prevSpeed), so hookingonSpeedrecords a spuriousspeed:"pause"on every Compare open AND consumes the once-per-session latch, suppressing a later genuine pick (found by the Edge Case Hunter in review). - The only genuinely user-only site, the
#speed buttonclick handler insrc/ui/UI.ts, sits in a file already at the 500-line size ceiling, so it cannot take the two added lines without a split.
Clean options when picked up:
- Add a dedicated
onUserSpeed(speed)callback that fires the telemetry then delegates toonSpeed; point the UI speed-button handler at it (a one-line swap, no net UI.ts growth) and keeponSpeeda pure command for dialogs. The keyboard digit path (inputKeys) is already user-only and can instrument directly. - Or give dialogs a dedicated non-instrumented pause path and hook
onSpeedfor users only. - Latch once per session via
trackAppActionOnce("speed", label); detail = the chosen speed label.
Keep the cookieless posture (aggregate/per-session, coarse label only). volume (the other coarse bit) shipped cleanly; this is just the speed half.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/ui/UI.ts and trace the user-only speed-button handler, then compare it with inputKeys, setSpeed, and onSpeed to avoid programmatic and dialog pauses. Keep onSpeed usable for dialog control, instrument genuine user changes with trackAppActionOnce("speed", label), and confirm the session records only the chosen coarse speed label once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- analytics, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100