tools: marketing screenshot and demo-video capture - #110
Closed
alpha5611331 wants to merge 1 commit into
Closed
Conversation
Renders the real renderer UI for the marketing site without Electron, a login, a backend or a real interview. The renderer reaches main through exactly one object - window.electron from preload.cts - and boots fine in an ordinary browser, then waits on it. So the script injects a stub via addInitScript and the real UI renders against canned state. Video mode keeps the subscriber list live and mutates the state over a timeline, so the panels animate the way a real session does: transcript lines arrive, a card goes pending, the answer streams in, then a screenshot solution lands. Lives here rather than in the marketing repo because everything it mirrors is here - the preload surface, RendererAppState, the RuntimeConfig defaults, and the Speaker/SuggestionState/RunningState enum values. When those change this has to change with them and should break next to the code that broke it. Not under test/ - it asserts nothing and CI does not run it. Three non-obvious things, documented in the README because each produced a wrong screenshot before being found: - zoom.getFactor() is a multiplier, not a percentage; returning 100 puts "10000%" on the status bar. - audioInputDeviceName has to name a device the browser really enumerates, or the control bar shows its missing-microphone badge on every frame. Headless Chromium has none, hence the fake-device flags. - Stealth is a body class the preload toggles, not only app state. Demo content is illustrative and carries no real names or transcripts. Not covered: the stealth overlay composited over a real screen share. There is no desktop behind the window here for it to be invisible against, so that one needs the real app with --disable-content-protection. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
Closing without merging: the |
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.
Renders the real renderer UI for the marketing site without Electron, a login, a backend, or a real interview. Used to produce the imagery in PowerInterviewAI/marketing-website#19.
How
The renderer reaches main through exactly one object —
window.electronfrom preload.cts — and boots fine in an ordinary browser, then waits on it. The script injects a stub viaaddInitScriptand the real UI renders against canned state.Video mode keeps the subscriber list live and mutates state over a timeline, so the panels animate the way a real session does: transcript lines arrive, a card goes pending, the answer streams in, then a screenshot solution lands. Output is 1920×1080 at 479 KB.
pnpm dev python tools/marketing-capture/capture.py shots out/ python tools/marketing-capture/capture.py videos out/ # needs ffmpegWhy here and not in the marketing repo
Everything it mirrors is in this repo: the preload surface,
RendererAppState, theRuntimeConfigdefaults, and theSpeaker/SuggestionState/RunningStateenum values. When those change, this has to change with them, and it should break next to the code that broke it. Same reasoning astest/manual/.Not under
test/— it asserts nothing and CI does not run it.Three non-obvious things
Each produced a visibly wrong screenshot before being found, so all three are in the README:
zoom.getFactor()is a multiplier, not a percentage. The control rendersfactor * 100, so returning100put10000%on the status bar.audioInputDeviceNamemust name a device the browser really enumerates, or the control bar shows its missing-microphone badge on every frame. Headless Chromium has none — hence the fake-device flags.isStealthalone leaves the normal chrome on screen.Demo content
Illustrative — a generic backend-engineering question about indexing. No real names, companies, or transcripts. The README says not to paste a real candidate's session in.
Not covered
The stealth overlay composited over a real screen share. There is no desktop behind the window here for it to be invisible against, so that one needs the real app with
--disable-content-protection.Related: the four existing hero videos on the marketing site are handheld camera recordings of a laptop screen (15–20 MB each). That flag makes proper screen recordings of stealth mode possible, which is likely why they were filmed in the first place.
🤖 Generated with Claude Code