routing fix for sidebar navigation#985
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates sidebar navigation links to use full project-scoped routes derived from URL params, preventing relative path concatenation issues. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The sidebar now assumes
useParamsis available fromreact-router, but in most setups hooks come fromreact-router-dom; double-check the import source to avoid runtime errors. - Consider guarding against a missing or undefined
project_id(e.g., when the sidebar is rendered outside a project route) to prevent generating broken links. - You might want to factor the repeated
/project/${project_id}prefix into a singleprojectBasePathvariable to reduce duplication and make future route changes easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The sidebar now assumes `useParams` is available from `react-router`, but in most setups hooks come from `react-router-dom`; double-check the import source to avoid runtime errors.
- Consider guarding against a missing or undefined `project_id` (e.g., when the sidebar is rendered outside a project route) to prevent generating broken links.
- You might want to factor the repeated `/project/${project_id}` prefix into a single `projectBasePath` variable to reduce duplication and make future route changes easier.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (64.35%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #985 +/- ##
==========================================
+ Coverage 63.78% 64.35% +0.56%
==========================================
Files 91 91
Lines 3916 3919 +3
==========================================
+ Hits 2498 2522 +24
+ Misses 1418 1397 -21
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
urls were getting appended resulting in invalid paths Co-authored-by: Claude <noreply@anthropic.com>
urls were getting appended resulting in invalid paths
Summary by Sourcery
Fix sidebar navigation routing to use full project-scoped paths for all links.
Bug Fixes:
Enhancements: