feat(viewer): load-failed recovery panel#196
Draft
MrCoder wants to merge 2 commits into
Draft
Conversation
…upport actions
When a diagram custom content fetch returns 404 or another error, viewers now
show an error panel ("This diagram isn't available") instead of a blank canvas.
The panel includes a Try again button (location.reload) for transient failures and
a Contact support button that copies a diagnostic bundle to the clipboard and opens
the support portal. The failed state is reflected in the Vuex store via two new
fields (viewerLoadState, loadError) and emits a load_failed_shown analytics event.
Fixes blank-diagram regression: isDisplayableDiagram now returns true for diagrams
with a known DiagramType but empty content, so freshly created or cleared diagrams
render as an empty canvas rather than incorrectly showing the error panel.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
failed_with_source(has a customContentId → retryable, "Try again" + "Contact support") andfailed_without_source(no CC ID → permanent, "Contact support" only)load_failed_shownandsupport_link_clickedanalytics events addedviewerLoadStateandloadErroradded to Vuex store (RootState)viewerLoadOutcome.tsutility centralises state classification (classifyViewerLoadOutcome,applyViewerLoadOutcome,mapCustomContentLoadError,mapThrownViewerLoadError)isDisplayableDiagramnow returnstruefor diagrams with a knownDiagramTypebut empty content — a freshly-created or cleared diagram shows an empty canvas, not the error panelTest plan
viewerLoadOutcome.spec.ts(9 tests),GenericViewer.spec.ts(19 tests),viewerBootstrap.spec.ts,ApWrapper2.spec.ts— all passlite-dev.atlassian.net: happy path renders correctly, 404 failure shows error panel, Try again reloads iframe, Contact support opens portaltreats a blank-but-loaded diagram (empty code, known type) as ready🤖 Generated with Claude Code