Diagnostics and recovery
Preparation checks the envelope, XML, expressions, supported properties, component definitions, and reachable host dependencies. Dynamic prop values and action payloads are also validated when evaluated or invoked.
| Symptom | First thing to check |
|---|---|
| Unknown component | Include its definition or register its native adapter before session creation |
| Unknown action/route | Match the document's name with the host registration |
| Wrong prop type | Use bind-* for booleans, numbers, arrays, and records |
| Empty or invalid document | Supply one rendered root; definitions alone don't mount |
| Lost local state | Check identity, if removal, source replacement, and session closure |
| Scroll surface won't size | Give its parent and viewport finite bounds |
| Browser engine won't load | Check Wasm URL, MIME type, CORS, and CSP |
Handle invalid documents
Display a host-owned fallback for invalid initial documents. Preserve a known-good document where appropriate. Report source locations and diagnostics in development without exposing credentials or private user data.
The website playground retains the last valid preview when an edit fails. Reset restores the original example and creates a fresh sandbox. Open Environment & events to inspect emitted output and bundled mock service calls.
Test interactions as well as syntax
Syntax validation alone doesn't prove a workflow. Verify expected visible controls, action payloads, error paths, and state transitions. Then run the relevant native checks for actual editing, focus, accessibility, presentation, and layout behavior.
The testing guides distinguish automated evidence, measured environments, and outstanding release gates.