fix(navigation): preserve DTF section in search - #1086
Conversation
Deploying register-app with
|
| Latest commit: |
0ac694a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3299b556.register-app.pages.dev |
| Branch Preview URL: | https://feature-cmdk-preserve-dtf-se.register-app.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe command menu now preserves valid DTF subroutes when switching between DTF items. It falls back to the overview route for unsupported or missing subroutes. Tests cover governance, auction, staking, management, and root routes. ChangesDTF Navigation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CommandMenu
participant getDTFRoute
participant ReactRouter
User->>CommandMenu: Search and select a DTF item
CommandMenu->>getDTFRoute: Pass current pathname and selected DTF type
getDTFRoute-->>CommandMenu: Return preserved or overview route
CommandMenu->>ReactRouter: Navigate to computed destination
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
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 `@src/components/command-menu/tests/navigation.test.tsx`:
- Around line 41-66: Add two cases to the existing `it.each` for
`/ethereum/index-dtf/0xcurrent/staking` and `/ethereum/index-dtf/0xcurrent`,
expecting `/base/index-dtf/0xtarget/overview`. Keep the tests exercising the
real `CommandMenu` navigation flow and preserve the existing detail-route cases.
🪄 Autofix
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 Plus
Run ID: 51b45271-6cd1-4388-852a-be347ad961d1
📒 Files selected for processing (3)
docs/wiki/progress.mdsrc/components/command-menu/index.tsxsrc/components/command-menu/tests/navigation.test.tsx
Summary
Verification
pnpm typecheckpnpm lintpnpm test:run(880 passed)Review
Engineer review required: this changes shared route-selection behavior in the command menu.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation