fix(server): prioritize pi-multifx-pedal-ui/dist over src/web/ui-dist for Helix UX

Reordered UI_DIST_DIR candidates so pi-multifx-pedal-ui/dist (the
correct Helix-style pedal UI) is checked first. The old priority
put src/web/ui-dist first, which allowed wrong-build deploys to
mask the real UI.

Also add UI_DIST_DIR env var to systemd service for explicit path.
This commit is contained in:
2026-06-13 11:31:39 -04:00
parent 659e53766a
commit 8e2b090eaf
+2 -2
View File
@@ -56,11 +56,11 @@ _ui_dist_env = os.environ.get("UI_DIST_DIR")
if _ui_dist_env:
UI_DIST_DIR = Path(_ui_dist_env).resolve()
else:
# Look relative to backend package first, then common project layouts
# Priority order: pi-multifx-pedal-ui (Helix style) -> src/web/ui-dist (legacy) -> frontend-react (deprecated)
_candidates = [
Path(__file__).resolve().parent.parent.parent.parent / "pi-multifx-pedal-ui" / "dist",
Path(__file__).resolve().parent / "ui-dist",
Path(__file__).resolve().parent.parent.parent / "frontend-react" / "dist",
Path(__file__).resolve().parent.parent.parent.parent / "pi-multifx-pedal-ui" / "dist",
]
UI_DIST_DIR = next((d for d in _candidates if d.is_dir()), None)