Repository navigation
feat(agent-chat): isolate artifacts on shared WK page host - #26286
Conversation
Red: bun test test/artifact-html.test.tsx: 5 expected failures (no JSX kind or HTML write output). bun run check blocked by pre-existing design-token findings outside changed files; focused lint passed. Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a1756c-cf95-7a30-a911-a4a2d18a4841&host=gcp-codex-lane-2
HTML/SVG/JSX use the existing side preview, with an offline native artifact endpoint, isolated scripts, and navigation refusal. Completed full HTML writes from normalized ACP tools appear in the transcript and Outputs, with file-based versions. React/Sucrase are bundled locally and loaded after Run. Red 68de299107d: bun test test/artifact-html.test.tsx had 5 expected failures. Green: same command 7 passed; focused artifact/panel/Inspector suite 17 passed; scoped gallery suite 27 passed. Manual Chromium VM check: 10 fixtures and parent/storage/network/file/WebSocket/image/script policy probes passed, with captures. Web bundle build, typecheck, formatting and changed-file lint passed. Localization audit passed with no new keys. Not run: native compilation and AgentPaneArtifactNavigationTests (Linux VM has no swiftc; integration owner runs fleet verification). Full web check remains red on untouched base design-token debt at a30f457. No PR or push; artifact A handoff to nx-chat. Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a1756c-cf95-7a30-a911-a4a2d18a4841&host=gcp-codex-lane-2
…acts-resume-a-1027
Draw passive artifact markup in a script-disabled srcdoc frame, then reserve the native opaque allow-scripts endpoint for explicit Run. Parse inert HTML for consent markers and refuse srcdoc-origin navigation to allowed pane or loopback routes. Deduplicate the standalone opened-write version list by recorded body. Validation: scoped vp fmt passes on seven web files; scoped vp lint passes on new safety/runtime files. App lint reports only existing unlift/follow exhaustive-deps warnings. Swift syntax parse and git diff --check pass. No tests, builds, browser execution, push or hosted dispatch were run locally; parent owns exact-head hosted red/green and review. Agent-Session: https://cmux.com/deeplink/agent?id=aid-196c8c4a1f392915fbea
Carry toolCanonical onto synthesized full-write diffs so canonical creates and raw-input overwrites remain one document in Outputs and the opened artifact version list. Validation: scoped vp fmt and vp lint pass on writtenArtifacts.tsx and artifact-html.test.tsx; git diff --check passes. The focused behavioral regression is committed first at fbfd741; tests and builds are deferred to the coordinator's hosted lane. No push or dispatch. Agent-Session: https://cmux.com/deeplink/agent?id=aid-196c8c4a1f392915fbea
Regression command for hosted runner: scripts/cmux-next/test-cmux-page-path-cpp.sh. The first two new cases are statically red on the base because PageRequestAllowed accepts the artifact URL as the same page host. Native test execution intentionally deferred by task scope. Agent-Session: https://cmux.com/deeplink/agent?id=aid-ecd03ea7c2f13c412b34
Serve exact cmux-page://cmux.agent/__artifact with an opaque sandbox CSP and the one-shot render protocol. Gate artifact/srcdoc navigation before the main-frame fast return, deny network/file/page subresources throughout descendant frames, and retain normal page navigation. Observed: scoped verify-local checks passed (localization-defaults, package-groups, feature-flags), git diff --check passed, bootstrap node --check passed. Not run: native CEF compilation, browser probe, and C++ tests, per task scope. Hosted regression: scripts/cmux-next/test-cmux-page-path-cpp.sh. Test-first parent b71fd15 contains two statically failing page-authority cases; hosted red/green still required. Agent-Session: https://cmux.com/deeplink/agent?id=aid-ecd03ea7c2f13c412b34
…acts-resume-a-1027
Serve the exact cmux-page://cmux.agent/__artifact bootstrap with an opaque sandbox CSP and apply the one-shot direct-child navigation policy in shared WebKit pages. Ordinary page navigation remains unchanged. Agent-Session: https://cmux.com/deeplink/agent?id=aid-wk-artifact-frame
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on eef18f1 to compare; do not merge until green; see lane-rules Gallery before/after for
States
Pick other states with a |
|
Owned by an agent session · session |
|
Bead |
|
Review (codex gpt-6-astra xhigh, next-review): BLOCK at 91588ec
|
|
Orphaned: no activity for 14 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged |
|
Review (codex gpt-6-astra high, review-router): SHIP at 22cf4ef No concrete correctness, regression, or missing-test issues found in the reviewed diff. VERDICT: SHIP Agent session: agent session |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
For the owner of this stack (nx-chat; its host is unreachable right now): the Artifacts pane (#27264) needs the shared PageArtifactFrame/CEF/WK host policy to accept Agent session: agent session |
|
Review (codex gpt-6-astra high, next-review): SHIP at 8f90d50 No blocking findings. Non-blocking: Static review only; tests were not executed. |
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40974281406 at 12b4dc0 failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
Shipped in:
|
Conflicts (from #26286 having landed as a squash): artifact_page.h, ArtifactPanel.tsx, RenderCard.tsx, artifactSandbox.ts, artifact-panel-sandbox.test.tsx; the rest taken from base. The shared preview now wraps the side panel's current frame instead of the pre-#31174 copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-159afad10a5ab45ea16c
…igation with no source frame) (#36290) * test(next): a WebKit navigation with no source frame gets a policy, not a trap (red) macOS 14's WebKit gives a nil WKNavigationAction.sourceFrame for some navigations although WebKit declares it nonnull. PageWebView and the agent pane read sourceFrame.request.url through the Swift type, so the nil NSURLRequest bridges to URLRequest and traps: the cmux-next app ended at launch on macOS 14.8.7 (Tart smoke of 66339d3). FakeNavigationAction (CmuxNextPagesTestSupport) answers the sourceFrame getter with nil through the Objective-C runtime, as that WebKit does. Both delegates trap on it at this commit. * fix(next): read a WebKit navigation's frames without trapping on macOS 14 macOS 14's WebKit gives a nil WKNavigationAction.sourceFrame for some navigations, although the header declares it nonnull. PageWebView (since #26286, 1e27057) and AgentPaneNavigation read sourceFrame.request.url through the Swift type: the nil frame answers a nil NSURLRequest, and its bridge to URLRequest traps (URLRequest._unconditionallyBridgeFromObjectiveC). The cmux-next app ended at launch on macOS 14.8.7 in PageWebView.webView(_:decidePolicyFor:) (fleet build 83e04e0d8b97c62c796fc5aa, Tart smoke 48cb9eceb51bb6143325b239, crashes=1); 15 and 26 pass. CmuxNextDesign's WKNavigationAction.sourceFrameIfPresent / sourceFrameURL / targetFrameURL and WKFrameInfo.requestURLIfPresent ask the Objective-C runtime for the getters, whose answer is typed optional, so the optimizer cannot fold a nil check away (as it may for `sourceFrame as WKFrameInfo?`, which the browser's sourcePage used). Both navigation delegates and sourcePage read through them. With a frame present, the URL is the same as before; with none, the policy treats the source as unknown, as it already does for a nil URL (the agent pane refuses an artifact frame it did not make). Regression: PageNavigationNoSourceFrameTests and AgentPaneNavigationNoSourceFrameTests (previous commit) trap at the base and pass here.
The shared
cmux-page://cmux.agent/page host now has the isolated artifact-frame contract used by the legacy agent host.PageArtifactFrameserves the exact__artifactendpoint with opaquesandbox allow-scriptsCSP, a one-shot render protocol, data/blob-only media, and denial of artifact/srcdoc self-navigation, nested frames, network/file/page/bridge resources.This is the shared WK fallback prerequisite for #26216; the CEF counterpart is #26224. Shared-page frontend Preview/Run integration belongs to the dependent change. Ordinary page routes remain unchanged.
Leo: "the /side thing i heard somebody really liked in codex... and i think html/html artifacts and that kinda good viewing and good support for it would be cool" / "like the claude.ai artifacts but imagien you didnt need to only have it on claude.ai...".
The interactive-artifacts highlight now links to the NEXT agents documentation. Frozen head:
8f90d5002ab4012ccfccfd668ff160bef4848349.Validation:
b0b0861c1906b2e37aa03ccb6753ded3e7abcee2, identical to the frozen head's tree.87cc86b14192f30b669a229a: all six suites passed (CmuxNextDaemonTests, CmuxNextMobileTests, FirstLaunchTests, ClassicImportTests, ClassicMigrationTests, ClassicUpgradeSimulationTests).theFirstLaunchBringsEverythingOncepassed all eight cases, andanOffSSHHostDoesNotHoldBackLocalWorkspacespassed.No capture:
tour:corereached 20 passing steps, but its final Profile menu step needs a full-display screenshot. The current shared capture driver refuses everydisplaystep, including whole-display and Blacksmith captures;driver.pyreturns an unavailable result before executing the menu action. The exact-head attempt used build8acc263942485ec43022bad8; the tour was refused and nothing from it was uploaded. This is a capture-driver limitation, not a successful core-tour receipt.Capture
tour-agent-paneat8f90d5002ab4(fleet build, capture mini, text checked for private data)Agent session: agent session