dify - ✅(Solved) Fix Splash keeps rendering when useUserProfile fails [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35324Fetched 2026-04-17 08:56:04
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
1
Author
Timeline (top)
cross-referenced ×2closed ×1commented ×1labeled ×1

Error Message

  1. Make the useUserProfile() query fail (for example, /account/profile returns an error or the request fails before profile data is available).
  • In the error state, data stays undefined, so the loading indicator can remain visible even after the request has failed. Once the profile query errors, the splash/loading overlay should stop rendering and let the normal error / redirect flow proceed.

Fix Action

Fixed

PR fix notes

PR #35326: fix(web): stop Splash after useUserProfile errors

Description (problem / solution / changelog)

Summary

Keep the first-screen optimization from #35313, but stop Splash from blocking the page after the shared profile query has already failed.

After the migration to useUserProfile(), the component still renders the loader whenever !data?.profile. In the error case, that means the overlay can remain visible even though the request is no longer pending.

This PR narrows the blocking condition to the actual pending state:

  • render the loader while the profile query is pending
  • fall through when the query errors or returns no profile payload

That preserves the deduplicated /account/profile request while avoiding an indefinite loading state.

Test plan

  • Added web/app/components/__tests__/splash.spec.tsx
  • Verified the splash renders during the pending state
  • Verified the splash disappears when the query succeeds
  • Verified the splash also disappears when the query errors
  • Ran: PATH=/tmp/node-v22.22.1-darwin-arm64/bin:$PATH corepack pnpm test app/components/__tests__/splash.spec.tsx

Fixes #35324

Changed files

  • web/app/components/__tests__/splash.spec.tsx (added, +59/-0)
  • web/app/components/splash.tsx (modified, +3/-2)

PR #35335: fix: splash keeps rendering when useUserProfile fails

Description (problem / solution / changelog)

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.

Changed files

  • web/app/components/splash.tsx (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. Open a page that renders web/app/components/splash.tsx.
  2. Make the useUserProfile() query fail (for example, /account/profile returns an error or the request fails before profile data is available).
  3. Observe the Splash component state.

Current code path:

  • Splash now uses useUserProfile() after #35313.
  • The component renders the loader whenever isPending || !data?.profile.
  • In the error state, data stays undefined, so the loading indicator can remain visible even after the request has failed.

✔️ Expected Behavior

Once the profile query errors, the splash/loading overlay should stop rendering and let the normal error / redirect flow proceed.

❌ Actual Behavior

The splash overlay can keep rendering after the profile query has already failed, which leaves the page stuck behind the loading indicator.

extent analysis

TL;DR

Update the Splash component to handle the error state by checking for error in addition to isPending and data?.profile.

Guidance

  • Check the useUserProfile() query for an error property and update the condition for rendering the loader to include this check.
  • Verify that the error state is properly propagated from the useUserProfile() query to the Splash component.
  • Consider adding a timeout or retry mechanism to handle cases where the profile query fails indefinitely.
  • Review the code path changes introduced in #35313 to ensure that the new behavior is correctly implemented.

Example

// Example of updated condition for rendering the loader
if (isPending || !data?.profile || error) {
  // Render loader
} else {
  // Render normal content
}

Notes

The provided information suggests that the issue is related to the useUserProfile() query and its error handling. However, without more context about the query implementation, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Update the Splash component to handle the error state as described above, to ensure that the loading indicator is properly hidden when the profile query fails.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - ✅(Solved) Fix Splash keeps rendering when useUserProfile fails [2 pull requests, 1 comments, 2 participants]