Diagram - Troubleshooting

Diagnose setup, ownership, policy, geometry and transport failures.

Start with the operation result and the active owner. Keep the current valid store while fixing a rejected candidate. A diagnostic describes a specific failure; bypassing validation or casting the result to success cannot repair it.

#Render and composition

SymptomCheckRecovery
Empty canvasRequired store/page, valid page ID, viewport height, scene diagnosticsValidate the candidate, select an existing page and give the viewport measurable height
Missing custom node contentMatching type/fallback definition and registration under the same rootMount Diagram.NodeDef with the matching node-type, and render component content inside its slot
Missing symbol / placeholderRoot registry and explicit contentAvailabilityRegister the supported symbol/type or show the recoverable placeholder; do not invent a serialized component
Injection error in a controlRoot/node/workspace ancestorMove the part under its required owner; use DiagramWorkspaceHost for independent Pages/Layers controls
Inspector does not follow selectionDuplicate model provider or wrong rootReuse the root-provided DiagramSelectionInspectorModel
Unstyled copied controlsShared CSS, chosen preset's dependency imports, application scopeLoad theme then structure then overrides; copy referenced files
Import cannot resolvePublic optional entry or copied application aliasUse Imports; avoid private/ɵ paths
License messageApplication's own key and client license setupConfigure the workspace license provider separately from model validation

The primary entry's DiagramNode/DiagramConnector/DiagramLabel names refer to Vue parts. Use the corresponding ...Record aliases for authored data. The Diagram namespace does not include optional capability parts or copied UI parts. The canonical ancestor/import/projection matrix is UI parts.

#Model and mutation

Diagnostic / stateLikely causeRecovery
invalid-schema, unsupported-versionWrong model shape/version or unsupported fieldConstruct the documented schema or apply an explicit application migration
duplicate-id, invalid-idColliding or invalid authored identitiesAssign distinct IDs across records/labels/ports; retain identity for updates
invalid-reference, ownership-cycleMissing page/layer/parent/endpoint or cyclic ownershipRepair references atomically or use the structural editor
invalid-geometryNon-finite or invalid dimensions/coordinatesValidate numeric input and respect local/world units
resource-limitCodec/format budget exceededReduce the candidate or choose a supported bounded scope; record count alone is insufficient
busyActive editing preview or controlled proposalFinish/cancel/resolve that lane before starting another conflicting operation
stale-revision / staleModel or owner changed during preparationRefresh the active snapshot and prepare a new request
ownership-modeOperation does not match managed/controlled ownershipUse the matching proposal/acknowledgement path
history-unavailableNo history entry or current policy blocks replayInspect canUndo/canRedo and session history availability
disposedOwner was torn downBind the operation to the current owner; never reuse a disposed store/controller

DiagramDiagnostic uses a JSON Pointer path. Store diagnostics add operation codes. Format/export diagnostics have their own severity, fidelity and location fields; do not treat every code as the same enum. Use the exact result union in the API.

#Policy, geometry and input

An unavailable command can be blocked by read-only policy, record/ancestor/layer locks, action constraints or semantic validation. Inspect availability()/ command state() and show the first useful reason. Current policy is rechecked when executing, accepting an import or replaying history. Direct host store writes have separate application authority.

If nested content moves unexpectedly, check parent-local coordinates and the full transform rather than copying world bounds into a local record. Measured content is runtime geometry; invalidate approved measurements after meaningful font/asset changes. Fixed versus dynamic ports use different units. A visual frame is not a structural container or connection endpoint.

If graph shortcuts affect a form, retain native controls or mark the custom interactive region with [data-diagram-interactive]. Allow composition events to finish. If an edited value disappears after remount, distinguish unsaved local drafts from committed Diagram.Field/action data. If graph focus differs from selection, use the documented selection mode rather than assuming they are the same state. See Keyboard and input.

#Async operations and output

SymptomRecovery
Candidate preview visible, current store unchangedPreview is detached; explicitly accept and resolve any approval and controlled-store proposal
Import replaced the page setKeep the root page ID valid and recreate page/session-bound controllers after ownership changes
Late file/provider completionObserve abort/ticket ownership; ignore superseded results and release callbacks
Save resolved but model is still dirtyThe acknowledgement covers its captured checkpoint; later edits remain unsaved
Output misses custom HTMLSelect the rendered viewport with source; detached calls require portable adapters
Rooted output has no unique sourceMount one directly owned viewport or bind source explicitly
Export color scheme failsCheck required CSS/provider conditions and resources; application bindings retain captured values
Transparent JPEG failsSupply an opaque background or use PNG
Large raster plan rejectsReview dimensions/pixel/memory/tile limits; use bounded tile consumption where appropriate
Print is prepared but no print dialogInvoke the browser print action after readiness; preparation is separate from printing
Worker falls back or failsCheck deployed worker URL/CSP, fresh dedicated worker factory, transport version and timeout/fallback result
Export includes fidelity warningsReview approximation/loss before sharing; success is not universal format fidelity

Use the operation's cancel()/dispose() and owned unsubscribe functions on replacement/teardown. Revoke direct-output object URLs and close prepared print models. See SSR and lifecycle.

For timing, mount and resource concerns, record the model, browser, viewport and steps that reproduce the issue. Use the performance reference to choose the workload and view settings to investigate.