Repository navigation
Draw server visuals on Chrome 158 and keep them well under the time limit - #883
Merged
Merged
Conversation
With IsolateSandboxedIframes on, Chrome 158 crashes when the host page is set (Check failed: has_site_), so aiden serve could draw no HTML visual at all, and on slow CI runners the extra frame process pushed drawing a chart to the 15 s limit. The frame stays sandboxed, offline and fully blocked.
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Checked the Chromium launch adjustment, the server visual containment path, its behavioral coverage, and the accompanying documentation.
- Chrome 158 compatibility —
serverBrowserArgumentsnow disablesIsolateSandboxedIframesfor the throwaway renderer, avoiding the sandboxedsrcdocprocess crash and reducing render startup cost. - Containment preserved — The opaque-origin iframe sandbox, browser sandbox, CSP, offline emulation, closed proxy and resolver, and CDP request blocking remain in place; only renderer-process isolation changes.
- Documentation aligned — Both server visual guides explain the process-placement exception and its Chrome 158 rationale.
- Focused verification — The installed-browser render test passed on Chrome 157 in 1.57 seconds, including PNG output and temporary-profile cleanup; the PR also records manual Chrome 158 verification.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
3 tasks
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.

What was wrong
aiden servedraws HTML visuals (render_artifact) with an installed headless Chrome. The visual's guest page sits in a sandboxedsrcdociframe, and Chrome'sIsolateSandboxedIframesfeature puts that frame in a process of its own.Page.setDocumentContent, the browser crashes (FATAL: site_instance_impl.cc: Check failed: has_site_.). Every HTML visual comes back as "Not shown: … drawing it failed or took too long". This reproduces locally with Google Chrome 158.0.8127.36. A page without the sandboxed iframe draws fine, and so does one with an unsandboxed iframe.packages/cli/tests/server-visuals.test.mjs, "an installed browser draws a chart offline into a picture and leaves no profile behind", takes 8–15 s in Desktop tests (renderer-other) on runs that pass (8.3 s on main, 14.3 s on another branch). It failed at 15.2 s twice on Text-only Live Activities and answerable run alerts on iPhone #881, which doesn't touchpackages/cli. The deadline isSERVER_VISUAL_TIMEOUT_MS = 15_000.What changed
serverBrowserArgumentsaddsIsolateSandboxedIframesto--disable-features. The guest frame keeps itssandboxattribute, the export CSP, offline emulation and the DevTools rule that fails every request. Only the separate process for that frame goes away. The browser is throwaway (temporary profile, no network, one visual), so that process added no protection worth a crash.packages/cli/README.md(Inline visuals) anddocs/pi-gui-artifacts.md(Visuals onaiden serve).Timing (local, macOS, Chrome 158)
Target.createTarget)The CI runner's Chrome is older and doesn't crash, so this PR's own CI run gives the Linux before-and-after number. Compare this test's
duration_msin Desktop tests (renderer-other) with the 8–15 s above.Tests
cd packages/cli && npm test: 367 tests, 364 passed, 3 skipped, 0 failed.