Skip to content

Document-Isolation-Policy header scope is too narrow, breaking cross-window communication across admin screens #77633

Description

@adamsilverstein

Description

The Document-Isolation-Policy (DIP) header introduced in #75991 is only attached to a narrow set of block-editor page loads:

  • `load-post.php`
  • `load-post-new.php`
  • `load-site-editor.php`
  • `load-widgets.php`

Because DIP places each document into its own agent cluster, any admin screen that does not send the header ends up in a different agent cluster than the editor. Navigating between these screens (e.g., from the Site Editor to the Templates list, or from a pattern-edit popup back to its opener) breaks:

  • Cross-window `postMessage` / `window.opener` communication used by preview popups and pattern editing.
  • Agent-cluster continuity expected by SharedArrayBuffer-backed WASM media processing.

The workaround we've had to add to several E2E tests (`gutenberg-test-plugin-disable-client-side-media-processing`) is a symptom of the same issue — those specs were failing specifically because navigation crossed an agent-cluster boundary.

Steps to reproduce

  1. On Chromium 137+, open the Site Editor.
  2. Trigger any flow that relies on a cross-window handshake (e.g., pattern create-from-selection, template revert, preview popup, cross-admin navigation back to the editor).
  3. Observe broken popup reuse, missing `window.opener`, or lost SharedArrayBuffer context.

Expected behavior

DIP should be sent consistently across all admin pages (subject to capability and feature checks), so admin navigations stay within a single agent cluster.

Proposed fix

Attach DIP via `admin_init` rather than the narrow `load-*.php` set, gate on `current_user_can( 'upload_files' )`, and preserve the existing skip for third-party page builders that override the block editor via an `action` query parameter. DIP remains admin-only — front-end previews are explicitly out of scope.

Fix implemented in #76662.

Environment

Activity

  1. moved this to 📋 Iteration/Tracking Issues in WordPress 7.1 Editor Taskson Apr 23, 2026
  2. moved this from 📋 Iteration/Tracking Issues to 🏗️ In Progress in WordPress 7.1 Editor Taskson Apr 23, 2026
  3. moved this from 🏗️ In Progress to 🔎 Needs Review in WordPress 7.1 Editor Taskson Apr 28, 2026
  4. moved this to 📋 Iteration/Tracking Issues in WordPress 7.1 Editor Taskson Jul 13, 2026
  5. moved this from 📋 Iteration/Tracking Issues to 🦵 Punted to 7.2 in WordPress 7.1 Editor Taskson Jul 13, 2026
  6. moved this from 🏗️ In Progress to No status in WordPress 7.2 Editor Taskson Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Feature] Client Side MediaMedia processing in the browser with WASM[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions