feat: scripted cursor demos that really click - #1
Merged
Conversation
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.
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.
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-drivensteps, plus a hand-timed mode (durationwithmoves/toggles/typing/countdowns) for what no click causes: streaming logs, typing, countdowns.event.isTrusted, which is false for any scripted click.busker.css— optional, ~100 lines, scoped to.busker, themed with four custom properties.busker.logfox.ai— the homepage runs busker on a fake alerts app, next to the exact routine driving it.Notes
t=0rather 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.src/timeline.tsand is unit-tested exhaustively;src/busk.tsis tested through happy-dom with a hand-driven clock.release.ymlexpectsgh-deploy-buskerand 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 buildis-asideand hides the cursor, miss hints fire