Skip to content

dx: error overlay — show compile errors in the browser #44

@justrach

Description

@justrach

Problem

When a page has a compile error, the browser shows a blank page or stale content. The developer has to check the terminal to see the error.

Proposed Solution

When `zig build` fails, display the error message directly in the browser via the SSE hot-reload channel:

  1. Watcher detects file change → triggers rebuild
  2. If build fails, capture stderr
  3. Send error message over SSE
  4. Client-side script shows a styled error overlay with:
    • File path + line number
    • Error message
    • Code snippet with the error highlighted
    • "Fix and save to retry" hint

Similar to Next.js / Vite error overlay but for Zig compile errors.

Complexity

Low. The SSE channel exists. Just need to capture build stderr and send it as a different event type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions