Skip to content

feat(studio): extract dashboard SPA into @ax/studio (Phase 0)#143

Open
Necmttn wants to merge 7 commits into
mainfrom
feat/studio-extract
Open

feat(studio): extract dashboard SPA into @ax/studio (Phase 0)#143
Necmttn wants to merge 7 commits into
mainfrom
feat/studio-extract

Conversation

@Necmttn
Copy link
Copy Markdown
Owner

@Necmttn Necmttn commented Jun 7, 2026

Phase 0 of the studio-desktop plan (docs/superpowers/plans/2026-06-07-studio-desktop-implementation.md, PR #139). Lifts the studio SPA out of the CLI into a first-class workspace app so the daemon, the hosted web deploy, and the future desktop app all consume one package. No SPA logic changes — a move + rewire (plus minor extraction-fallout fixes).

What changed

  • New apps/studio/ package (@ax/studio) — SPA moved from apps/axctl/src/dashboard/web/ (history preserved via git mv).
  • 3-target vite config via STUDIO_TARGET: daemon (base /), web (base /studio/, mock), desktop (base ./, mock). Replaces the bare VITE_STUDIO_MOCK boolean; src/api.ts unchanged.
  • CLI: dashboard:dev/build now delegate to @ax/studio; dropped SPA-only deps from axctl (vite, @vitejs/plugin-react, @tanstack/router-plugin, react-query, react-router, react-dom, @types/react-dom). Kept react + @types/react (TUI).
  • Site: new scripts/stage-studio.ts builds the web target into apps/site/public/studio; supersedes & deletes the PR fix(serve): echo Allow-Private-Network so hosted studio can reach loopback daemon #138 build-studio.ts copy hack. public/studio now gitignored (was committed). _redirects /studio/* rule retained.
  • Shared contract: IngestStreamEvent moved to @ax/lib/shared/ingest-stream-events (single source for daemon producer + studio consumer); axctl re-exports it. Fixed 3 latent null-safety/cast errors the old vite-only (never-typechecked) SPA carried.

Verification

  • bun run typecheck (root): exit 0
  • @ax/studio + axctl typecheck: exit 0
  • All 3 studio builds (daemon/web/desktop) + stage-studio.ts: ✓ (correct asset bases: /assets/, /studio/assets/, ./assets/)
  • Studio tests: 33/33 pass
  • axctl tests: 24 fail — identical to main baseline (pre-existing classifier/git-env/DB tests, unrelated to this change)

Next: Phase 1 (Electron shell) builds on apps/studio's build:desktop target.

Refs #129. Builds on the plan in #139.

🤖 Generated with Claude Code

Necmttn added 7 commits June 7, 2026 19:27
… type errors

The SPA imported axctl's ingest/stream-events.ts via a relative path that broke
on the move (type-only, so vite builds were unaffected but tsc failed). Move the
producer/consumer event contract into @ax/lib/shared as the single source;
axctl re-exports it (zero importer churn). Also fix 3 pre-existing null-safety/
cast errors the old vite-only (never-typechecked) SPA had latent.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 7, 2026

Deploying ax with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4b057b7
Status: ✅  Deploy successful!
Preview URL: https://89ebd271.ax-62d.pages.dev
Branch Preview URL: https://feat-studio-extract.ax-62d.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant