Skip to content

ui: let a demo hand a step to the person at the keyboard - #130

Draft
allozaur wants to merge 1 commit into
allozaur/docs/ui-demo-skillfrom
allozaur/feat/ui-demo-manual-step
Draft

allozaur wants to merge 1 commit into
allozaur/docs/ui-demo-skillfrom
allozaur/feat/ui-demo-manual-step

Conversation

@allozaur

@allozaur allozaur commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

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-demo skill 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=1 records in a visible window (headless: false) and raises the test timeout to 15 minutes. demo:record and demo:pr both take it.
  • demo.manual(instruction, done): prints the instruction in the terminal, pauses the recording and waits up to 10 minutes for the done locator. Without DEMO_HEADED it 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 its href and 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.md and .env.example describe 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
  • A headed recording (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.visit then showed a huggingface.co page in the same video, at the viewport size.
  • The app steps of the ui: sign in with Hugging Face to share conversations as traces #92 demo ran headless against faked Hugging Face responses: open a chat, Share, pick "New dataset", name it, share, find the "Open on Hugging Face" link.
  • The ui: sign in with Hugging Face to share conversations as traces #92 demo recorded with DEMO_HEADED=1 npm run demo:pr -- 92 and 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.
  • eslint and prettier pass on demo/ and the skill.

Requirements

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation server/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant