Skip to content

fix: splash keeps rendering when useUserProfile fails#35335

Closed
Protocol-zero-0 wants to merge 1 commit into
langgenius:mainfrom
Protocol-zero-0:fix-splash-stuck-on-error
Closed

fix: splash keeps rendering when useUserProfile fails#35335
Protocol-zero-0 wants to merge 1 commit into
langgenius:mainfrom
Protocol-zero-0:fix-splash-stuck-on-error

Conversation

@Protocol-zero-0
Copy link
Copy Markdown

Fixes #35324.

The Splash component was previously rendering the loading state whenever isPending || !data?.profile was true. However, if the useUserProfile query failed, data would remain undefined, causing the splash screen to stay visible indefinitely.

This PR adds a check for isError to ensure the splash screen is dismissed if the profile query fails, allowing the normal error or redirect flow to proceed.

Copilot AI review requested due to automatic review settings April 16, 2026 18:13
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 16, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an indefinite splash/loading overlay when the useUserProfile() query errors by ensuring the Splash component does not keep rendering solely due to missing data.profile in an error state.

Changes:

  • Destructure isError from useUserProfile() in Splash.
  • Update the splash render condition to suppress the loading overlay when the profile query is in an error state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +10
const { isPending, data, isError } = useUserProfile()

if (isPending || !data?.profile) {
if ((isPending || !data?.profile) && !isError) {
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

Consider adding a small unit test for Splash covering the error state (e.g., mock useUserProfile() to return { isPending: false, isError: true, data: undefined } and assert the loading overlay is not rendered). This regression is subtle and currently isn’t exercised by tests.

Copilot uses AI. Check for mistakes.
@crazywoola
Copy link
Copy Markdown
Member

Duplicated #35326

@crazywoola crazywoola closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Splash keeps rendering when useUserProfile fails

3 participants