Skip to content

Frontend variant (blocked): Blazor WebAssembly #160

Open

Description

@kamkie

Status: BLOCKED — blocked: needs-contract-change

Proposed and deliberately not accepted as-is. Blazor WebAssembly is architecturally a fine fit (it is a client-side SPA holding no auth state) — the block is a single confirmed contract-level CSP conflict, documented here with the implementation sketch and the exact decision that would unblock it.

Stack: C# compiled to WebAssembly, running in the browser. Would pair the existing backends/dotnet and gateways/yarp for an end-to-end .NET stack.

Why it is blocked

Every gateway serves SPA/auth responses under a fixed, shared Content-Security-Policy (frontends/README.md, docs/ARCHITECTURE.md):

default-src 'self'; base-uri 'self'; object-src 'none'; frame-ancestors 'none'

The blocker is confirmed for the current runtime. Microsoft's .NET 10 Blazor CSP guidance explicitly requires 'wasm-unsafe-eval' in script-src for the client-side Blazor Mono runtime to function. Stackverse defines no script-src override, so default-src 'self' is the fallback and does not permit WebAssembly evaluation.

A browser spike behind the real gateway remains useful as executable evidence across Chromium, Firefox, and WebKit, but it no longer determines the issue's classification: current supported-platform guidance already establishes the contract conflict.

(The no-inline-script / no-inline-style CSP rules are satisfiable — Blazor boots from external blazor.webassembly.js and supports plain external CSS — so those are not the blocker.)

How an implementation could look (everything except the CSP)

  • frontends/blazor-wasm: a Blazor WebAssembly project; dotnet publish emits static wwwroot assets (.wasm, .dll/.dat, framework JS).
  • Final image = the standard static-file server on internal port 8080 with SPA fallback (identical image contract to the other frontends); build with the repo root as context to bundle spec/design.
  • Load spec/design/tokens.css + spec/design/stackverse.css verbatim; build markup from sv-* classes; theme switcher (auto/light/dark) before first paint via a same-origin static boot script.
  • Data: typed HttpClient to same-origin /api/v{n} JSON; v2 cursor-paginated bookmarks; GET /auth/session on startup; login = full navigation to /auth/login; logout = POST /auth/logout; read XSRF-TOKEN cookie and echo X-XSRF-TOKEN; 401 = logged-out.
  • i18n: GET /api/v1/messages/bundle with If-None-Match; all 11 required screens incl. the role-gated admin section.
  • Acceptance = green under the e2e suite in a composed stack (any backend + any gateway).

What would unblock it

Unblocking currently requires adding 'wasm-unsafe-eval' (or a future supported equivalent) to the gateway CSP's script-src. That CSP is shared across every gateway and every frontend, so relaxing it is a security-relevant docs/ARCHITECTURE.md contract change that, per AGENTS.md, obligates all implementations and is rejected by default. It needs an explicit decision weighing the WebAssembly-eval relaxation against the strictness the repo currently advertises.

If a future supported Blazor runtime removes this requirement, revisit the official guidance and verify the published app behind the real gateway before promoting this to a normal Add frontend variant issue.

References

Activity

  1. added
    enhancementNew feature or request
    priority: lowBacklog — revisit when the matrix grows
    blocked: needs-contract-changeNeeds a change to a frozen contract surface (e.g. gateway CSP); deliberate, rejected by default.
    on Jul 5, 2026
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

    blocked: needs-contract-changeNeeds a change to a frozen contract surface (e.g. gateway CSP); deliberate, rejected by default.enhancementNew feature or requestpriority: lowBacklog — revisit when the matrix grows

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions