Skip to content

Fix docs startup resume and scroll reset#126

Open
bot-rucachan wants to merge 2 commits into
mainfrom
codex/reset-scroll-on-navigation
Open

Fix docs startup resume and scroll reset#126
bot-rucachan wants to merge 2 commits into
mainfrom
codex/reset-scroll-on-navigation

Conversation

@bot-rucachan

@bot-rucachan bot-rucachan commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reset scroll to the top for client-side push/replace navigation without a hash target
  • serialize mount callback presence in resume payloads so directly loaded pages with onMount run the full runtime on startup
  • preserve browser scroll restoration for popstate navigation
  • add regressions for hash-less Link navigation and direct initial routes that require onMount

Verification

  • node_modules/.bin/vp fmt
  • node_modules/.bin/vp lint
  • node_modules/.bin/vp run typecheck
  • node_modules/.bin/vp run test
  • bun test packages/eclipsa/core/resume-loader.test.ts
  • bun run --cwd e2e e2e --grep "runs onMount for directly loaded routes"
  • bun run --cwd e2e e2e --grep "resets scroll"
  • bun run --cwd docs build
  • verified the production docs build in-browser: direct / load marks the page resumed, the 3D canvas initializes to viewport size (1280x720 in the test browser), no console errors/warnings are emitted, and /assets/output-0pBNtzJY.glb is requested with HTTP 200
  • verified the production docs build in-browser: scrolled docs -> home resets to scrollY 0, 3D scene updates

Co-authored-by: codex <codex@openai.com>
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Website preview: https://pr-126-eclipsa.xiarenda61.workers.dev

Commit: 995e9ad

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +9236 to +9238
scrollToUrlTarget(doc, url, {
resetScroll: mode !== 'pop',
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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-commenter

codecov-commenter commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.91667% with 37 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/eclipsa/core/runtime.ts 22.91% 37 Missing ⚠️
Files with missing lines Coverage Δ
packages/eclipsa/core/runtime.ts 21.75% <22.91%> (+0.10%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: codex <codex@openai.com>
@bot-rucachan bot-rucachan changed the title Fix scroll reset on client route navigation Fix docs startup resume and scroll reset Jun 5, 2026
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.

3 participants