Repository navigation
Conversation
Some flows cannot be scripted: signing in to a third-party account, approving access. DEMO_HEADED=1 records in a visible browser window, and demo.manual(instruction, done) waits there for the person, then goes on once the done locator is visible. demo.visit(url, ready) opens another site in the recorded tab. Both cut the wait from the video: the recorder can now pause, and frames after a pause run on a clock with the pause taken out. A sign-in popup is a window of its own, so it never shows in the recording. The ui-demo skill and the demo README describe the step. Assisted-by: Claude (Opus 5.5 Medium)
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.
Overview
A demo can now include a step only a person can do, such as signing in to a real account: the recording runs in a visible browser window, waits for the person, and leaves the wait out of the video.
Additional information
Based on the
ui-demoskill PR (#77), which it extends. First used by the demo of #92 (sign in to Hugging Face, share a trace, open it on the Hub).What changed
DEMO_HEADED=1records in a visible window (headless: false) and raises the test timeout to 15 minutes.demo:recordanddemo:prboth take it.demo.manual(instruction, done): prints the instruction in the terminal, pauses the recording and waits up to 10 minutes for thedonelocator. WithoutDEMO_HEADEDit fails at once instead of waiting for nobody.demo.visit(url, ready): opens another site in the recorded tab, with the load cut the same way. A link the app opens in a new tab is not recorded, so a script reads itshrefand visits it.ScreencastRecorder.pause()/resume(): frames that arrive during a pause are dropped, and later frames run on a clock with the pauses taken out, so the video cuts straight across.skills/ui-demo/SKILL.md,demo/README.mdand.env.exampledescribe the step, including that a script must never type someone's password or token, and that a sign-in popup is a window of its own that the recording never shows.Testing
DEMO_HEADED=1 DEMO_SCALE=1 npm run demo:record) with a stand-in for the person (a marker added to the page after a delay): the video shows the frames before the step, then the caption after it, with the wait gone;demo.visitthen showed a huggingface.co page in the same video, at the viewport size.DEMO_HEADED=1 npm run demo:pr -- 92and a person signing in to Hugging Face in the popup: the video cuts from the sign-in button to the signed-in dialog, shares a trace for real, and ends on the trace viewer on the Hub.eslintandprettierpass ondemo/and the skill.Requirements
Claude (Opus 5.5 Medium)