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:<api-port>/ once this works.
Notes
Keep this coordinated with the path traversal fix in #76 since both touch the same function.
Context
handleStaticFileresolves the static root as the relative pathvisualization/static, so it depends entirely on the process working directory. Running./pinnaclemm --enable-visualizationfrombuild/(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
--static-dirflag to override it.http://localhost:<api-port>/once this works.Notes
Keep this coordinated with the path traversal fix in #76 since both touch the same function.