Skip to content

Add wait options for reliable auto screenshots#10

Draft
danshapiro wants to merge 2 commits intoobra:mainfrom
danshapiro:fix/screenshot-delay
Draft

Add wait options for reliable auto screenshots#10
danshapiro wants to merge 2 commits intoobra:mainfrom
danshapiro:fix/screenshot-delay

Conversation

@danshapiro
Copy link

Summary

  • Fix flaky screenshots in animated UIs by waiting briefly before auto-capture.
  • Add optional per-action wait and screenshot wait-for-visible parameters.

Problem

Auto screenshots currently fire immediately after each action. In animated dialogs the target is in the DOM but still hidden (opacity/transform), so the captured frame can miss the UI and show the background instead. Observed in Codex CLI: dialogs appeared in extracted HTML but not in the captured image until re-shot after the animation finished.

Proposal

  • Add waitAfterActionMs (small default, overridable) applied before auto screenshots.
  • Allow the screenshot action to accept selector + waitForVisible to wait for state:"visible" before capture.
  • Keep defaults lightweight to avoid regressions.

Testing

Manual: with a short post-action wait, animated dialogs render in captured frames consistently.

Problem identified and PR prepared by Codex CLI (GPT-5).

@coderabbitai
Copy link

coderabbitai bot commented Nov 26, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@obra
Copy link
Owner

obra commented Dec 24, 2025

Hey Dan! Thanks for this PR. Since you opened it, we've gutted and redone how screenshots work in this repo. Would you mind rebasing against the current version of the code and seeing if this is still needed / adapting it to the new approach?

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants