Fix docs startup resume and scroll reset#126
Conversation
Co-authored-by: codex <codex@openai.com>
|
Website preview: https://pr-126-eclipsa.xiarenda61.workers.dev Commit: 995e9ad |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe54a00320
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| scrollToUrlTarget(doc, url, { | ||
| resetScroll: mode !== 'pop', | ||
| }) |
There was a problem hiding this comment.
Preserve scroll during forced route refreshes
When a content/HMR route refresh calls refreshRouteContainer, it re-enters navigateContainer with force: true and mode: 'replace' for the current URL. For hash-less pages this new mode !== 'pop' reset makes an in-place refresh jump to the top, whereas the previous no-hash path kept the user's scroll and refreshRouteContainerForHmr still rerenders without scrolling. This only shows up on forced refreshes of the current route, but it makes dev/content updates disruptive for long pages.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Co-authored-by: codex <codex@openai.com>
Summary
onMountrun the full runtime on startuponMountVerification
/load marks the page resumed, the 3D canvas initializes to viewport size (1280x720in the test browser), no console errors/warnings are emitted, and/assets/output-0pBNtzJY.glbis requested with HTTP 200