Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Oct 29, 2025

Summary by CodeRabbit

  • Tests
    • Enhanced end-to-end test coverage with additional interaction scenarios to verify component remounting behavior functions correctly and consistently across routing implementations.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Walkthrough

The PR adds additional "Regenerate search param" button interactions to end-to-end test suites for React Router and Solid Router, verifying remount behavior by clicking an extra time and updating the corresponding expected mount count assertions.

Changes

Cohort / File(s) Summary
E2E Test Updates
e2e/react-router/basic-file-based/tests/app.spec.ts, e2e/solid-router/basic-file-based/tests/app.spec.ts
Added extra "Regenerate search param" button clicks to two remount behavior tests; updated expected mount counts to reflect the additional interactions (remains at 1 for unchanged remountDeps, increases to 3 for changed remountDeps).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Both changes follow the same pattern across two test files (homogeneous edits)
  • Test-only modifications with straightforward interaction additions
  • Expected mount count updates are directly traceable to button click sequences
  • Limited scope reduces cross-file interaction complexity

Possibly related issues

  • solid-router - excessive remounts #5683: Directly related—modifies the same Solid Router e2e test to add extra "Regenerate search param" interactions and update mount count assertions for testing remount behavior.

Poem

🐰 Click, click—the button hops twice,
Mount counts dance with precise device,
Remounts tested, behavior verified true,
One path steady, one blooms anew! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring 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 name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "test(router): make the remount test more thorough" accurately describes the main change in the changeset. The modifications add extra interactions (additional "Regenerate search param" button clicks) to both the React Router and Solid Router end-to-end tests, making them more comprehensive in verifying remount behavior. The title is specific and clear, using conventional commit formatting with a descriptive phrase that immediately communicates the purpose of the changes. A teammate reviewing the git history would quickly understand that this PR enhances test coverage for remount functionality.
✨ 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 test(router)--make-the-remount-test-more-clear-if-there's-extra-mount-initially

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a219007 and e870fd9.

📒 Files selected for processing (2)
  • e2e/react-router/basic-file-based/tests/app.spec.ts (2 hunks)
  • e2e/solid-router/basic-file-based/tests/app.spec.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • e2e/react-router/basic-file-based/tests/app.spec.ts
  • e2e/solid-router/basic-file-based/tests/app.spec.ts
e2e/**

📄 CodeRabbit inference engine (AGENTS.md)

Store end-to-end tests under the e2e/ directory

Files:

  • e2e/react-router/basic-file-based/tests/app.spec.ts
  • e2e/solid-router/basic-file-based/tests/app.spec.ts
🧠 Learnings (1)
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
PR: TanStack/router#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:

  • e2e/solid-router/basic-file-based/tests/app.spec.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 (4)
e2e/solid-router/basic-file-based/tests/app.spec.ts (2)

287-290: LGTM! Additional interaction strengthens the test.

The extra button click and assertion verify that the component consistently avoids remounting when remountDeps doesn't change, making the test more thorough.


302-305: LGTM! Additional interaction validates consistent remount behavior.

The extra button click correctly verifies that the component continues to remount on each interaction when remountDeps changes, strengthening the test coverage.

e2e/react-router/basic-file-based/tests/app.spec.ts (2)

299-302: LGTM! Additional interaction strengthens the test.

The extra button click and assertion verify that the component consistently avoids remounting when remountDeps doesn't change, making the test more thorough.


314-317: LGTM! Additional interaction validates consistent remount behavior.

The extra button click correctly verifies that the component continues to remount on each interaction when remountDeps changes, strengthening the test coverage.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Oct 29, 2025

View your CI Pipeline Execution ↗ for commit e870fd9

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 4m 7s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 18s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-29 03:13:37 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 29, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: e870fd9

@birkskyum birkskyum merged commit 1ec3881 into main Oct 29, 2025
6 checks passed
@birkskyum birkskyum deleted the test(router)--make-the-remount-test-more-clear-if-there's-extra-mount-initially branch October 29, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants