Conversation
|
|
@nuxt/kit
@nuxt/nitro-server
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
WalkthroughThis pull request addresses non-ASCII character handling in route aliases by decoding URL-encoded paths during client-side route matching. The router plugin is updated to import and apply decodePath from 'ufo' to path computations in both hash-based and standard path extraction. Test coverage is expanded to verify alias handling with Unicode characters, and SSR route expectations are updated to reflect the "/products" pattern. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (3)**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx,vue}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{test,spec}.{ts,tsx,js}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (3)📚 Learning: 2025-11-25T11:42:16.132ZApplied to files:
📚 Learning: 2024-11-05T15:22:54.759ZApplied to files:
📚 Learning: 2024-12-12T12:36:34.871ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (4)
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. Comment |
Merging this PR will improve performance by 14.34%Summary
Performance Changes
Comparing Footnotes |
|
Yep, @coderabbitai correctly spotted #33990. This PR adds the client-side counterpart ( |
|
Tip For best results, initiate chat on the files or code changes. @dannote, thank you for the confirmation! That makes perfect sense—since browsers return (ᵔᴥᵔ) ✏️ Learnings added
|
🔗 Linked issue
Fixes #34042
📚 Description
Problem
Non-ASCII characters in route aliases don't work on the client side. Users have to manually encode aliases:
Root cause
The server decodes incoming URLs via
decodePath(event.path)inpackages/nitro-server/src/runtime/utils/renderer/app.ts, but the client useswindow.location.pathnamedirectly without decoding.For non-ASCII characters, browsers return encoded paths in
location.pathname(e.g.,/%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D1%8Binstead of/товары), causing a mismatch with decoded aliases.Solution
Apply
decodePathfromufoto client-side paths increateCurrentLocation()to match server behavior.Test plan
/товары,/produits,/製品)