Embed static/ assets or fail loud when static dir is missing #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-12T07:20:42Z - https://github.com/coilysiren/repo-recall/issues/84
Problem
src/routes/mod.rs:23-25readsREPO_RECALL_STATICand silently falls back to the build-timeCARGO_MANIFEST_DIR/staticpath:On any host where the binary was not built (kai-server, anyone installing via brew tap), that fallback path does not exist. The service starts cleanly, HTML pages render referencing
/static/tailwind.css, and every static asset 404s. The dashboard loads unstyled and the failure mode is silent until a human notices.This just bit kai-server: the hand-written
/etc/systemd/system/repo-recall.servicedid not setREPO_RECALL_STATIC(separate issue, filed alongside), the binary fell back to the build path, and the dashboard lost its CSS for an unknown stretch of time.Options
static/viarust-embedand drop the env var entirely. Most robust: nothing to forget, no path drift between hosts, no install-layout assumption.<static_dir>/tailwind.cssdoes not exist. Less invasive, still surfaces the misconfiguration at boot instead of silently.Option 1 is preferred. Option 2 is the minimum bar.
Acceptance
/static/tailwind.csswithout any env var configuration, OR fails to start with a clear error message naming the missing file.