chizy7 / chizy7/PinnacleMM

Dashboard static files 404 unless the server runs from the repo root

Open
#79 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue
Dominant language
C++
Stars
14
Forks
12
Avg merge
1h 27m
Merged PRs (30d)
3

Description

## Context

`handleStaticFile` resolves the static root as the relative path `visualization/static`, so it depends entirely on the process working directory. Running `./pinnaclemm --enable-visualization` from `build/` (the documented way) makes every static request 404, including `/index.html`. That is why the docs tell users to open the dashboard HTML straight from the filesystem instead of from the server.

## What to do

- Resolve the static directory relative to the executable location, with a `--static-dir` flag to override it.
- Fall back to the current relative path if neither resolves, and log the directory actually being served at startup.
- Update the README and visualization docs so the dashboard is opened from `http://localhost:/` once this works.

## Notes

Keep this coordinated with the path traversal fix in #76 since both touch the same function.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting handleStaticFile and the documented ./pinnaclemm --enable-visualization invocation from build/. Verify that /index.html is served at the localhost API port, that --static-dir and the fallback behave as specified, and that startup logs the served directory; then update the README and visualization documentation. Coordinate changes with path traversal fix #76, which touches the same function.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, cli, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.