Add the Artifacts console pages - #1472
Draft
RhysSullivan wants to merge 4 commits into
Draft
Conversation
RhysSullivan
force-pushed
the
artifact-render-ui
branch
from
July 28, 2026 07:10
a8e153d to
be86f24
Compare
RhysSullivan
force-pushed
the
artifact-console
branch
from
July 28, 2026 07:10
046d533 to
43df520
Compare
This was referenced Jul 28, 2026
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
executor-cloud | 705fd94 | Jul 28 2026, 07:11 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 705fd94 | Commit Preview URL Branch Preview URL |
Jul 28 2026, 07:11 PM |
Contributor
Cloudflare preview
Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
The MCP-Apps shell imports @tailwindcss/browser, which touches document at import scope. Importing the shell statically from the root routes put it in cloud's SSR graph, so every document request failed with "document is not defined" while the entry graph loaded. The renderer seam now carries an async loader instead of a component. The composition roots register the shell through a dynamic import that only resolves in the browser, and the artifact page renders a placeholder frame server-side, hydrating the shell behind ClientOnly and Suspense.
The artifact page mounted McpAppsShell as a React component in the console document. The shell is written to be its own document: it imports @tailwindcss/browser and its globals.css at import scope, and themes by toggling document.documentElement. Inlined, its palette overwrote the console's grayscale tokens for the rest of the session, and its content-height notifications reached no host, so tall artifacts clipped. The page now loads the built shell document — the same bytes served as ui://executor/shell.html — into a sandboxed iframe and implements the host half of the protocol with ext-apps' AppBridge over PostMessageTransport. The stored source arrives as tool-input plus a tool-result carrying structuredContent.code, exactly as after a render-ui call, so the shell takes one path in every host. callServerTool routes to the existing HTTP mapping, size-changed drives the iframe height, and theme travels as host context. A new mcpAppsShellAsset vite plugin builds the shell and emits it into the client output (client only; the worker never serves it), exporting just its hashed URL so the document stays out of the console's JS. Two shell bugs the host exposed: - The shell registered its one-shot tool-input/tool-result handlers in a mount effect, after connect() had completed the handshake, so a prompt host's delivery was dropped. They are captured in onAppCreated and replayed once the shell has mounted. - The shell capped its height at a hardcoded 800px. It now honors the protocol's containerDimensions and otherwise reports true content height, leaving the frame to the host. e2e asserts the console's tokens and stylesheet count are unchanged after rendering while the shell keeps its own palette one document down, and that a 40-row artifact grows the frame past its initial height. Both guards were mutation-tested.
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.
Console UI for persisted artifacts, completing the feature.
/artifactslist page (sidebar nav on all hosts) with rename/delete/artifacts/$artifactIddetail page rendering the stored JSX live in the embedded shell over an HTTP-backed host (executions API), including the trusted elicitation approval flow — this page is the deep-link target non-MCP-Apps clients receiveArtifactRendererProviderseam to avoid a react↔shell package cycleartifactsadded to reserved org slugs (plustoolkits, a pre-existing gap)Stack