[FE Fix]: Correctly handle project changes from entity scoped pages#4498
Conversation
…ects Switching projects while on an entity-scoped page (evaluation, playground, testset) kept the old entity id in the URL. Since that entity does not exist in the target project, the user landed on an empty screen. Preserve only the top-level section segment on project switch and drop nested entity ids. All top-level sections have index pages, so the truncated path always resolves. Logic extracted to a pure helper with regression tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR extracts project-switch URL construction logic from ChangesProject-switch routing refactor
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Railway Preview Environment
|
…luation-or-playground-in-url
…luation-or-playground-in-url
…ts-keeps-evaluation-or-playground-in-url
…ts-keeps-evaluation-or-playground-in-url
Summary
fixes AGE-3790
Testing
QA follow-up
repro is described in ticket
Checklist
Contributor Resources