Skip to content

feat: scripted cursor demos that really click - #1

Merged
mhweiner merged 5 commits into
mainfrom
feat/initial-release
Sep 2, 2026
Merged

feat: scripted cursor demos that really click#1
mhweiner merged 5 commits into
mainfrom
feat/initial-release

Conversation

@logfox-agent

Copy link
Copy Markdown
Collaborator

Summary

Extracts the mock-demo player from the Logfox site into a standalone, zero-dependency library, plus docs, a docs site, brand art, and CI.

The idea it is built around: a routine is a list of places the cursor goes, and at each stop busker fires a real click(). The mock changes through the handlers a visitor would hit, so there is no second timeline saying "and at 1.8s, open the modal" — nothing to drift when a duration changes.

  • busk(root, routine) — click-driven steps, plus a hand-timed mode (duration with moves / toggles / typing / countdowns) for what no click causes: streaming logs, typing, countdowns.
  • Take-over — the first real click stops the show for good, hides the cursor, and hands the mock to the visitor. Clicking something dead flashes what is not. Busker tracks its own presses rather than trusting event.isTrusted, which is false for any scripted click.
  • busker.css — optional, ~100 lines, scoped to .busker, themed with four custom properties.
  • Docs site at busker.logfox.ai — the homepage runs busker on a fake alerts app, next to the exact routine driving it.
  • Brand — cursor-in-a-ripple mark, Inter wordmark converted to paths, light/dark lockups, favicon, OG card.

Notes

  • The loop restarts each pass at t=0 rather than carrying the overshoot, so a stalled frame (backgrounded tab, slow paint) cannot drop the start of a routine or fire a burst of catch-up clicks. This was a latent bug in the site version.
  • Pure timing lives in src/timeline.ts and is unit-tested exhaustively; src/busk.ts is tested through happy-dom with a hand-driven clock.
  • release.yml expects gh-deploy-busker and the /logfox/prod/busker/* SSM parameters, which come with the infra PR. Until then the CI job is the only thing that runs on this branch.

Test plan

  • npm run validate — lint, build, 18 tests / 48 assertions, docs site build
  • Demo verified in a browser: scenes change on the cursor's real clicks, take-over sets is-aside and hides the cursor, miss hints fire
  • Logo renders identically in Chromium and resvg
  • CI green on Node 20 / 22 / 24

Fake product demos on a landing page drift because the cursor is on one
timeline and the page state is on another. Busker removes the second one:
a routine is a list of places the cursor goes, and at each stop it fires a
real click, so the mock changes through the handlers a visitor would hit.

Includes the hand-timed mode for what no click causes (streaming logs,
typing, countdowns), take-over on the first real click, optional CSS, a
Starlight docs site whose homepage runs busker itself, and CI/release
wired to autorel and S3/CloudFront.
The skill file is copied into the logfox .cursor workspace, where a
relative path resolves to the wrong README.
…ctive mocks

The docs site now shares callspec's Starlight setup — search, overrides,
build scripts, and validation — so the two sites behave the same and fixes
travel between them. The homepage demo is a coffee subscription mock aimed
at the people who would reach for busker, and the hero leads with building
an interactive mock rather than the two-timelines complaint.
knip and the docs-site font package sat in dependencies, so anyone
installing busker pulled a dead-code analyzer and a webfont, and the
"zero dependencies" claim was untrue. Both are only used to build and
check the site, so they belong in devDependencies.
A scripted click fired at the very instant the cursor went down, so any
element that changed the scene took itself off screen mid-press and the
click never read. Clicks now land at the end of the press stroke, the way
a real one does.

A loop that ended on a press also reset before that press could fire,
silently dropping the last click of a routine.
@mhweiner
mhweiner merged commit a7e2284 into main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants