Repository navigation
Align current Drupal page with Nuxt page commits - #4
StirStudios wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Closing this fork-local duplicate. The same validated branch is now proposed to the official upstream repository in drunomics#538. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f92f2bff6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
getPage()only when Nuxt emitspage:finishapp:errorfetchPage()resultsRoot cause
Nuxt keeps the outgoing
<NuxtPage>committed while the destination resolves in Suspense. Drupal CE currently changesdrupal-ce-current-page-keyas soon as the destination request completes, or when its route watcher sees destination payload data. Shared layout components can consequently receive destination Drupal data while Nuxt is still displaying the outgoing page.The required invariant is:
getPage()represents the Drupal page Nuxt has committed, not the most recently completed request.Change
The browser now tracks pending and current page keys separately. A completed destination fetch remains pending until
page:finish, when Nuxt has committed it. Failed navigation and application errors discard the pending key. Server rendering still assigns immediately, hydration can expose its existing committed payload immediately, and redirect responses never become current pages.This does not alter requests, cache keys, payload contents, redirect targets, CMS output, explicit custom-key lookups, or the page returned directly by
fetchPage().Evidence
page:finishpromotes the destinationapp:errordiscards pending statepage:finishpage:finishThis is intentionally separate from the consumer theme's route-snapshot lock: that protects route-derived shared UI, while this change corrects the lifecycle contract of Drupal CE's
getPage()state.