Skip to content

Conversation

kyumoon
Copy link
Contributor

@kyumoon kyumoon commented Aug 21, 2025

🔗 Linked issue

resolves #33024

📚 Description

This PR fixes an issue where nuxtApp._runningTransition was not being reset when navigating between a page with a transition and one without under specific conditions. For more details, please refer to the linked issue.

To resolve this, I've added code to the onResolve hook to properly clear the nuxtApp._runningTransition flag.

@kyumoon kyumoon requested a review from danielroe as a code owner August 21, 2025 03:38
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

pkg-pr-new bot commented Aug 21, 2025

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@33025

nuxt

npm i https://pkg.pr.new/nuxt@33025

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@33025

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@33025

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@33025

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@33025

commit: 75d1573

Copy link

codspeed-hq bot commented Aug 21, 2025

CodSpeed Performance Report

Merging #33025 will not alter performance

Comparing kyumoon:fix/scrollToTop (75d1573) with main (6f4da1b)

Summary

✅ 10 untouched benchmarks

@danielroe danielroe changed the title fix: delete nuxtApp._runningTransition onResolve fix(nuxt): delete nuxtApp._runningTransition onResolve Aug 21, 2025
@danielroe
Copy link
Member

would you be able to add a runtime/unit regression test for this? (we have some scrollBehavior transition tests you can use as an example)

@kyumoon
Copy link
Contributor Author

kyumoon commented Aug 27, 2025

would you be able to add a runtime/unit regression test for this? (we have some scrollBehavior transition tests you can use as an example)

Okay, I pushed the test code.

@danielroe
Copy link
Member

danielroe commented Aug 28, 2025

Thank you! ❤️

Would you mind updating your branch? I did some work on that test file in 5d78366.

@kyumoon kyumoon force-pushed the fix/scrollToTop branch 2 times, most recently from d16d3fd to 1eca7bd Compare August 28, 2025 10:55
@kyumoon
Copy link
Contributor Author

kyumoon commented Aug 28, 2025

Thank you! ❤️

Would you mind updating your branch? I did some work on that test file in 5d78366.

I was a bit confused if you wanted me to update the entire file with your code, so I've gone ahead and done that for now.

@kyumoon kyumoon closed this Aug 28, 2025
@kyumoon kyumoon reopened this Aug 28, 2025
@danielroe
Copy link
Member

@kyumoon the test file was renamed and updated, and an issue I hadn't spotted is that this PR was made against 3.x.

  • would you rebase this PR against main branch?
  • would you add a regression test to router.options.test.ts to cover the desired behaviour/fix that this PR adds?

@kyumoon kyumoon changed the base branch from 3.x to main August 29, 2025 01:24
@kyumoon
Copy link
Contributor Author

kyumoon commented Aug 29, 2025

@kyumoon the test file was renamed and updated, and an issue I hadn't spotted is that this PR was made against 3.x.

  • would you rebase this PR against main branch?
  • would you add a regression test to router.options.test.ts to cover the desired behaviour/fix that this PR adds?

I've changed the target branch to main and added the test code.

Copy link

coderabbitai bot commented Aug 31, 2025

Warning

Rate limit exceeded

@danielroe has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 53 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6f4da1b and 75d1573.

📒 Files selected for processing (2)
  • packages/nuxt/src/pages/runtime/page.ts (1 hunks)
  • test/nuxt/router.options.test.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

thank you!

@danielroe danielroe merged commit 35c5f9f into nuxt:main Aug 31, 2025
81 of 83 checks passed
@github-actions github-actions bot mentioned this pull request Aug 31, 2025
@github-actions github-actions bot mentioned this pull request Sep 2, 2025
@IgorKha
Copy link

IgorKha commented Sep 7, 2025

check this please

#33024 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScrollToTop does not work when navigating between pages with and without pageTransition

3 participants