Skip to content

Browser SDK v1 facade omits materializer methods top-level (setFrontendAdminBarVisible, ensureDirectory, writeFile, runRecipe) #1714

Description

@chubes4

Problem

browserSdkFacade (packages/wordpress-plugin/assets/browser-runtime.js:456) exposes some operations as top-level v1 members (startBrowserPreview, runBrowserSessionRecipe, bootExecutableBrowserSession, …) but others only inside the frozen v1.methods map (line ~477): setFrontendAdminBarVisible, ensureDirectory, writeFile, runRecipe, and possibly more.

Studio Native's browser materializer — per its documented contract — calls these as top-level window.wpCodeboxBrowser.v1.<method> and fails closed: WP Codebox browser SDK v1 is missing setFrontendAdminBarVisible. This blocks the entire preview boot on the Studio Native dogfood runtime, caught by the new headless product-flow e2e (chubes4/studio-native#941/#943). Consumer-side smokes were source-shape assertions, so the gap was invisible until a real browser exercised the flow.

Fix shape

Expose the full sanctioned method set top-level on the v1 facade (thin passthroughs like the existing entries), keeping v1.methods as-is. Audit the studio-native materializer's consumed set (ensureDirectory, writeFile, runBrowserSessionRecipe, consumeContainedSiteSync, runRecipe, setFrontendAdminBarVisible) and cover the facade surface with a real facade test (not source-shape matching).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions