Skip to content

fix(router): opt-in to React Router v7 future flags to clear console warnings - #782

Open
aryanpatil-07 wants to merge 1 commit into
AOSSIE-Org:mainfrom
aryanpatil-07:fix/react-router-v7-future-flags
Open

aryanpatil-07 wants to merge 1 commit into
AOSSIE-Org:mainfrom
aryanpatil-07:fix/react-router-v7-future-flags

Conversation

@aryanpatil-07

@aryanpatil-07 aryanpatil-07 commented Oct 26, 2026 •

Copy link
Copy Markdown

Description

Resolves the two React Router future flag warnings displayed in the browser console on application load:

  1. React Router Future Flag Warning: React Router will begin wrapping state updates in 'React.startTransition' in v7.
  2. React Router Future Flag Warning: Relative route resolution within Splat routes is changing in v7.

Changes Made

  • Added future={{ v7_startTransition: true, v7_relativeSplatPath: true }} to <BrowserRouter> in frontend/src/main.tsx to opt in early to React Router v7 behavior and eliminate deprecation warnings.

How to Test

  1. Start the frontend: npm run dev
  2. Open http://localhost:5173 in browser.
  3. Open DevTools Console.
  4. Verify that the two React Router Future Flag Warning messages are gone.
  5. Verify normal route navigation (Home, Auth, About, etc.) continues to work without disruption.

Visual Verification

  • Console is clean of React Router deprecation warnings on initial load.

Checklist

  • My code follows the code style and guidelines of this project.
  • I have signed off my commits using -s in compliance with the DCO.
  • Routing and page transitions work smoothly with no regression.

Summary by CodeRabbit

  • Improvements
    • Navigation now supports smoother transitions and more consistent relative routing, including within nested routes. These updates help keep navigation behavior aligned with the app’s configured base path.

…warnings

Signed-off-by: Aryan Patil <aryanpatil0700@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a89aed2a-46c5-4fb6-853c-4ab884230c3e
Commits

Reviewing files that changed from the base of the PR and between 6c6eefa and 86c30a2.

Files selected for processing: 1
  • frontend/src/main.tsx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

BrowserRouter retains import.meta.env.BASE_URL as its basename and now enables the v7_startTransition and v7_relativeSplatPath future flags.

Changes: Router configuration

Layer / File(s) Summary
BrowserRouter future flags
frontend/src/main.tsx
BrowserRouter now enables v7_startTransition and v7_relativeSplatPath. Its basename remains import.meta.env.BASE_URL.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: rounakkumaragarwal

Merge Risk: Minimal · up to 86c30

The router flags are supported and no merge-blocking issue remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: opting into the React Router v7 future flags on BrowserRouter in frontend/src/main.tsx, which the PR objectives say is meant to clear two console warnings on load. The…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: opting into the React Router v7 future flags on BrowserRouter in frontend/src/main.tsx, which the PR objectives say is meant to clear two console warnings on load. The title is specific and matches the changeset, so it passes.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@aryanpatil-07 aryanpatil-07 changed the title fix(router): opt-in to React Router v7 future flags to clear console … fix(router): opt-in to React Router v7 future flags to clear console warnings Oct 26, 2026
@gitcordapp

gitcordapp Bot commented Oct 26, 2026

Copy link
Copy Markdown

Link your account with Gitcord

Thanks for opening this PR, @aryanpatil-07!

To receive Discord notifications and contributor tracking for this organization:

  1. Join Discord: https://discord.gg/hjUhu33uAn
  2. In Discord, run /link aryanpatil-07
  3. Paste the verification code into your GitHub bio (or a public gist)
  4. Click Verify in Discord (or run /verify-link aryanpatil-07)

Once linked, Gitcord can notify you about reviews, merges, and more.

— Posted by Gitcord

@aryanpatil-07
aryanpatil-07 marked this pull request as ready for review October 29, 2026 03:42

This branch has not been deployed

No deployments
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.

1 participant