Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

refactor: extract conversation UI to private stando-ui repo - #69

Merged
jgluck96 merged 1 commit into
josh/phase-1.7-client-dist-dir-pluggabilityfrom
josh/extract-client-to-stando-ui
Jun 1, 2026
Merged

jgluck96 merged 1 commit into
josh/phase-1.7-client-dist-dir-pluggabilityfrom
josh/extract-client-to-stando-ui

Conversation

@jgluck96

@jgluck96 jgluck96 commented Jun 1, 2026

Copy link
Copy Markdown

Summary

Moves the React frontend (client/, 97 files) out of this repo into the private AG2Platform/stando-ui repo and plugs it back in via CLIENT_DIST_DIR. The backend and UI now ship/version independently — the private UI no longer has to stay in sync with the OSS sutando UI.

⚠️ Required before the release workflow will pass

.github/workflows/release.yml now checks out the private stando-ui repo to build the app bundle's UI. Add a repo secret STANDO_UI_TOKEN — a PAT (or fine-grained token) with read access to AG2Platform/stando-ui. The default GITHUB_TOKEN can't reach another repo. Without it, the "Check out stando-ui" step fails.

How the UI plugs back in

# Build the private UI once
git clone git@github.com:AG2Platform/stando-ui.git    # next to stando/
cd stando-ui && pnpm install && pnpm build            # -> dist/

# Run stando — startup.sh auto-detects ../stando-ui/dist, or set it explicitly
CLIENT_DIST_DIR=/abs/path/to/stando-ui/dist bash src/startup.sh

What changed (besides the 97 client/ deletions)

File Change
src/web-server.ts Default dist = ../client/dist (present only in the packaged app); dev checkout uses CLIENT_DIST_DIR or gets a 503 with a build hint. JSDoc/comments updated.
src/startup.sh Auto-detects a built sibling ../stando-ui/dist when CLIENT_DIST_DIR is unset; warns otherwise. Explicit override always wins.
app/build-app.sh Sources UI from CLIENT_DIST_DIR or a sibling stando-ui checkout (builds it), stages it at the bundle's client/dist path so the shipped .app is self-contained with no runtime env var.
.github/workflows/release.yml Checks out + builds AG2Platform/stando-ui, passes its dist via CLIENT_DIST_DIR. Needs STANDO_UI_TOKEN (see above).
docs/WIRE.md New — the wire contract any UI must honor (ported from OSS).
package.json Drop build:client / dev:client scripts.
pnpm-workspace.yaml Drop client workspace member; lockfile re-pruned.
.env.example, CONTRIBUTING.md, .gitignore Documented CLIENT_DIST_DIR; removed dead client refs.

Test plan

  • pnpm exec tsc --noEmit — clean except the pre-existing @ai-sdk/openai error on voice-agent.ts:48 (unrelated, present on main)
  • pnpm exec tsx --test tests/client-dist-dir-override.test.ts — 3/3 pass
  • pnpm install --frozen-lockfile — passes after pruning the stale client importer
  • bash -n src/startup.sh + bash -n app/build-app.sh — syntax OK
  • End-to-end: server serves the real stando-ui/dist (200, #root div, hashed .js asset with correct MIME)
  • Reviewer: add STANDO_UI_TOKEN secret, then run the release workflow to confirm the app bundle stages the UI
  • Reviewer: bash src/startup.sh from a fresh checkout with a sibling built stando-ui → :8080 serves the UI

Related

Made with Cursor

The React frontend (client/) is moved out of this repo into the private
AG2Platform/stando-ui repo (full history preserved via git subtree split)
and plugs back in via CLIENT_DIST_DIR — the same pluggability seam ported
in #68. Stando's backend and the UI now ship and version independently;
the private UI no longer has to track the OSS sutando UI.

Removals:
- client/ (97 files) — now lives at AG2Platform/stando-ui
- package.json: build:client / dev:client scripts
- pnpm-workspace.yaml: client workspace member (lockfile re-pruned)

Rewiring so everything still works:
- web-server.ts: default dist resolves to ../client/dist (present only in
  the packaged app, staged by build-app.sh); a dev checkout sets
  CLIENT_DIST_DIR or gets a 503 with a build hint. Docs/JSDoc updated.
- startup.sh: auto-detects a built sibling ../stando-ui/dist when
  CLIENT_DIST_DIR is unset; otherwise warns. Override always wins.
- app/build-app.sh: sources the UI from CLIENT_DIST_DIR or a sibling
  stando-ui checkout (builds it), stages it at the bundle's client/dist
  path so the shipped app stays self-contained with no runtime env var.
- .github/workflows/release.yml: checks out + builds AG2Platform/stando-ui
  and passes its dist via CLIENT_DIST_DIR. REQUIRES a new repo secret
  STANDO_UI_TOKEN (PAT with read access to the private UI repo) — the
  default GITHUB_TOKEN can't reach another repo.
- docs/WIRE.md: the wire contract any UI must honor (ported from OSS).
- .env.example / CONTRIBUTING.md / .gitignore: documented + cleaned up.

Verified: tsc clean (pre-existing @ai-sdk/openai error unrelated), the
CLIENT_DIST_DIR test passes 3/3, frozen lockfile installs, and the server
serves the real stando-ui dist end-to-end (200 + hashed assets).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant