fix(history): normalize memory history hrefs - #8359
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughMemory history now normalizes hrefs through ChangesMemory history href normalization
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Memory history href generation is aligned with navigation behavior and covered by regression tests; no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
|
View your CI Pipeline Execution ↗ for commit 1d66db4
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview3 package(s) bumped directly, 21 bumped as dependents. 🟩 Patch bumps
|
Bundle Size BenchmarksThis pull request does not affect bundle size in any measured scenario. |
🎯 Changes
Memory history normalizes locations through
parseHref, but itscreateHrefcurrently returns the input unchanged. For example, pushing//example.com/pathproduces the location/example.com/path, while formatting the same input produces a protocol-relative link.Use
normalizeHrefin memory history'screateHrefso generated hrefs match navigation and the browser/server history implementations. Add 13 regression cases covering protocol-relative prefixes, slash/backslash variants, control characters, and preservation of ordinary and encoded paths. Include a patch changeset for@tanstack/history.Follow-up to #8308 and #8354.
Validation:
pnpm test:eslint --outputStyle=stream --skipRemoteCachepnpm test:types --outputStyle=stream --skipRemoteCachepnpm test:unit --outputStyle=stream --skipRemoteCachegit diff --check.✅ Checklist
🚀 Release Impact
Summary by CodeRabbit