Skip to content

Conversation

@wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Jul 22, 2025

Related issues

Proposed Changes

  • I propose to update crash screen styling and to fix the issue with another crash occurring when starting the site from a read-only location.
Screenshot 2025-07-22 at 13 05 41

Testing Instructions

Test crash screen styling

  1. Run Studio in dev mode (npm start)
  2. Trigger renderer failure from Electron menu
  3. Close the trace
  4. Confirm "contact support" is styled correctly (blue, and no padding) and points to the 'Contact us' page

Before the fix, there was additional padding around the "contact support", it was black, and pointing to another page.

Test crash screen styling for RTL language

  1. Run Studio in dev mode (npm start)
  2. Change language to RTL
  3. Trigger renderer failure from Electron menu
  4. Close the trace
  5. Confirm layout uses English in LTR mode
  6. Confirm "contact support" is styled correctly and points to the 'Contact us' page

Before the fix, error screen was displayed in English but in RTL mode, with layout slightly broken. Additionally, the user couldn't close the trace with the mouse.

Test running Studio from read-only container

  1. Navigate to build in the Buildkite
  2. Download DMG file for your system arch
  3. Open DMG, start Studio from DMG
  4. Start site if none of site automatically started
  5. Confirm it starts and that Studio doesn't crash
  6. Trigger Studio update
  7. Confirm dialog with correct error is displayed

Before the fix, Studio running from read-only container was crashing when the site was started.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn changed the title Update crash screen styling Update crash screen styling and fix crash Jul 22, 2025
@wojtekn wojtekn marked this pull request as ready for review July 22, 2025 11:06
const { isRTL } = useI18n();

useEffect( () => {
document.documentElement.dir = isRTL() ? 'rtl' : 'ltr';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When Studio displays default error fallback, translations are not available, so it will always switch to LTR. We could even simplify this code and hardcode it to ltr. Any thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's better if we hard code it to LTR. That way we don't have "dead" code that won't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, done in e83f71c.

}

const LOCKFILE_PATH = nodePath.join( getResourcesPath(), LOCKFILE_NAME );
const LOCKFILE_PATH = getUserDataLockFilePath();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unsure why in #1319 we used two different locations for the app lock file. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I like this improvement of using the same lock file function. But should it be a different PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not only an improvement, but a fix for one of the bugs reported in STU-612. @ndiego reported layout issues on crash screen, but the crash in steps he shared shouldn't occur in the first place. The lock file location fixes that crash.

It would make sense to have two separate issues, but I addressed both as part of one PR, as both problems were reported under one issue and are related - one reproduces the other.

@wojtekn wojtekn requested a review from a team July 22, 2025 11:09
@wojtekn wojtekn self-assigned this Jul 22, 2025
Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for improving the crash window. I confirm I see the links correctly.

Before After
Screenshot 2025-07-22 at 15 37 57 Screenshot 2025-07-22 at 15 29 43

In RTL I see the english text as expected:

Screenshot 2025-07-22 at 15 31 09

I also see the expected error when trying to update Studio from a DMG image.

Screenshot 2025-07-22 at 15 42 59

Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

Thanks for clarifying. It makes sense having the fix together 👍

@wojtekn wojtekn merged commit 91c0ca2 into trunk Jul 23, 2025
12 checks passed
@wojtekn wojtekn deleted the update/crash-screen-styling branch July 23, 2025 05:31
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.

3 participants