Repository navigation
Fix: Change route name - #14639
Fix: Change route name#14639
Conversation
📝 WalkthroughWalkthroughRoutes enum is updated to add ChangesRoute Structure and Navigation Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/src/routes.tsx`:
- Around line 19-20: Routes.Dataset is built with an extra slash causing
`/dataset//files`; fix it by removing the injected "/" in the template so the
composition uses `${Routes.DatasetBase}${Routes.Files}` (referencing
Routes.Dataset, Routes.Files, Routes.DatasetBase) instead of
`${Routes.DatasetBase}/${Routes.Files}` so the final route becomes
`/dataset/files`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 217a4872-bf5f-44b7-a976-a23de59317cf
📒 Files selected for processing (2)
web/src/hooks/logic-hooks/navigate-hooks.tsweb/src/routes.tsx
| Files = '/files', | ||
| Dataset = `${Routes.DatasetBase}/${Routes.Files}`, |
There was a problem hiding this comment.
Fix double-slash route composition in Routes.Dataset.
At Line 20, Routes.Dataset becomes /dataset//files because Routes.Files already includes a leading slash. This can break matching for path: \${Routes.Dataset}/:id`and conflict with navigations that build/dataset/files/:id`.
Proposed fix
export enum Routes {
DatasetBase = '/dataset',
Files = '/files',
- Dataset = `${Routes.DatasetBase}/${Routes.Files}`,
+ Dataset = `${Routes.DatasetBase}${Routes.Files}`,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Files = '/files', | |
| Dataset = `${Routes.DatasetBase}/${Routes.Files}`, | |
| Files = '/files', | |
| Dataset = `${Routes.DatasetBase}${Routes.Files}`, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/src/routes.tsx` around lines 19 - 20, Routes.Dataset is built with an
extra slash causing `/dataset//files`; fix it by removing the injected "/" in
the template so the composition uses `${Routes.DatasetBase}${Routes.Files}`
(referencing Routes.Dataset, Routes.Files, Routes.DatasetBase) instead of
`${Routes.DatasetBase}/${Routes.Files}` so the final route becomes
`/dataset/files`.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14639 +/- ##
=======================================
Coverage 94.16% 94.16%
=======================================
Files 10 10
Lines 703 703
Branches 112 112
=======================================
Hits 662 662
Misses 25 25
Partials 16 16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
### What problem does this PR solve? Fix: Change route name ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
### What problem does this PR solve? Fix: Change route name ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
What problem does this PR solve?
Fix: Change route name
Type of change