Skip to content

Synchronize preview navigation in vibe-platform E2E - #51

Merged
MiguelsPizza merged 3 commits into
mainfrom
alex/fix-preview-navigation-ci
Sep 17, 2026
Merged

MiguelsPizza merged 3 commits into
mainfrom
alex/fix-preview-navigation-ci

Conversation

@MiguelsPizza

Copy link
Copy Markdown
Contributor

The vibe-platform E2E test called the preview API as iframe.srcdoc was navigating, destroying its execution context. The initial POST never completed, so subsequent persistence assertions also failed in main CI after release PR #47.

Register a navigation wait before each build, successful save, and reload, then wait for the new document's root. Its API bridge is installed before that root is parsed, so this works without waiting for CDN modules. Synchronize the initial automatic build too, and pass the status timeout in Playwright's options position. No API retries or runtime changes.

Validation: reproduced wrong-document API calls and destroyed execution contexts with delayed navigation. The full example passes normally and with a temporary 100 ms srcdoc delay. Forced-offline execution passes with the three CDN-dependent checks skipped. JavaScript syntax and diff checks pass; temporary instrumentation was removed.

The built status is written immediately after assigning iframe.srcdoc, while the previous document can still be active. Register for navigation before each build, save, and reload, then wait for the new preview root so API calls use its installed bridge. This also synchronizes the initial automatic build and uses the correct Playwright timeout argument.
@MiguelsPizza
MiguelsPizza merged commit d14e797 into main Sep 17, 2026
1 check passed
@MiguelsPizza
MiguelsPizza deleted the alex/fix-preview-navigation-ci branch September 17, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant