This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Repository navigation
Conversation
Adds the same env-var-driven UI override that sutando's web-server has (see josh/migrate-to-react on sonichi/sutando, commit c350a10). With this in place, stando can serve any UI bundle by exporting: CLIENT_DIST_DIR=/abs/path/to/dist bash src/startup.sh before launching the voice agent. Without the env var, behavior is unchanged — stando serves its bundled client/dist/ as before. Phase 1.7 of the OSS sync roadmap. Unblocks the workflow where production stando deployments override the default UI with a private branded dist while developer / demo builds still serve the stando default UI from client/. Mechanics ported verbatim from sutando: - resolveClientDistDir() function with tilde expansion - module-level `let CLIENT_DIST_DIR = resolveClientDistDir()` so existing references keep working - per-call re-resolve inside startWebServer() so tests + dynamic env changes pick up the latest value - JSDoc updated to document the override Submodule auto-init block from sutando's startup.sh deliberately NOT ported — stando's client/ is still vendored (not a submodule), and the goal is independence from OSS UI updates, not auto-sync. Co-authored-by: Cursor <cursoragent@cursor.com>
Ports sutando/tests/client-dist-dir-override.test.ts verbatim so the private repo's pluggability contract stays in lockstep with OSS. Same 3 cases: custom dir override serves, default fallback serves bundled UI, path traversal blocked. All 3 pass against the new resolveClientDistDir() in src/web-server.ts. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 3, 2026
bassilkhilo-ag2
approved these changes
Jun 4, 2026
bassilkhilo-ag2
left a comment
There was a problem hiding this comment.
Clean. Module-level init + re-resolve inside startWebServer() is the right pattern for testability. Tilde expansion is necessary (node path.resolve doesn't expand ~). Test coverage is thorough — override path, fallback, and re-read between server instances. Nothing unexpected in the 2-file diff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clean cherry-pick of PR #68 (
josh/phase-1.7-client-dist-dir-pluggability) onto current main. The original PR included PR #69's stando-ui extraction as ancestor commits, making the diff show 109 files; this branch isolates the actual 2-file change.What changed:
src/web-server.ts: readsCLIENT_DIST_DIRenv var to locate the UI bundle; falls back toclient/dist(unchanged behavior)tests/client-dist-dir-override.test.ts: 130-line regression test covering the override and default pathsWhy: Allows serving any UI bundle (e.g. stando-ui builds) without source edits:
Closes #68 (supersedes it with a clean diff).
Test plan
npm test—client-dist-dir-override.test.tspassesCLIENT_DIST_DIR=/tmp/test-ui bash src/startup.sh— web server serves from the override path🤖 Generated with Claude Code