Repository navigation
feat(capture): product walkthrough recording and composition - #455
Open
liujianye1 wants to merge 12 commits into
Open
liujianye1 wants to merge 12 commits into
liujianye1 wants to merge 12 commits into
Conversation
…ings
`hypit capture plan <plan.json> --to <dir>` replays a step plan while recording
it: the start page loads before the recording, each step needs exactly one
visible target (or an explicit index), and the take stops at the first failure
with the partial recording and a failure screenshot. steps.json reports every
step's start/end on the recording's clock plus the target box and pointer in
CSS pixels, so a composition can draw the cursor, zoom or callout itself; the
footage stays clean unless --cursor page draws a cursor into the page.
Clicks on paid or destructive controls are refused unless the step carries
"authorized": true. Logged-in products use a named profile outside the project
(`hypit capture login <url> --profile <name>`, then --profile) or an exported
{ cookies, origins } state (--storage-state); --login-check asks the product's
own session endpoint and records only an account label.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Chrome's native recorder writes a frame only when the page changes, so a still product screen left gaps that media normalization rejects as discontinuous. The plan now re-times its recording to a constant-rate H.264 file (--fps, default 30) with FFmpeg; the frame-colour test confirms step times still match the footage after re-timing. Each take also gets steps.svs, the same steps as a walkthrough.take Recipe that Source can import, and steps.json keeps paths under the take or the plan relative so a take can be committed and moved. Relative startUrl, goto and upload paths resolve from the plan file. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A fictional product page, a capture plan and its recorded take, and a project component that presents the take on a screen card: a cursor travels to each recorded pointer, clicks and typing press with a ripple, and a camera moves in on actions, pans between nearby ones and lets go during pauses. Everything is derived from the take's steps and the requested frame, and follows the recording's source Window when it moves in the program. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… sharp Headless Chrome's native recorder and screencast deliver CSS pixels only, so a take zoomed into by the composition looked soft. Above device scale 1 a plan now records repeated screenshots (about 15 page frames per second at 2560 x 1600), assembled offline into constant-rate H.264 at CRF 14. Chrome drops mouse and key events dispatched during a screenshot, so input waits for the capture in flight; typing goes one key at a time so frames land between keystrokes. The CLI records plans at scale 2; scale 1 keeps the smoother screencast. The plan test now runs at both scales. The example renders at 1920 x 1080 with the HTML renderer's high quality. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… tours Found while recording openart.ai: - prepare: unrecorded steps before the take. The site loads its videos only once they are scrolled into view, so without a warm-up pass every section appeared empty in the recording. - locale: Accept-Language and navigator.language(s). The site offered a Chinese translation because of the recording machine's language. - A scroll with durationMs is now a page-side eased animation. A stream of wheel events had to wait for each 2x screenshot, halving the frame rate of a glide. The scroller is the one under the pointer that scrolls in the requested direction, so a horizontal carousel no longer absorbs a vertical page scroll. - 2x frames are JPEG q92, which captures faster than PNG at that size. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Ported from social-vv's login skill. openart.ai's Cloudflare Turnstile reported "Verification failed" for every capture browser, so neither a recording nor a person logging in through `capture login` could get past it. Capture browsers now drop --enable-automation, add --disable-blink-features=AutomationControlled and report "Chrome" instead of "HeadlessChrome"; the same check then passes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Overriding only the user agent string cleared Chrome's client hints, so a
headed browser reported "Chrome/156" with no brands. Cloudflare Turnstile then
refused to load ("The CAPTCHA failed to load ... unsupported browser") when a
person tried to sign up on openart.ai. A headed browser is now left untouched;
a headless one reports the brands a headed Chrome of the same version would.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SanHsien
added a commit
to SanHsien/hypit
that referenced
this pull request
Oct 28, 2026
…i#447-hypit-ai#456; advance watermarks PRs hypit-ai#442, hypit-ai#443 and hypit-ai#444 were ported ahead of upstream (d5afdfe, 541ab59, 5dc763c) because the fork has the same defect and it is reachable from outside input. The rest are recorded with the fork-side evidence and a re-review trigger in docs/fork/DECISIONS.md. Release track unchanged at v0.3.1; watermarks PR 455, issue 456. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ditors Found recording openart.ai at phone width in a cloud sandbox: - Responsive pages keep hidden copies of a control (the desktop layout behind the mobile one). Waiting for the first match timed out although a visible copy was on screen; targets, `wait` and `startUntil` now wait for any visible match. - `fill` on a rich editor (ProseMirror) only changed the DOM selection, so a restored draft survived and new text was appended to it. It now selects through the editing command and deletes until the editor is empty. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Measured in a 4 vCPU cloud sandbox on a 1080x1920 take: 6.2 s instead of 9.9 s with medium at the same CRF 14, and a smaller file. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
layout="full" fills the Frame edge to edge instead of a framed card with a margin: a phone-width take on a 1080x1920 Canvas then reads like the app on the viewer's phone, with its content about 11% larger. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ite or app The transformation guide sent product replacement through supplied images and generation only, so an agent remaking a reference for a website or app would illustrate an interface that does not exist. It now says which product passages need the real interface recorded, how to plan and size those takes, how to present them, and the limits on accounts, human checks and paid actions. The routing table and the screen-demonstration guide point there. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Centre on the element's box and lower the zoom for a step whose element would not fit, so a wide field is not cut at the edges; small controls keep the requested zoom. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This branch has not been 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.
What
Adds plan replay to
@hypit/browser-capture, so an agent can record a product walkthrough or website tour from a JSON step plan instead of hand-writing a Puppeteer script per take.hypit capture plan <plan.json> --to <new-dir>: stepsgoto / wait / assert / dismiss / hover / click / dblclick / fill / type / press / scroll / pause / screenshot / drag / upload. Targets are Puppeteer selectors;text=androle=…[name='…']shorthands are translated.index); the take stops at the first failure and keeps the partial recording plusscreenshots/failed.png.steps.json(hypit.capture-plan@1) reports each step'sstart/endon the recording's clock, targetboxandpointerin CSS px, checkpoint screenshots and skip reasons. The footage stays clean by default so the composition can draw cursor/zoom/callouts;--cursor pagedraws one into the page.scrollwithdurationMsglides with easing (website tours)."authorized": true;asset: { attribute, value }checks an exact identity.hypit capture login <url> --profile <name>opens a visible browser on a profile outside the project (~/.cache/hypit/capture-profiles);--profilereuses it.--storage-stateimports a{ cookies, origins }export.--login-check <url>asks the product's own session endpoint before recording and keeps only an account label.runCapturePlan,parseCapturePlan,planSelector,captureProfileDirectory,openCaptureLogin,CaptureOptions.storageState.browser-capture.md(plan format, review, login rules) andscreen-demonstrations.md(requirement → shot → review).Tests
packages/browser-capture/test/plan.test.ts: validation and selector translation; a replay asserting boxes, skipped optional steps, fill replacing old text, and that step times match the recorded video (frame colour before/after a click); guarded click, ambiguous target, identity mismatch and non-empty output directory; storageState cookies + localStorage and login check (no token leaks into steps.json).plan/login.HYPIT_CAPTURE_TEST_BROWSER): all 10 browser-capture tests pass;tsc -p tsconfig.json --noEmitclean.--cursor page.Not covered by an automated test:
capture login(needs a person to log in in a headed window).Composition:
examples/product-walkthroughcapture plannow re-times Chrome's change-only native recording to constant-rate H.264 (--fps, default 30). Without this,mediaop:Normalizerejects a take with a still screen (Primary moving video has no eligible stream: frame gaps > 0.5 s are "discontinuous").steps.svs, awalkthrough.takeRecipe Source can import (<import as="take" source="./captures/take/steps.svs"/>), andsteps.jsonkeeps paths relative so takes can be committed.@example/screen-walkthroughproject component: presents a take on a screen card; the cursor travels to each recorded pointer, clicks/typing press with a ripple, and a camera moves in on actions, pans between nearby ones and lets go during pauses. Everything derives from the steps and the requested frame, and followssource-windowif the recording moves in the program.demo/app.html), its plan, a committed 146 KB take,walkthrough.svml/.svrun. Added to the Distributionfilesnext tosemantic-composition.Verified:
hypit check+ localhypit buildof the example (1280×720, 30 fps, 12.2 s) and frame inspection; component unit tests (failed take refused, cursor/press/camera keys, motion shifts with the source Window).Full
node test/run.mjslocally: 3 failures (caption-finelayout.browser,media-localfile-frames,provider-html-localcapture-process); the same tests fail identically on a cleanmainworktree on this machine (Node 26 deprecation output), so unrelated.🤖 Generated with Claude Code