fix: explore preview shows 404 instead of reconcile error on navigation#8994
Open
ericpgreen2 wants to merge 2 commits intomainfrom
Open
fix: explore preview shows 404 instead of reconcile error on navigation#8994ericpgreen2 wants to merge 2 commits intomainfrom
ericpgreen2 wants to merge 2 commits intomainfrom
Conversation
Replace the eager-fetch-or-fail pattern in the explore page's load function with a reactive query pattern (matching web-admin). This fixes two issues: navigating to a broken dashboard showed a 404 instead of the reconcile error, and the preview didn't auto-recover when the underlying resource was fixed externally. Also extracts shared explore state helpers (`isExploreErrored`, `isExploreReconcilingForFirstTime`, polling constants) from both web-admin and web-local into `web-common/features/explores/selectors.ts`.
…ge flicker Show DashboardBuilding while the explore query is pending (instead of a blank page). Also fix a pre-existing flicker in DashboardStateDataLoader where the time range query's loading state was incorrectly treated as a "no data" error, causing "Failed to load dashboard" to flash briefly before the dashboard rendered.
AdityaHegde
approved these changes
Mar 10, 2026
| if (!query.state.data) return false; | ||
| if (isExploreReconcilingForFirstTime(query.state.data)) | ||
| return PollIntervalWhenDashboardFirstReconciling; | ||
| return PollIntervalWhenExploreReconciling; |
Collaborator
There was a problem hiding this comment.
nit: I dont see any difference in useExplore between cloud and local. How about moving the whole thing to selectors.ts ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
+page.tsload function eagerly fetched viafetchExploreSpec, which threw a 404 whenmetricsViewwas null (a normal state during reconcile errors); SvelteKit's error boundary then unmounted the page component and all its reactive queriesuseExplore()query with polling (matching the web-admin pattern), so the component stays mounted and detects recoveryisExploreErrored,isExploreReconcilingForFirstTime, polling constants) intoweb-commonto eliminate duplication between web-admin and web-localCloses APP-771
Slack thread
Checklist:
Developed in collaboration with Claude Code