feat(workspaces): add secure preview widget#101354
Conversation
|
Refile of #101334, which was auto-closed to make PR room — same branch and commit, nothing changed. On the |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 8:40 AM ET / 12:40 UTC. Summary PR surface: Source +207, Tests +92, Other -1. Total +298 across 9 files. Reproducibility: not applicable. as a bug reproduction: current main clearly lacks dedicated preview chrome, while already supporting the underlying iframe-embed capability. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep one canonical URL-embed contract—preferably extending Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: current main clearly lacks dedicated preview chrome, while already supporting the underlying iframe-embed capability. Is this the best way to solve the issue? No. A separate persisted kind is not yet proven better than extending the existing embed widget, and the proposed renderer currently ignores resolved bindings and keeps viewport selection outside owned state. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 265f79e60721. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +207, Tests +92, Other -1. Total +298 across 9 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (13 earlier review cycles; latest 8 shown)
|
46c8741 to
3c16a91
Compare
727af42 to
4abeebd
Compare
4abeebd to
8069aa0
Compare
8069aa0 to
101e132
Compare
101e132 to
12a6927
Compare
12a6927 to
054674d
Compare
054674d to
64cb929
Compare
64cb929 to
a7da110
Compare
|
Merged via squash.
|
* feat(workspaces): add secure preview widget * fix(workspaces): type preview reload assertion * fix(workspaces): harden preview widget * fix(workspaces): honor preview URL binding ownership * chore(workspaces): remove unused widget exports --------- Co-authored-by: Eva <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Workspaces has no first-class preview panel for inspecting an allowed development server or deployed page without leaving the operator workspace.
Why This Change Was Made
This adds
builtin:previewto the current Workspaces registry and schema. The preview keeps a distinct, owner-approved saved widget contract while sharing the iframe plumbing and URL policy withbuiltin:iframe-embed. It fails closed for disallowed origins, preserves the existing iframe sandbox ceiling (allow-scripts, neverallow-same-origin), sends no referrer, and reloads without reaching intocontentWindow.Resolved
bindings.valueURLs take precedence when declared, unrelated bindings do not suppressprops.url, and viewport selection lives in the owning workspace view state so rerenders preserve it.User Impact
Workspace authors can preview an allowed URL, reload it, and switch between desktop, tablet, and mobile viewports. Disallowed origins render an explicit blocked state. Loading a remote preview makes the browser contact that origin directly, so it can observe ordinary network metadata such as IP address and user agent.
Visual Proof
Current
main— preview kind unavailable:Candidate — allowed same-origin preview plus blocked external origin:
Candidate — mobile viewport:
Artifact manifest
Evidence
a7da1103db68126c3f9fa4a36a81e89930d25fcf.git diff --check: clean.Thanks @100yenadmin for the original implementation and Workspaces design.