Skip to content

fix: Tauri viewer shows "Not Found" instead of compile loading page (bypasses HTTP server) #156

Closed

Description

@zackees

Context

Running fastled and selecting a sketch opens the desktop viewer window showing a bare "Not Found" instead of the compile progress page.

This looks like a regression of #149, but it isn't — #149's instant-launch loading page was only wired into the axum HTTP server. The Tauri viewer never touches that server:

  • compile_and_serve (crates/fastled-cli/src/commands.rs:83) launches the Tauri viewer pointed at the output dir before the first compile.
  • The viewer serves files straight from disk via its own fastled:// custom protocol (crates/fastled-cli/src/tauri_viewer.rs:43) and loads fastled://localhost/index.html.
  • On a fresh sketch, fastled_js/index.html doesn't exist yet, so the protocol handler returns the literal body "Not Found" (tauri_viewer.rs:57).
  • The viewer also has no SSE subscription, no status polling, and no reload trigger — so even after the build succeeds it stays stuck on "Not Found".

So the loading page, live compile log streaming (#153 / PR #154), and failure UX all work in a regular browser but never appear in the viewer window, which is the default UX.

Proposal

Point the Tauri webview at the HTTP server URL (http://{addr}) instead of the fastled:// file protocol:

  • launch_tauri_viewer takes the server URL rather than a directory; the viewer subcommand accepts a URL.
  • The webview loads WebviewUrl::External(http://{addr}).
  • Remove (or stop using) the custom protocol handler for this path — the HTTP server already serves the loading page when index.html is missing, streams build logs over SSE, auto-reloads on success, and sets the COOP/COEP headers (server.rs:402-407) the protocol handler was duplicating by hand.

This gives the viewer and browser a single shared code path for loading/compiling/error states.

Acceptance criteria

  • Fresh sketch (no fastled_js/index.html): viewer window shows the loading/compiling page immediately, never "Not Found"
  • Viewer shows live build log lines via SSE during compile
  • On build success, viewer auto-navigates/reloads to the built sketch
  • On fatal compile/link error, viewer shows the error state from feat: live colored compile log streaming in browser loading page (spinner only, no progress bar) #153 (no false success, no blank page)
  • SharedArrayBuffer still works in the viewer (COOP/COEP via HTTP server headers)

Decisions

Related issues

Activity

  1. added a commit that references this issue on Jun 11, 2026
    0332caf
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions