Skip to content

Remove status code check in screenshot capture flow - #1787

Merged
ivan-ottinger merged 1 commit into
trunkfrom
update/capture-screenshot-logic-to-include-site-errors
Sep 17, 2025
Merged

Remove status code check in screenshot capture flow#1787
ivan-ottinger merged 1 commit into
trunkfrom
update/capture-screenshot-logic-to-include-site-errors

Conversation

@ivan-ottinger

@ivan-ottinger ivan-ottinger commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

Related issues

Proposed Changes

  • Remove status code check in screenshot capture flow to ensure site screenshot is taken even if there's a site error. This will provide clear feedback to the user that the site isn't working. The screenshot will capture the site as-is.
Before After
Markup on 2025-09-16 at 13:44:10 Markup on 2025-09-16 at 13:40:18

Testing Instructions

  1. Check out the PR branch and build the app with npm install && npm start.
  2. Create a site and make it crash in some way. For example, you can:
  • open the site's wp-content/ and remove the following from it:
    • database/
    • db.php
    • mu-plugins/sqlite-database-integration
  1. Restart the site.
  2. The error should be captured in the site screenshot in Studio (instead of current Preview unavailable message).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@ivan-ottinger ivan-ottinger self-assigned this Sep 16, 2025
@ivan-ottinger
ivan-ottinger marked this pull request as ready for review September 16, 2025 13:15
@ivan-ottinger
ivan-ottinger requested a review from a team September 16, 2025 13:20

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good 👍 It worked as expected for me:

Image

I went through the code as well and I think it makes sense to remove that bit.

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love PRs that just remove code and improve the user experience.
I confirm the screenshot is captured even if the website returns an error.

Screenshot 2025-09-17 at 00 41 54
@ivan-ottinger

Copy link
Copy Markdown
Contributor Author

Thank you for your reviews, Kat and Antonio!

@ivan-ottinger
ivan-ottinger merged commit de9c91c into trunk Sep 17, 2025
15 checks passed
@ivan-ottinger
ivan-ottinger deleted the update/capture-screenshot-logic-to-include-site-errors branch September 17, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants