Add studio ui local web surface + converge desktop/local backend (PoC)#3953
Open
youknowriad wants to merge 6 commits into
Open
Add studio ui local web surface + converge desktop/local backend (PoC)#3953youknowriad wants to merge 6 commits into
youknowriad wants to merge 6 commits into
Conversation
…ed @studio/common backend Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ared UI) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dia/read, contain temp deletes Addresses the CodeQL alerts on PR #3953 (path injection, SSRF). The local server is loopback-only but reachable cross-origin from the browser, so: CORS is now allowlisted (disallowed origins rejected), the shared REST proxy validates that a request path stays within the site's REST root, the arbitrary-file /media/read endpoint is removed (unused), and temp-dir cleanup + blueprint extraction are path-contained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
📊 Performance Test ResultsComparing ce8fe3a vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
Both surfaces now record the agent's weekly/monthly unique-user stats against the same app.json store via a shared appBumpStatsProvider in @studio/common, so a user is counted once per period regardless of surface (previously studio ui wrote to the CLI's unrelated cli.json, which double-counted users on both). Only the surface differs, selecting the studio-code-ui-* vs studio-code-cliui-* groups; the provider is no longer injected per host. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 25, 2026
Removes the "shared between the desktop app and the local server / now lives in @studio/common / re-export keeps imports working" commentary across the extracted modules and their desktop bindings; shared-module headers keep a one-line description and any genuine behavior notes (storage/lockfile, surface→stat-group mapping, the @sentry/core rationale). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 29, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
How AI was used in this PR
Built almost entirely with Claude Code, pairing with @youknowriad. AI authored the
studio uiserver, the@studio/commonextractions, the connector wiring, the auth flows, and the design doc.Reviewers should start by reading the design doc to understand how everything fits together. They should pay particular attention to:
cli-site-creator,cli-site-editor,wordpress-rest-api,is-installed, the preview/sync IPC handlers). They are typecheck + unit-test verified and tested quickly.Proposed Changes
Adds a new
studio uisurface: the same agentic UI (apps/ui) the desktop shows, served in a browser against the user's real local sites by a small server (apps/local) that is bundled into the CLI and launched withstudio ui.More importantly, it converges the desktop and local backends. Site, session, agent, preview, sync, REST-proxy, app-detection, blueprint, and media logic now live once in
@studio/common; the desktop and the local server are thin transports (IPC vs HTTP/SSE) over that same code and the same forked CLI. This stops the two surfaces from drifting and is the main point of the PR.User-facing (local web):
studio uiopens the agentic UI in the browser. Create / delete / duplicate / update sites, export & import, open folder/editor/terminal, preview, sync (pull/push), blueprint-based creation, and WordPress.com login (redirect-based) all work against local sites.Also adds a design doc,
docs/design-docs/studio-apps-and-surfaces.md, mapping the four surfaces (desktop, CLI, local web, hosted), the shared layers, and the convergence.Testing Instructions