fix(router): migrate to Store 0.11.1 - #7983
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughTanStack Store dependencies move to version 0.11.1. React Router replaces ChangesStore selector migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/vue-router/tests/not-found.test.tsx`:
- Around line 152-156: Update the not-found navigation test to await Vue’s next
rendering tick after the second router.navigate call and before asserting
subscribe. Use the existing nextTick utility so the assertion observes the
completed second not-found render and subscription lifecycle.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 03c759cb-1eba-47f6-a6e1-051fff3f1a4c
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (28)
.changeset/warm-stores-select.mdpackages/react-router/package.jsonpackages/react-router/src/Match.tsxpackages/react-router/src/Matches.tsxpackages/react-router/src/Scripts.tsxpackages/react-router/src/headContentUtils.tsxpackages/react-router/src/link.tsxpackages/react-router/src/not-found.tsxpackages/react-router/src/useCanGoBack.tspackages/react-router/src/useLocation.tsxpackages/react-router/src/useMatch.tsxpackages/react-router/src/useRouterState.tsxpackages/router-core/package.jsonpackages/vue-router/package.jsonpackages/vue-router/src/Match.tsxpackages/vue-router/src/Matches.tsxpackages/vue-router/src/Scripts.tsxpackages/vue-router/src/headContentUtils.tsxpackages/vue-router/src/link.tsxpackages/vue-router/src/not-found.tsxpackages/vue-router/src/useCanGoBack.tspackages/vue-router/src/useLocation.tsxpackages/vue-router/src/useMatch.tsxpackages/vue-router/src/useRouterState.tsxpackages/vue-router/src/useSelector.tspackages/vue-router/tests/not-found.test.tsxpackages/vue-router/tests/useSelector.test.tsxpnpm-workspace.yaml
| await router.navigate({ to: '/missing-one' as any }) | ||
| await screen.findByTestId('root-not-found') | ||
| await router.navigate({ to: '/missing-two' as any }) | ||
|
|
||
| expect(subscribe).toHaveBeenCalledOnce() |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Wait for the second Vue update before the assertion.
The assertion can run before Vue processes the second location change. Add await nextTick() after the second router.navigate call. This makes the test exercise the subscription lifecycle during the second not-found render.
Proposed fix
+import { nextTick } from 'vue'
+
await router.navigate({ to: '/missing-two' as any })
+await nextTick()
expect(subscribe).toHaveBeenCalledOnce()📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await router.navigate({ to: '/missing-one' as any }) | |
| await screen.findByTestId('root-not-found') | |
| await router.navigate({ to: '/missing-two' as any }) | |
| expect(subscribe).toHaveBeenCalledOnce() | |
| import { nextTick } from 'vue' | |
| await router.navigate({ to: '/missing-one' as any }) | |
| await screen.findByTestId('root-not-found') | |
| await router.navigate({ to: '/missing-two' as any }) | |
| await nextTick() | |
| expect(subscribe).toHaveBeenCalledOnce() |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/vue-router/tests/not-found.test.tsx` around lines 152 - 156, Update
the not-found navigation test to await Vue’s next rendering tick after the
second router.navigate call and before asserting subscribe. Use the existing
nextTick utility so the assertion observes the completed second not-found render
and subscription lifecycle.
|
View your CI Pipeline Execution ↗ for commit 4d6a83f
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview2 package(s) bumped directly, 7 bumped as dependents. 🟩 Patch bumps
|
Merging this PR will regress 7 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | mem server error-paths not-found (solid) |
416.9 KB | 774.8 KB | -46.19% |
| ❌ | Memory | mem client interrupted-navigations (vue) |
501.8 KB | 763 KB | -34.22% |
| ❌ | Memory | mem client unique-location-churn (solid) |
342.1 KB | 519 KB | -34.08% |
| ❌ | Memory | mem server error-paths unmatched (react) |
263.2 KB | 396.8 KB | -33.67% |
| ❌ | Memory | mem server peak-large-page (solid) |
788.1 KB | 951.6 KB | -17.18% |
| ❌ | Simulation | ssr control-flow route headers (react) |
85 ms | 88.9 ms | -4.43% |
| ❌ | Memory | mem server error-paths error (vue) |
888.3 KB | 923.6 KB | -3.82% |
| ⚡ | Memory | mem client unique-location-churn (vue) |
1,003.9 KB | 376.5 KB | ×2.7 |
| ⚡ | Memory | mem client navigation-churn (vue) |
1,237.3 KB | 549.6 KB | ×2.3 |
| ⚡ | Memory | mem server request-churn (react) |
940 KB | 482.2 KB | +94.93% |
| ⚡ | Simulation | client-links navigation loop (vue) |
163.2 ms | 113.2 ms | +44.17% |
| ⚡ | Simulation | client-nested-params navigation loop (vue) |
144.9 ms | 108.3 ms | +33.86% |
| ⚡ | Simulation | client-head navigation loop (vue) |
88 ms | 66.8 ms | +31.74% |
| ⚡ | Simulation | client-search-params navigation loop (vue) |
80.3 ms | 61.6 ms | +30.49% |
| ⚡ | Simulation | ssr server-fn during document ssr (vue) |
202.1 ms | 157.2 ms | +28.53% |
| ⚡ | Simulation | ssr dehydrate plain control (vue) |
190.8 ms | 148.6 ms | +28.34% |
| ⚡ | Simulation | client-side navigation loop (vue) |
70.2 ms | 54.8 ms | +28.22% |
| ⚡ | Simulation | ssr assets inline-css cdn (vue) |
222.5 ms | 176.1 ms | +26.33% |
| ⚡ | Simulation | ssr head (vue) |
382.7 ms | 308.5 ms | +24.05% |
| ⚡ | Simulation | client-preload interaction loop (vue) |
63 ms | 51 ms | +23.59% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/store-0.11.1-migration (4d6a83f) with main (abf9b81)
Footnotes
-
13 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Summary
useStoreAPI touseSelectorTests
pnpm nx affected --target=test:eslint --exclude="examples/**,e2e/**"pnpm nx affected --target=test:types --exclude="examples/**,e2e/**"pnpm nx affected --target=test:unit --exclude="examples/**,e2e/**"Summary by CodeRabbit
Bug Fixes
Tests