Repository navigation
chore: update dev with main (keep 4.6.0-dev.0) - #3446
Conversation
Move Intelligent Search redirects out of render (SO-651) and harden PLP↔PDP scroll restore so back navigation lands on the product without footer flash or layout collapse under infinite scroll.
Add unit/browser tests for SO-651 redirect behavior, scroll restore helpers, ProductGridSkeleton count, and GalleryPageHeightLock reserved heights so Sonar new-code coverage meets the 75% gate.
…ghts Compare normalized pathnames for same-route detection, and defer gallery height reads until after mount to avoid SSR/client mismatches.
Use globalThis instead of window, replaceAll for key sanitization, and a positive SSR guard so the quality gate stops flagging the new issues.
Use router.pathname for the /s reset guard so locale-prefixed search paths still skip resetInfiniteScroll, stop carrying stale PDP anchors on non-PDP exits, ignore modified clicks when saving anchors, and cloak restore with visibility:hidden instead of opacity:0.
Long PLP paths with multiple facets exceeded the 180-char sanitized key limit and dropped page/viewport, so mobile and desktop (and adjacent pages) could share the same sessionStorage height entry.
Use Math.trunc and String#codePointAt instead of | 0 / charCodeAt.
PDP → home was calling resetInfiniteScroll(0) and wiping in-memory pages while sessionStorage still held [0,1,2] for the PLP. Back then scrolled to the saved Y with only page 0 mounted, leaving the viewport in empty reserved height near the footer. Skip reset when leaving PDPs and rehydrate pages from sessionStorage before scroll restore.
Satisfies Sonar preference for String#replaceAll over replace with a global regex.
Remove the /s and PDP leave guards that leaked Zustand pages into the next PLP when scrollRestoration is on. Back-nav still rehydrates pages from pathname-keyed sessionStorage; SO-651 stays covered by SearchWrapper.
# Conflicts: # CHANGELOG.md # lerna.json # packages/api/CHANGELOG.md # packages/api/package.json # packages/cli/CHANGELOG.md # packages/cli/package.json # packages/components/CHANGELOG.md # packages/components/package.json # packages/core/CHANGELOG.md # packages/core/package.json # packages/diagnostics/CHANGELOG.md # packages/diagnostics/package.json # packages/lighthouse/CHANGELOG.md # packages/lighthouse/package.json # packages/sdk/CHANGELOG.md # packages/sdk/package.json # packages/storybook/CHANGELOG.md # packages/storybook/package.json # packages/ui/CHANGELOG.md # packages/ui/package.json
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (20)
WalkthroughFastStore 4.5.1 updates package changelogs and modifies product skeleton counts, Intelligent Search redirects, gallery height persistence, and scroll restoration. Browser tests cover the new loading, navigation, storage, observer, and restoration behavior. ChangesCore release and navigation behavior
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant SearchWrapper
participant Router
participant ProductGallery
participant GalleryPageHeightLock
participant sessionStorage
Browser->>SearchWrapper: provide search response
SearchWrapper->>Router: replace redirect URL once
ProductGallery->>GalleryPageHeightLock: render page boundary
GalleryPageHeightLock->>sessionStorage: read persisted height
GalleryPageHeightLock->>ProductGallery: apply reserved minHeight
ProductGallery->>GalleryPageHeightLock: render product cards
GalleryPageHeightLock->>sessionStorage: persist measured height
sequenceDiagram
participant Browser
participant Router
participant useScrollRestoration
participant sessionStorage
participant InfiniteScroll
Browser->>useScrollRestoration: capture product-link click or popstate
useScrollRestoration->>sessionStorage: save scroll position and PDP anchor
Router->>useScrollRestoration: emit route completion
useScrollRestoration->>InfiniteScroll: rehydrate or reset pages
useScrollRestoration->>Browser: restore anchor or coordinates
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
dev was already ahead of the 4.5.1 stable hotfix; do not downgrade the prerelease cycle when syncing main into dev.
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/diagnostics
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
|

0 New Issues
0 Fixed Issues
0 Accepted Issues
Manual back-merge of
main(4.5.1hotfix) intodev, to bring the infinite-scroll fix (#3437) without resetting the prerelease cycle.devwas already at4.6.0-dev.0, so package/lernaversions stay on4.6.0-dev.0(ahead of stable4.5.1) instead of the default resolve-script downgrade to4.5.1.The automated back-merge (run 31502187816) failed before opening this PR (missing CLI build — fixed in #3445). This PR was created by running the same steps locally, then correcting the version pin.
Deterministic CHANGELOG conflicts were unioned; lockfile/codegen regenerated. No non-deterministic conflicts.
Contents from main
[no ci] Release: 4.5.1changelog entriesSummary by CodeRabbit
Bug Fixes
Improvements
Documentation