chore: untrack dashboard build output (stale by 13 commits on the pip path) (#151)

* chore(dashboard): untrack committed frontend build output

work/meshai/dashboard/static/ held committed vite build artifacts
(index.html + hashed assets/*.js|css + copied public/ images) that were
last built 2026-07-07 (PR #87), 13 frontend commits ago. Docker builds
the frontend fresh and overwrites these on every image build, but the
pip install -e . path (documented in README Quick start) ships this
stale directory verbatim via [tool.setuptools.packages.find] include.

The root .gitignore already had a rule for this
("meshai/dashboard/static/") but it silently stopped matching when
2e1fb325 moved the source tree into work/ -- gitignore patterns
containing a "/" are anchored to the .gitignore's own directory, so the
unprefixed pattern only ever matched a repo-root meshai/dashboard/static/
that hasn't existed since that move. Fixed by prefixing with work/,
matching the existing work/data/secrets/.env convention elsewhere in
the file.

Every file under static/ is generated: assets/* and index.html come
from `vite build` (outDir: ../meshai/dashboard/static, emptyOutDir:
true, confirmed in dashboard-frontend/vite.config.ts), and the two
PNGs are vite's copy of dashboard-frontend/public/*.png (byte-identical
to the source). None of it is hand-authored, so the whole directory is
untracked rather than partially.

Blobs remain in git history; files remain on disk, just untracked.

* docs(readme): document the required frontend build for pip installs

work/meshai/dashboard/static/ is no longer committed (previous commit),
so the pip install -e . Quick start path now needs an explicit frontend
build step or the dashboard UI silently doesn't exist. Add it, with a
note clarifying the bot/API still work without it -- only the web UI is
affected. Docker is unaffected (already builds the frontend in its own
stage).

* fix(dashboard): log clearly when the built frontend is missing

Previously, if meshai/dashboard/static/ (or its index.html) was absent,
create_app() silently skipped mounting /assets and registering the
root/catch-all routes -- no log, no error. Any request to "/" would
just 404 with FastAPI's generic "Not Found", giving no clue why.

This was latent before (Docker always builds the frontend, and a git
checkout with the artifacts committed always had the directory), but
now that static/ is untracked, a fresh pip install without the frontend
build step will hit this path as its first real-world trigger. Add a
warning log naming the missing path and the exact build command, and
make clear the bot/API are unaffected -- only the dashboard UI is
absent.

* docs(readme): move frontend-build note to root README

work/README.md is about to become a symlink to root README.md on
docs/single-readme. Retarget the frontend-build documentation added in
56eba0f7 from work/README.md to root README.md so it isn't silently
dropped when that symlink lands.

---------

Co-authored-by: Matt Johnson <mj@k7zvx.com>
This commit is contained in:
malice 2026-07-17 14:14:16 -06:00 committed by GitHub
commit 18e9ae9127
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 501 deletions

9
.gitignore vendored
View file

@ -58,8 +58,13 @@ config.yaml
*.pem
*.key
# Frontend build output (built in Docker via multi-stage)
meshai/dashboard/static/
# Frontend build output (built in Docker via multi-stage, or manually for
# the pip install path -- see README "Quick start"). Anchored with the
# work/ prefix: the bare "meshai/dashboard/static/" pattern silently
# stopped matching anything after 2e1fb325 moved the source tree into
# work/, which is how these build artifacts got committed in the first
# place.
work/meshai/dashboard/static/
# Node (frontend deps, reinstalled via package-lock.json / npm ci)
node_modules/