fix(web): isolate same-origin agent view lifecycles - #144
Merged
Conversation
Serialize URL frames by normalized origin, remount through an empty committed state, and use Chromium credentialless storage without weakening the self-origin sandbox. Make every T3 HTML shell unframeable so redirected embeds cannot escape the sandbox. Cover exact fragment preservation, same-origin A-to-B-to-A DOM replacement, expanded handoffs, hosted and desktop framing headers, and browser fallback behavior. Written by GPT-5.6-Sol in T3 Code.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Keep the fake browser globals installed until React's development scheduler drains its queued Immediate. This prevents CI teardown from surfacing window-is-undefined errors after every assertion already passed. Written by GPT-5.6-Sol in T3 Code.
4 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 Changed
credentiallessisolation to cross-origin URL frames while preserving the opaque self-origin sandbox.Why
Two immutable agent-view renders can point at different fragment-addressed rooms on one origin. Keeping both iframes mounted lets the apps share origin storage and collaboration channels, so a later card can display stale state from the earlier room even though its render ID and stored URL are correct.
The lifecycle is now serialized by origin and tested at the DOM-node boundary.
credentiallessadds an ephemeral Chromium partition for the top-level T3 document; it is intentionally documented as defense in depth, not per-render storage isolation. Firefox and Safari retain the exclusive remount lifecycle.UI Changes
Historical same-origin URL cards remain visible but inactive cards show Open this view. Selecting one disconnects the current iframe before mounting a new node. The focused DOM suite records detach-before-attach and exact
srcvalues for A → B → A and expanded/pending switches.Deployed screenshots and an interaction recording will be attached from the experimental environment during the required post-merge verification; no room fragments or keys will be captured.
Verification
apps/web: 16 focused agent-view unit/DOM tests passed.apps/server: 147 focused Agent UI and static-router tests passed.Checklist
Written by GPT-5.6-Sol in T3 Code (Codex harness).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.