Skip to content

bring back the "route" in router data#5483

Merged
adhami3310 merged 8 commits into
mainfrom
khaleel/eng-6298-get-symbolic-path-for-dynamic-routes
Jun 23, 2025
Merged

bring back the "route" in router data#5483
adhami3310 merged 8 commits into
mainfrom
khaleel/eng-6298-get-symbolic-path-for-dynamic-routes

Conversation

@adhami3310
Copy link
Copy Markdown
Member

also adds back double bracket for optional routes

@linear
Copy link
Copy Markdown

linear Bot commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Extensive overhaul of Reflex's routing system to support optional routes with double brackets [[...]] and improve route conflict detection, while simplifying route formatting and validation logic.

  • Added robust route conflict detection in reflex/route.py with comprehensive validation for dynamic, optional, and catchall routes
  • Introduced new route patterns in reflex/constants/route.py including OPTIONAL_CATCHALL and OPTIONAL_ARG for double-bracketed routes
  • Simplified route formatting by removing case formatting options in reflex/utils/format.py
  • Updated test suite with extensive route conflict testing scenarios in tests/units/test_route.py
  • Streamlined load event handling in reflex/app.py with more efficient storage and simplified route parsing

8 files reviewed, 6 comments
Edit PR Review Bot Settings | Greptile

Comment thread reflex/.templates/web/app/routes.js
Comment thread tests/units/utils/test_format.py Outdated
Comment thread reflex/route.py
Comment thread reflex/route.py Outdated
Comment thread reflex/route.py
Comment thread reflex/constants/route.py Outdated
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 20, 2025

CodSpeed Performance Report

Merging #5483 will not alter performance

Comparing khaleel/eng-6298-get-symbolic-path-for-dynamic-routes (4293237) with main (5ed8704)

Summary

✅ 8 untouched benchmarks

Copy link
Copy Markdown
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is rad!

@adhami3310 adhami3310 merged commit 8b69b6b into main Jun 23, 2025
41 checks passed
@adhami3310 adhami3310 deleted the khaleel/eng-6298-get-symbolic-path-for-dynamic-routes branch June 23, 2025 22:32
masenf pushed a commit that referenced this pull request Jun 26, 2025
* bring back the "route" in router data

* heh

* typo

* typo

* fix the unit tests

* fix dynamic route test

* huh????

* fix one unit test
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