Render video dialogs entirely with ASS - #19
Conversation
commit: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 95d27a5. Configure here.
| sourceFrameAt: options.openedAt, | ||
| start, | ||
| thickness: options.thickness, | ||
| viewport: options.viewport, |
There was a problem hiding this comment.
Dialog pointer misses ASS buttons
Medium Severity
Dialog hit targets are laid out in page-viewport space at capture time, while ASS redraws the dialog with videoModeDialogLayout on the scaled video viewport. That layout scale is clamped to [0.75, 1.5], so it is not homogeneous with Playwright’s linear video downscale. Pointer overlays then use scaleHighlight on the capture-time rects and can land off the ASS OK/Cancel controls whenever the clamp bites, for example a 1920×1080 viewport with the default fit-within-800 video size.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 95d27a5. Configure here.


Summary
Render
alert(),confirm(), andprompt()wholly in video post-production with ASS shapes and text. The raw Playwright recording stays clean: video mode freezes the last app frame before the native dialog, draws a deterministic dialog over that frame, then resumes after Playwright resolves the real dialog.This removes the dialog DOM overlay, init script, browser screenshots, and per-dialog image layers. Playwright's real
Dialogstill owns listener order, automatic dismissal, accepted text, and accept/dismiss behavior.What changes
video-mode-dialogs.ass.Trade-offs
src/plugins/video-mode.tsis +565/−303 lines versusmain(+262 net). Layout and ASS helpers replace page lifecycle and screenshot-layer code.Review videos
Focused prompt — rendered:
prompt-rendered.mp4
Focused prompt — raw:
prompt-raw.mp4
Todo app from #15 — rendered:
todo-rendered.mp4
Todo app from #15 — raw:
todo-raw.mp4
Validation
pnpm typecheckpnpm buildpnpm exec publintCoding agent session:
019fc7f7-de88-7690-8d0a-31790c4dbc29Note
Medium Risk
Touches core video-mode FFmpeg rendering and dialog timing/metadata; behavior is heavily tested but regressions could affect rendered artifact fidelity or highlight ordering.
Overview
videoMode no longer injects synthetic dialog DOM, init scripts, or per-dialog screenshots. Dialog scenes are drawn in post with ASS (
video-mode-dialogs.ass): freeze the last clean app frame before the native dialog, overlay panel/message/buttons, then resume raw footage after resolution.Prompt handling is tightened: metadata can carry
defaultValueseparately frompromptText(e.g. explicit empty accept vs Unicode default). Rendered prompts reveal text by grapheme, keep OK/Cancel neutral until typing finishes, then highlight the resolved action in blue—ordering is covered by new FFmpeg pixel/frame regressions and raw-video checks that synthetic white panels never appear.Playwright’s real
Dialogstill drives accept/dismiss, listener order, and auto-dismiss; README documents the ASS-only path. Large refactor invideo-mode.ts(~+565/−303) replacing overlay lifecycle with layout helpers and an FFmpeg ass filter step.Reviewed by Cursor Bugbot for commit 95d27a5. Bugbot is set up for automated code reviews on this repo. Configure here.