fix(motion): address route transition CodeRabbit follow-ups#49
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughNavigation transitions now identify destinations with normalized path keys that retain query and hash values. Transition generations prevent stale navigation work from updating current state, while link handling and loading markup are simplified. ChangesNavigation transitions
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant AppLink
participant RouteTransitionProvider
participant RoutePreloaders
participant Screen
AppLink->>RouteTransitionProvider: beginTransition(to)
RouteTransitionProvider->>RoutePreloaders: resolveNavigateDestinationKey(to)
RouteTransitionProvider->>RoutePreloaders: preloadRoute(destination)
RouteTransitionProvider->>Screen: navigate
Screen-->>RouteTransitionProvider: screen ready
RouteTransitionProvider->>RouteTransitionProvider: check transition generation
RouteTransitionProvider->>Screen: reveal captured direction
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@src/navigation/routeTransition.test.ts`:
- Around line 29-51: Add edge-case tests in the resolveNavigateDestinationKey
suite for an object destination containing only pathname, verifying omitted
search and hash default to empty strings, and for a PRESET_EDIT_PATH_RE-matching
pathname with query and hash, verifying normalization preserves the expected
deduplication key composition.
In `@src/navigation/RouteTransitionContext.tsx`:
- Around line 120-132: In the fast-path branch of the route transition handler,
guard the navigate(to, navigateOptions) call and phase reset with
transitionGenerationRef.current === myGeneration after preloadRoute completes.
Preserve the existing behavior only for the current transition, preventing stale
transitions from navigating or overwriting phase state.
🪄 Autofix (Beta)
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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 585a978b-9458-4760-a200-7cd9233eb223
📒 Files selected for processing (5)
src/components/navigation/AppLink.tsxsrc/navigation/RouteTransitionContext.tsxsrc/navigation/RouteTransitionOverlay.tsxsrc/navigation/routePreloaders.tssrc/navigation/routeTransition.test.ts
💤 Files with no reviewable changes (1)
- src/components/navigation/AppLink.tsx
Summary
_blankcheck in AppLink; use<output>for overlay status; exception-safe preload test spyTest plan
resolveNavigateDestinationKeyunit testsSummary by CodeRabbit
target="_blank".