[nu-demo] UX: every island should render a polished empty/error state, never a raw stack trace #124
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Multiple islands currently surface raw backend errors to the user as polished-app-style red text. Examples seen during 2026-04-23 demo:
Failed to load island WASM 'room': JsValue(Error: Island not found: room (HTTP 404)) at eval (eval at <anonymous> (https://heronu.gent01.grid.tf/hero_os/ui/wasm/hero_os_app.js:551:25), <anonymous>:4:23)Failed to list PDF: HTTP 404: Socket 'rpc.sock' not found for 'hero_office'Waiting for hero_browser... Socket 'ui.sock' not found — service may be restarting. This page will refresh automatically.(this one is actually ok — states it's transient)HTTP 404: Socket 'ui.sock' not found for 'hero_agent'Failed to load island: serviceswith the full JsValue chain exposedError: expected value at line 1 column 1— JSON parse error shown verbatimProblem
These errors are accurate and useful to developers, but:
What we want
A consistent convention for three distinct states, per island:
hero_voice…" with quiet auto-retry, no raw errors. Fall back to persistent "Unavailable" after N retries with a "Retry" button.Proper fix
hero_archipelagos_core(or similar) exposes an<EmptyState>,<LoadingState>, and<ServiceUnavailable>component trio. Every island imports and uses these instead of writing its own<div class="error">{err}</div>.Debug-printed errors in the DOM. Log them to console, show a friendly message.Demo workaround
None — this is cosmetic for now. The functional fixes (start the missing service, populate the seed) make most of these go away. But until the helper crate exists, every island re-implements error text ad-hoc.
Scope
This is an epic, not a single PR. Triage candidates in priority order:
hero_os_appWASM-missing fallback (today's Rooms 404)Filed 2026-04-23 nu-shell demo. Signed-off-by: mik-tf
Moved to hero_demo#15 — see lhumina_code/hero_demo#15