Skip to content

v1.8.3

Choose a tag to compare

@LemurTech LemurTech released this 21 Jul 01:55
· 76 commits to main since this release

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). Added NWN_PUBLIC_PATH_PREFIX env var; default is /finances for 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() and apiPost() silent crash on non-JSON — both called r.json() without checking response.ok or 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 uses new URL(path, window.location.href) for correct resolution in all deployment modes
  • Compare page sidecar URLs wrong — sidecarBase() used bare relative paths; same new URL() fix
  • /compare.html and /finances/scenarios not 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