Skip to content

feat(frontend): migrate react-router v5 to TanStack Router#40971

Draft
msyavuz wants to merge 1 commit into
masterfrom
tanstack-router
Draft

feat(frontend): migrate react-router v5 to TanStack Router#40971
msyavuz wants to merge 1 commit into
masterfrom
tanstack-router

Conversation

@msyavuz

@msyavuz msyavuz commented Jun 11, 2026

Copy link
Copy Markdown
Member

SUMMARY

Upgrade react-router to latest tanstack router version

  • Replace BrowserRouter/Switch/Route with a TanStack route tree built from the existing routes.tsx table; route chunks preload on link hover/focus (defaultPreload: 'intent') via fire-and-forget loaders
  • Custom raw-string search param codec so rison payloads round-trip through the router untouched
  • TanstackRouterAdapter replaces ReactRouter5Adapter for use-query-params
  • StandaloneRouter (RouterContextProvider-based, synchronous mount) hosts the menu entry on Flask pages and component tests
  • pushAppHref/replaceAppHref helpers restore v5's basename-prefixing semantics for raw href navigation
  • useUnsavedChangesPrompt now uses useBlocker
  • Migrate all 92 importing files; drop react-router-dom dependency

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

…t-based preloading

- Replace BrowserRouter/Switch/Route with a TanStack route tree built
  from the existing routes.tsx table; route chunks preload on link
  hover/focus (defaultPreload: 'intent') via fire-and-forget loaders
- Custom raw-string search param codec so rison payloads round-trip
  through the router untouched
- TanstackRouterAdapter replaces ReactRouter5Adapter for use-query-params
- StandaloneRouter (RouterContextProvider-based, synchronous mount) hosts
  the menu entry on Flask pages and component tests
- pushAppHref/replaceAppHref helpers restore v5's basename-prefixing
  semantics for raw href navigation
- useUnsavedChangesPrompt now uses useBlocker
- Migrate all 92 importing files; drop react-router-dom dependency
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.16%. Comparing base (f27424d) to head (4c233d9).
⚠️ Report is 25 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #40971    +/-   ##
========================================
  Coverage   64.16%   64.16%            
========================================
  Files        2655     2655            
  Lines      143863   143682   -181     
  Branches    33181    33166    -15     
========================================
- Hits        92306    92199   -107     
+ Misses      49936    49859    -77     
- Partials     1621     1624     +3     
Flag Coverage Δ
hive 39.44% <ø> (-0.02%) ⬇️
mysql 58.19% <ø> (+<0.01%) ⬆️
postgres 58.25% <ø> (+<0.01%) ⬆️
presto 41.03% <ø> (-0.02%) ⬇️
python 59.73% <ø> (+<0.01%) ⬆️
sqlite 57.87% <ø> (+<0.01%) ⬆️
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant