Skip to content

GUI: model browser-preview as a first-class state #249

Closed

Description

@CameronBrooks11

Part of #246. Browser-preview mode is not modeled as its own first-class state — it leaks raw runtime errors and renders inconsistent status signals.

Findings

  • [MED · runtime, live-QA] Raw invoke TypeErrors leak in browser preview. Clicking Generate preview, or simply switching to the Machine tab (auto list-ports), fires Tauri calls that throw "Cannot read properties of undefined (reading 'invoke')" — surfaced via error toast + inline "Preview failed" state + the output log. The browser-preview banner already says compute/file/machine need tauri dev, so these actions should be disabled or short-circuited with a friendly "unavailable in browser preview" message instead of a raw TypeError. (Reproduced live at localhost:5173.)
  • [MED · ia-flow] Browser-preview status dot is red (error) while the banner treats preview as info. src/state/backend-health.svelte.ts:32 reuses status="unavailable" → StatusBar maps data-status="unavailable" → --status-error → red dot, contradicting the info-tone banner for the same expected state.
  • [LOW · ia-flow] App banner misfiled and half-named. BackendHealthWarning.svelte lives under components/machine/ but is rendered at app scope (App.svelte:106) for all workspaces and covers both info + warning states — move to shell/ and rename (e.g. BackendStatusBanner).
  • [LOW · ia-flow] Stale cliText identifier in StatusBar.svelte:12 after the CLI→Backend rename (user-facing strings are already correct) — rename to backendText/statusText.

Acceptance

  • In browser preview (isTauri() false / isBrowserPreview), gate compute + serial actions: disable the buttons or short-circuit with a clear "unavailable in browser preview" message — no raw invoke TypeError reaches toast/log/inline state.
  • Give browser-preview its own dot treatment (e.g. data-status="preview" / muted-blue) so the status bar matches the info banner.
  • Move + rename the banner component; rename cliText.
  • Full gate + live QA at localhost:5173 (verify no error toasts on Machine-tab entry / Generate-preview).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions