Skip to content
Source
Sign inSign up
TanStack/router

fix: commit route context #6053

Mergedschiller-manuel(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/6053/headmerged by schiller-manuel(GitHub profile, opens in a new tab)

fixes #6040

Summary by CodeRabbit

  • Bug Fixes

    • Ensured route context is consistently merged and committed only after loaders complete, preventing components from seeing incomplete context during immediate navigations.
  • Tests

    • Added tests that validate route context during immediate navigation after beforeLoad-like operations.
    • Relaxed and adjusted numerous navigation update-count assertions to stable ranges or updated expectations to reduce flakiness.
✏️ Tip: You can customize this high-level summary in your review settings.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-router

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: router-core

    3. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-router

    4. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Walkthrough

      Deferred route-context merging: router-core no longer mutates the shared context during beforeLoad execution but records per-match beforeLoad context and commits a merged context after loaders complete. Tests for React and Solid validate context during immediate navigation; several store-update test expectations were relaxed/increased.

      Changes

      Cohort / File(s)Summary
      Router core: load-matches refactor
      packages/router-core/src/load-matches.ts
      Removed inline parent-context mutation during beforeLoad; added per-match __beforeLoadContext, commitContext to compute/persist merged context after loader completion; updated getLoaderContext and beforeLoadFnContext to aggregate contexts without mid-beforeLoad exposure.
      React router: route context test
      packages/react-router/tests/routeContext.test.tsx
      Added a test where root.beforeLoad returns data after a delay and an index route navigates immediately on mount; component records emitted root route contexts and asserts all entries equal the beforeLoad result; added explicit useEffect import.
      Solid router: route context tests
      packages/solid-router/tests/routeContext.test.tsx
      Added mirrored test cases using createEffect/onMount that delay in root.beforeLoad, navigate immediately from index route, record captured route context values, and assert consistency.
      Store update tests: relaxed expectations
      packages/react-router/tests/store-updates-during-navigation.test.tsx, packages/solid-router/tests/store-updates-during-navigation.test.tsx, packages/vue-router/tests/store-updates-during-navigation.test.tsx
      Adjusted numeric assertions for update counts: replaced exact counts with ranges or higher expected counts to reflect observed variability (multiple tests updated).

      Sequence Diagram(s)

      mermaid sequenceDiagram autonumber participant App as App / Component participant Router as Router Core participant Match as Route Match participant beforeLoad as beforeLoad fn participant Loader as Loader (async) Note over App,Router: Navigation starts (e.g., index route mounts and navigates) App->>Router: navigate(path) Router->>Match: loadRouteMatch(index) Match->>beforeLoad: executeBeforeLoad(context snapshot) beforeLoad-->>Match: returns __beforeLoadContext (async) Note over Match,Loader: beforeLoad resolves but context not merged yet Router->>Loader: run loader(s) (may be async) Loader-->>Router: loader results Router->>Router: commitContext() -- merge parent.__routeContext + __beforeLoadContext + route.__routeContext Router->>App: render with committed merged context App->>Match: useRouteContext() reads committed context

      Estimated code review effort

      🎯 4 (Complex) | ⏱️ ~45 minutes

      • Attention areas:
        • packages/router-core/src/load-matches.ts — verify async/sync paths both commit context correctly and do not expose partial context during beforeLoad.
        • Tests in three router packages — ensure new/updated tests accurately reflect intended timing and don't mask regressions.
        • getLoaderContext and beforeLoadFnContext changes — check callers/readers for assumptions about in-flight context.
      • TanStack/router#5792 — touches the same load-matches context aggregation and commit behavior.
      • TanStack/router#4961 — refactors router-core loadMatches/beforeLoad orchestration with overlapping changes.
      • TanStack/router#4971 — modifies loader orchestration and per-match state handling in load-matches.ts.

      Suggested reviewers

      • nlynzaad

      Poem

      🐰 I hopped through loaders, paused mid-flight, I promised context, then waited 'til right. No peeks while I’m working, I finish the chore— Then merge and deliver the context once more. A tidy refactor, a rabbit's delight! 🥕✨

      Pre-merge checks and finishing touches

      ❌ Failed checks (1 warning)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      ✅ Passed checks (2 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe title 'fix: commit route context' directly reflects the main change: deferring route context updates to after loader completion via a new commitContext mechanism, ensuring context consistency during navigation.
      ✨ Finishing touches
      • 📝 Generate docstrings
        🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment
      • Commit unit tests in branch `route-context-commit`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    5. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 562ad189a66105b8801ce062dfc563c8a23f810a

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded8mView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 36sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-12-09 20:03:07 UTC

    6. pkg-pr-new[bot](GitHub profile, opens in a new tab)commented
      More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@6053

      @tanstack/directive-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@6053

      @tanstack/eslint-plugin-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@6053

      @tanstack/history

      npm i https://pkg.pr.new/TanStack/router/@tanstack/history@6053

      @tanstack/nitro-v2-vite-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@6053

      @tanstack/react-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@6053

      @tanstack/react-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@6053

      @tanstack/react-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@6053

      @tanstack/react-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@6053

      @tanstack/react-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@6053

      @tanstack/react-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@6053

      @tanstack/router-cli

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@6053

      @tanstack/router-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@6053

      @tanstack/router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@6053

      @tanstack/router-devtools-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@6053

      @tanstack/router-generator

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@6053

      @tanstack/router-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@6053

      @tanstack/router-ssr-query-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@6053

      @tanstack/router-utils

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@6053

      @tanstack/router-vite-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@6053

      @tanstack/server-functions-plugin

      npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@6053

      @tanstack/solid-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@6053

      @tanstack/solid-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@6053

      @tanstack/solid-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@6053

      @tanstack/solid-start

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@6053

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@6053

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@6053

      @tanstack/start-client-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@6053

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@6053

      @tanstack/start-server-core

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@6053

      @tanstack/start-static-server-functions

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@6053

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@6053

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@6053

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@6053

      @tanstack/vue-router

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router@6053

      @tanstack/vue-router-devtools

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-devtools@6053

      @tanstack/vue-router-ssr-query

      npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router-ssr-query@6053

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@6053

      commit: 562ad18

    7. Actionable comments posted: 1

      🧹 Nitpick comments (3)
      packages/react-router/tests/store-updates-during-navigation.test.tsx (1)

      139-139: Document rationale for higher update counts and consider relaxing overly brittle assertions

      The new expectations reflect extra store updates after the route-context commit changes, but the tests still read as "these numbers should not increase" without explaining why some increases are acceptable (e.g. now 12/10/19 updates). For future maintainers, it would help to briefly note that the additional updates are due to the new context commit path rather than accidental regressions, and, where behavior is known to vary (like the “nothing” case), prefer bounded ranges over exact counts to avoid unnecessary flakiness or churn when internal batching changes again.

      Also applies to: 157-157, 173-173, 184-185, 226-226, 242-242, 258-258, 274-274, 292-292

      packages/solid-router/tests/routeContext.test.tsx (1)

      5-5: Solid immediate‑navigation context test looks good; tighten assertion and update stale note

      The new Solid test correctly exercises the “sleep in beforeLoad + immediate navigation” scenario and the createEffect‑based tracking of useRouteContext() is a good fit. Two small follow‑ups:

      • The note above the test now claims it passes only in solid-router but fails in react-router, which is no longer accurate given the new React test; consider updating or removing that comment to avoid confusion.
      • To guard against a vacuous pass if contextValues were ever empty, add an assertion like expect(contextValues.length).toBeGreaterThan(0) before the every(...) check.

      Also applies to: 2396-2452

      packages/react-router/tests/routeContext.test.tsx (1)

      12-12: React immediate‑navigation context test is solid; consider a non‑empty guard on contextValues

      The new React test accurately mirrors the Solid scenario and validates that useRouteContext() never exposes a pre‑beforeLoad context during immediate navigation; the useEffect + navigate pattern is appropriate here, even under reactStrictMode where the effect may fire twice.

      To make the assertion more robust, you might also assert that contextValues.length > 0 before calling .every(...), so the test can’t pass if, for some reason, the root component stopped rendering or useRouteContext() stopped producing values.

      Also applies to: 2479-2532

      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 98dc05073dcf7490d38f9158833f3df22c005e96 and 42d4a67a6ef1c41e4bfeee5a79bf8264555fa925.

      📒 Files selected for processing (4)
      • packages/react-router/tests/routeContext.test.tsx (2 hunks)
      • packages/react-router/tests/store-updates-during-navigation.test.tsx (9 hunks)
      • packages/router-core/src/load-matches.ts (7 hunks)
      • packages/solid-router/tests/routeContext.test.tsx (2 hunks)
      🧰 Additional context used
      📓 Path-based instructions (2)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use TypeScript strict mode with extensive type safety for all code

      Files:

      • packages/react-router/tests/routeContext.test.tsx
      • packages/react-router/tests/store-updates-during-navigation.test.tsx
      • packages/solid-router/tests/routeContext.test.tsx
      • packages/router-core/src/load-matches.ts
      **/*.{js,ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Implement ESLint rules for router best practices using the ESLint plugin router

      Files:

      • packages/react-router/tests/routeContext.test.tsx
      • packages/react-router/tests/store-updates-during-navigation.test.tsx
      • packages/solid-router/tests/routeContext.test.tsx
      • packages/router-core/src/load-matches.ts
      🧠 Learnings (2)
      📓 Common learnings
      Learnt from: nlynzaad
      Repo: TanStack/router PR: 5402
      File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
      Timestamp: 2025-10-08T08:11:47.088Z
      Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
      📚 Learning: 2025-10-08T08:11:47.088Z
      Learnt from: nlynzaad
      Repo: TanStack/router PR: 5402
      File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
      Timestamp: 2025-10-08T08:11:47.088Z
      Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

      Applied to files:

      • packages/react-router/tests/routeContext.test.tsx
      • packages/react-router/tests/store-updates-during-navigation.test.tsx
      • packages/solid-router/tests/routeContext.test.tsx
      • packages/router-core/src/load-matches.ts
      ⏰ 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). (2)
      • GitHub Check: Preview
      • GitHub Check: Test
      🔇 Additional comments (1)
      packages/router-core/src/load-matches.ts (1)

      381-387: Before‑load context refactor and loader context aggregation look consistent with the new semantics

      The changes in executeBeforeLoad and getLoaderContext are a clear improvement:

      • pending() and updateContext() no longer mutate match.context mid‑beforeLoad; they only flip fetching flags and stash results into __beforeLoadContext, which avoids exposing partially‑merged context to components.
      • The beforeLoad context argument now merges router context, parent context, parent __beforeLoadContext, and the current route’s __routeContext, so child beforeLoads always see parent contributions even when the parent’s context hasn’t been committed yet.
      • Loader context is now derived by walking inner.matches[0..index] and merging each match’s __routeContext and __beforeLoadContext, which produces a deterministic aggregate regardless of load ordering and matches how tests expect composed context to behave.

      This structure matches the intent of the new route‑context tests in both React and Solid and keeps the “source of truth” for composition in the non‑reactive fields rather than match.context itself.

      Also applies to: 398-400, 426-432, 459-465, 572-584

    8. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: vue-router

    9. Actionable comments posted: 0

      Caution

      Some comments are outside the diff and can’t be posted inline due to platform limitations.

      ⚠️ Outside diff range comments (3)
      packages/solid-router/tests/store-updates-during-navigation.test.tsx (1)

      125-298: Align flakiness comments and expectations, and consider ranges everywhere

      The relaxed assertions using toBeGreaterThanOrEqual/toBeLessThanOrEqual for the async cases are a good way to handle small variability.

      Two minor points:

      • The comments still say “sometimes (rarely) is 12” / “7”, but the upper bounds are now <= 13 / <= 8. It’d be clearer to either generalize the comment (“occasionally higher”) or update the numbers to match.
      • For the other tests that now use exact counts (7, 10, 19, 9, 7, 3), you might want to consider <= N style expectations as in the flaky ones, so the suite continues to guard against too many updates without overfitting to exact internals.
      packages/react-router/tests/store-updates-during-navigation.test.tsx (1)

      125-294: Keep flaky‑test comments in sync with bounds and avoid over‑fitting exact counts

      The move to [11,13] and [8,9] ranges is a sensible way to account for minor variability in update counts.

      Two small follow‑ups:

      • The comments still say “sometimes (rarely) is 12”, but updates is now allowed up to 13; it’d be good to either relax the wording or adjust the numbers so future readers aren’t surprised.
      • For the remaining tests with exact toBe(...) expectations, you might consider <= N or a tight range (as in the first and “nothing” tests), which better matches the suite’s intent (“doesn't update too many times”) and reduces churn when internal scheduling changes but behavior is still acceptable.
      packages/router-core/src/load-matches.ts (1)

      367-373: BeforeLoad context may miss ancestor beforeLoad values for the current navigation

      beforeLoadFnContext.context aggregates as:

      const parentMatchContext =
        parentMatch?.context ?? inner.router.options.context ?? undefined
      
      context: {
        ...parentMatchContext,
        ...parentMatch?.__beforeLoadContext,
        ...match.__routeContext,
      }

      However, the execution model runs all beforeLoad hooks sequentially first (lines 921–927), then all loaders in parallel (lines 929–931). This means when a deep child's beforeLoad executes:

      • parentMatch.context still reflects the previous navigation (since commitContext() is only called after loaders complete, at line 840 or 882)
      • you only include the immediate parent's __beforeLoadContext, not any grandparent or deeper ancestor values from the current navigation

      In contrast, loaders (via getLoaderContext, lines 562–606) and the final match.context (via commitContext, lines 749–764) both aggregate all ancestors' __routeContext and __beforeLoadContext by looping 0..index, ensuring consistent context across a deep match hierarchy.

      If the design intent is for each beforeLoad to see the same aggregated context available to loaders and components for the same ancestors, mirror the aggregation strategy in getLoaderContext—walk inner.matches[0..index-1] and fold their __routeContext and __beforeLoadContext rather than relying on the potentially stale parentMatch.context.

      🧹 Nitpick comments (2)
      packages/vue-router/tests/store-updates-during-navigation.test.tsx (1)

      126-305: Consider preferring upper bounds/ranges over exact update counts for long‑term stability

      The updated expectations (33, 13, 31, 23, 47, 24, 22, 18, 7) look consistent with the new context/loader behavior, but asserting exact counts for most cases makes these tests quite brittle to internal refactors.

      Since this suite is already framed as “doesn't update too many times” and you’re already using >=/<= bounds for the “nothing” case, it may be more robust to standardize on “≤ N” (or a small range) instead of strict toBe(N) here as well, so small internal re-orderings don’t force mechanical test updates while still catching real regressions.

      packages/router-core/src/load-matches.ts (1)

      444-467: Nice fix on context commit ordering; consider centralizing aggregation helper and tightening base context handling

      The new strategy:

      • storing only __beforeLoadContext in executeBeforeLoad,
      • computing loader context in getLoaderContext by folding __routeContext + __beforeLoadContext for matches up to index, and
      • committing match.context in commitContext() after loaders complete (or are skipped),

      correctly removes the old dependence on parent commit timing and makes context deterministic with respect to the match tree rather than loader ordering. This directly addresses the prior race on match.context.

      Two small follow‑ups you might consider:

      1. DRY aggregation logic

        getLoaderContext and commitContext are nearly identical in how they aggregate:

        let context = inner.router.options.context ?? {}
        for (let i = 0; i <= index; i++) {
          const m = inner.router.getMatch(inner.matches[i]!.id)
          context = {
            ...context,
            ...(m.__routeContext ?? {}),
            ...(m.__beforeLoadContext ?? {}),
          }
        }

        versus:

        const context = { ...inner.router.options.context }
        for (let i = 0; i <= index; i++) {
          const m = inner.router.getMatch(innerMatch.id)
          Object.assign(context, m.__routeContext, m.__beforeLoadContext)
        }

        Extracting a shared helper (e.g. buildContextUntilIndex(inner, index)) would keep loader and committed contexts in lockstep and reduce the chance of subtle divergence later.

      2. Defensive base context initialization

        getLoaderContext uses inner.router.options.context ?? {}, which safely handles undefined/null. commitContext uses object spread on inner.router.options.context, which will throw if someone ever passes null.

        Matching getLoaderContext’s pattern here (e.g. start from const base = inner.router.options.context ?? {}; const context = { ...base };) would guard against that edge case and keep both call sites consistent.

      Also applies to: 562-584, 749-764, 879-883

      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 42d4a67a6ef1c41e4bfeee5a79bf8264555fa925 and 562ad189a66105b8801ce062dfc563c8a23f810a.

      📒 Files selected for processing (4)
      • packages/react-router/tests/store-updates-during-navigation.test.tsx (9 hunks)
      • packages/router-core/src/load-matches.ts (7 hunks)
      • packages/solid-router/tests/store-updates-during-navigation.test.tsx (8 hunks)
      • packages/vue-router/tests/store-updates-during-navigation.test.tsx (9 hunks)
      🧰 Additional context used
      📓 Path-based instructions (2)
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Use TypeScript strict mode with extensive type safety for all code

      Files:

      • packages/solid-router/tests/store-updates-during-navigation.test.tsx
      • packages/react-router/tests/store-updates-during-navigation.test.tsx
      • packages/vue-router/tests/store-updates-during-navigation.test.tsx
      • packages/router-core/src/load-matches.ts
      **/*.{js,ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

      Implement ESLint rules for router best practices using the ESLint plugin router

      Files:

      • packages/solid-router/tests/store-updates-during-navigation.test.tsx
      • packages/react-router/tests/store-updates-during-navigation.test.tsx
      • packages/vue-router/tests/store-updates-during-navigation.test.tsx
      • packages/router-core/src/load-matches.ts
      🧠 Learnings (3)
      📓 Common learnings
      Learnt from: nlynzaad
      Repo: TanStack/router PR: 5402
      File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
      Timestamp: 2025-10-08T08:11:47.088Z
      Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
      📚 Learning: 2025-10-08T08:11:47.088Z
      Learnt from: nlynzaad
      Repo: TanStack/router PR: 5402
      File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
      Timestamp: 2025-10-08T08:11:47.088Z
      Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

      Applied to files:

      • packages/solid-router/tests/store-updates-during-navigation.test.tsx
      • packages/react-router/tests/store-updates-during-navigation.test.tsx
      • packages/vue-router/tests/store-updates-during-navigation.test.tsx
      📚 Learning: 2025-12-06T15:03:07.223Z
      Learnt from: CR
      Repo: TanStack/router PR: 0
      File: AGENTS.md:0-0
      Timestamp: 2025-12-06T15:03:07.223Z
      Learning: Add or update tests for any code changes

      Applied to files:

      • packages/solid-router/tests/store-updates-during-navigation.test.tsx
      ⏰ 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). (2)
      • GitHub Check: Preview
      • GitHub Check: Test

Sign in to join this conversation.