Repository navigation
v1.8.3
v1.8.3 — URL prefix, exception handling, and filesystem fixes
Bug fixes for other-environment deployments. All changes are backward-compatible — no TOML schema changes.
Fixed
- URL prefix missing in generated links —
_public_urls()produced URLs without the/finances/nginx proxy prefix (e.g./projection.html→/finances/projection.html). AddedNWN_PUBLIC_PATH_PREFIXenv var; default is/financesfor backward compat, set to empty string for direct localhost deployments) - "Internal Server Error" JSON parse crash —
api_save_quick_controls()had no exception handler around its main logic; any error returned FastAPI's plain-text 500 page instead of JSON, crashing the JS client. Now returns proper JSON error responses (404/400/500) apiGet()andapiPost()silent crash on non-JSON — both calledr.json()without checkingresponse.okor content-type. Now validate both before parsing[Errno 9] Bad file descriptor—os.fsync()on read-only file descriptors fails under Docker overlay2 and NFS filesystems. Wrapped both fsync calls in try/except OSError (best-effort flush)- Shell page iframe shows
{"detail":"Not Found"}—projectionUrlFor()built bare relative URLs that resolved incorrectly from sub-path shell pages. Now usesnew URL(path, window.location.href)for correct resolution in all deployment modes - Compare page sidecar URLs wrong —
sidecarBase()used bare relative paths; samenew URL()fix /compare.htmland/finances/scenariosnot served by FastAPI — added missing route and StaticFiles mount for direct deployments without nginx
Files changed: admin_app.py, run.py, src/scenario_shell.py, src/version.py, templates/setup_panel.html