Skip to content

fix: canvas dashboard flashes 404 on load due to race condition#9048

Open
djbarnwal wants to merge 1 commit intomainfrom
fix/404-flash-canvas
Open

fix: canvas dashboard flashes 404 on load due to race condition#9048
djbarnwal wants to merge 1 commit intomainfrom
fix/404-flash-canvas

Conversation

@djbarnwal
Copy link
Member

On page load, CanvasInitialization ran two independent queries: the authoritative createQueryServiceResolveCanvas (which returns validSpec) and a secondary useResource call (which returns lightweight resource metadata). The reconcileErrorMessage derived state used both as sources:

$: reconcileErrorMessage = !validSpec
  ? reconcileError || resource?.meta?.reconcileError
  : undefined;

The useResource query could resolve first — before fetchedCanvas loaded — with a reconcileError already set (e.g. "dependency error: ..."). At that moment validSpec was still undefined, so CanvasLoadingState would briefly show the 404 page before the resolve-canvas response arrived.

Changes

  • Removed the resource?.meta?.reconcileError fallback from reconcileErrorMessage.
    Error state is now driven solely by the resolve-canvas query, which is the authoritative source for canvas readiness.

https://linear.app/rilldata/issue/APP-721/canvas-dashboard-flashes-with-404-error-before-loading

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@djbarnwal djbarnwal requested a review from AdityaHegde March 13, 2026 14:11
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.

1 participant