Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#1818 serve --dashboard: dashboard assets missing from release binary, always 404

Opened by nagyv · 8/25/2026· Shipped 8/25/2026

Summary

swamp serve --dashboard (or dashboard: true in .swamp/serve.yaml) always returns 404 Dashboard not built. Run: cd packages/dashboard && npm run build in the released binary. The dashboard static assets are not included in the deno compile output, and the path the server resolves is inside the compiled virtual filesystem, so it can never be satisfied on an end-user machine.

Version: 20260825.013404.0-sha.59b73704 (Linux x86_64, installed at ~/.local/bin/swamp)

Reproduce

  1. .swamp/serve.yaml with dashboard: true
  2. swamp serve — logs Dashboard enabled at "http://127.0.0.1:9090/dashboard"
  3. curl -i http://127.0.0.1:9090/dashboard
HTTP/1.1 404 Not Found
content-type: text/plain
content-length: 64

Dashboard not built. Run: cd packages/dashboard && npm run build

The rest of the server is healthy — GET / returns the normal status/scheduling JSON.

Root cause

In src/cli/commands/serve.ts:

const dashboardDistDir = dashboardEnabled
  ? resolve(import.meta.dirname ?? ".", "..", "..", "..", "packages", "dashboard", "dist")
  : null;

That arithmetic is correct in a source checkout (root/src/cli/commands -> root -> root/packages/dashboard/dist), which is why it works in development.

In the compiled binary the module URL is file:///tmp/deno-compile-swamp/src/cli/commands/serve.ts (confirmed via a stack trace from an EADDRINUSE startup error), so dashboardDistDir resolves to /tmp/deno-compile-swamp/packages/dashboard/dist — a path inside the deno-compile vfs. Grepping the 366 MB binary for packages/dashboard/dist and for any embedded dashboard asset returns zero hits, so packages/dashboard/dist was never included in the compile.

Not workaroundable by users

Creating /tmp/deno-compile-swamp/packages/dashboard/dist/index.html on the real filesystem does not help — still 404. An strace -f -e trace=openat of swamp serve during a /dashboard request shows no openat syscall at all for that path: Deno's vfs intercepts reads under the compile root and does not fall back to the real disk.

So the only way to get the dashboard today is to run the CLI from a source checkout.

Suggested fix

Include packages/dashboard/dist in the deno compile --include set for the release build (after building the dashboard in CI), so the vfs read succeeds.

Optionally, make the failure message honest for binary installs — the current text tells users to run an npm build in a directory they do not have.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 6 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

8/25/2026, 4:34:02 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack728/25/2026, 3:14:29 PM
Editable. Press Enter to edit.

stack72 commented 8/25/2026, 4:34:11 PM

Thanks @nagyv for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.