Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure webview is loaded before screenshot #1129

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Screenshot Functionality Fix

This PR fixes the inconsistent screenshot functionality when leaving projects by:

  1. Adding proper webview load state checking with a 5-second timeout
  2. Improving error handling and logging
  3. Making the code more resilient to empty projects
  4. Adding detailed error messages for debugging

Changes

  • Added document.readyState check before taking screenshots
  • Implemented timeout to prevent UI blocking (5 seconds max)
  • Improved error handling with detailed messages
  • Added graceful handling of empty projects
  • Enhanced logging for better debugging

Testing

The changes have been reviewed for correctness, but due to development environment limitations, they need to be tested in a proper environment. Please test the following scenarios:

  1. Taking screenshots of normal projects
  2. Taking screenshots of empty projects
  3. Taking screenshots when leaving projects quickly

Notes

  • The timeout of 5 seconds can be adjusted if needed
  • Empty projects will now show a warning but still attempt to take a screenshot

Link to Devin run: https://app.devin.ai/sessions/a2fe2648615b4d29b5a3e11b2537d7d9

- Add webview readyState check with timeout
- Improve error handling and logging
- Handle empty projects gracefully
- Add detailed error messages for debugging

Link to Devin run: https://app.devin.ai/sessions/a2fe2648615b4d29b5a3e11b2537d7d9

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor Author

Closing due to inactivity.

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.

0 participants