Skip to content

Flush lifecycle before top-level navigation - #874

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/top-level-navigation-lifecycle-269
Sep 20, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/top-level-navigation-lifecycle-269

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Problem

Top-level location.reload() and same-origin navigation reached the native host without dispatching the outgoing document lifecycle. Code OSS therefore did not receive its storage flush signal: its encrypted MCP key survived reload, while workspace-scoped MCP input metadata disappeared.

Change

  • Route reload and same-origin navigation through the existing bounded close-decision path.
  • Honor beforeunload cancellation before emitting a host request.
  • Dispatch pagehide with persisted === false and drain lifecycle microtasks before handoff.
  • Add a focused CTest lane for reload, location navigation, and veto behavior.
  • Record the Code OSS failure and validation contract.

Progresses #269.

Validation

  • Release V8 target built with 3 jobs.
  • WEBSCENE_NATIVE_ENGINE_TEST_FILTER=top-level-navigation-lifecycle webscene_native_engine_tests passed.
  • The broader desktop-host-capabilities lane continues to hit its existing Blob iframe hydration failure after this focused contract passes; that unrelated failure is outside this change.

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