nexus/ui/public
Nexus Dev 3d2117ee9f fix(nexus): auto-bootstrap invite and vite onnxruntime middleware
Zero-terminal first boot. Previously the bootstrap_ceo invite had to be
created via a CLI command (paperclipai auth bootstrap-ceo) and the UI
showed a code block instructing the user to run it. Nexus is meant to
be zero-terminal, so the server now auto-creates the invite on startup
when no instance admin exists and exposes its relative path through
/api/health. BootstrapPendingPage redirects straight to /invite/{token}.
The CLI command is left intact for headless/SSH-only setups.

Invite flow fixes that surfaced during testing:

  - InviteLanding's invite query had default React Query refetch
    behavior. After a successful bootstrap accept, the invite is marked
    accepted server-side, so the refetch returned "not available" and
    shadowed the success screen, making it look like the bootstrap had
    failed when it actually succeeded. Set staleTime: Infinity +
    refetchOnWindowFocus/Mount/Reconnect: false so the first fetch is a
    one-shot snapshot.

  - Reordered the render checks so result?.kind === "bootstrap" / "join"
    are evaluated before the invite-availability error check — defensive
    against any stray refetch that still leaks through.

  - On bootstrap success, window.location.replace("/") lands the new
    admin directly on the board; the "Bootstrap complete" confirmation
    screen is now an unreachable safety net.

Vite onnxruntime middleware replaces the earlier public/ dump. The
previous commit put ort-wasm-simd-threaded.{mjs,wasm} in ui/public/ so
VAD's onnxWASMBasePath: "/" would find them. That works at runtime but
trips vite's dep optimizer: it scans onnxruntime-web, resolves the
dynamic import string to the public asset, and errors with "files in
/public should not be imported from source code." Remove the files and
add a vite plugin (configureServer middleware) that serves the two URLs
straight from node_modules/.pnpm/onnxruntime-web@*/. Runtime keeps
working and the files never enter vite's module graph.

Production build caveat: the middleware only runs in dev. When building
a static dist for production, the wasm files will need a different
mechanism (e.g. generateBundle hook). Not addressed here.

Also bundled (load-bearing for LAN browser testing):

  - ui/src/lib/queryKeys.ts: add missing 'nexus' group. useNexusMode
    referenced queryKeys.nexus.settings since commit 7bb72a5a (Phase
    33-02) but the key was never added. Caused a blank screen crash on
    any page that mounts Sidebar.

  - ctl.sh: read PORT from .env instead of hardcoding 3100, and read it
    once at the top so every subcommand honors it. Fixes the Version /
    Mode showing '?' in status output after the port move to 6100.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:50:28 +00:00
..
brands Add OpenCode provider integration and strict model selection 2026-03-05 15:24:20 +01:00
android-chrome-192x192.png Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form 2026-02-18 13:02:23 -06:00
android-chrome-512x512.png Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form 2026-02-18 13:02:23 -06:00
apple-touch-icon.png Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form 2026-02-18 13:02:23 -06:00
favicon-16x16.png Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form 2026-02-18 13:02:23 -06:00
favicon-32x32.png Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form 2026-02-18 13:02:23 -06:00
favicon.ico Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form 2026-02-18 13:02:23 -06:00
favicon.svg feat(03-01): add branding dep and replace HTML/asset branding with Nexus 2026-04-04 03:55:41 +00:00
silero_vad_legacy.onnx feat(37-01): install VAD library, copy ONNX assets, configure Vite COOP/COEP headers 2026-04-04 03:55:50 +00:00
silero_vad_v5.onnx feat(37-01): install VAD library, copy ONNX assets, configure Vite COOP/COEP headers 2026-04-04 03:55:50 +00:00
site.webmanifest feat(03-01): add branding dep and replace HTML/asset branding with Nexus 2026-04-04 03:55:41 +00:00
sw.js feat(26): merge worktree code from plans 26-00, 26-01, 26-03 2026-04-04 03:55:48 +00:00
vad.worklet.bundle.min.js feat(37-01): install VAD library, copy ONNX assets, configure Vite COOP/COEP headers 2026-04-04 03:55:50 +00:00
worktree-favicon-16x16.png Add worktree-specific favicon branding 2026-03-10 16:15:11 -05:00
worktree-favicon-32x32.png Add worktree-specific favicon branding 2026-03-10 16:15:11 -05:00
worktree-favicon.ico Add worktree-specific favicon branding 2026-03-10 16:15:11 -05:00
worktree-favicon.svg Add worktree-specific favicon branding 2026-03-10 16:15:11 -05:00