Skip to content

fix(navigation): preserve DTF section in search - #1086

Merged
lcamargof merged 2 commits into
masterfrom
feature/cmdk-preserve-dtf-section
Aug 11, 2026
Merged

fix(navigation): preserve DTF section in search#1086
lcamargof merged 2 commits into
masterfrom
feature/cmdk-preserve-dtf-section

Conversation

@reserve-hermes

@reserve-hermes reserve-hermes commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the current top-level DTF section when switching through Cmd/Ctrl+K search
  • collapse governance proposal and rebalance detail routes to their parent sections
  • fall back to overview when the selected DTF type does not support the current section
  • add rendered navigation regression coverage

Verification

  • pnpm typecheck
  • pnpm lint
  • pnpm test:run (880 passed)
  • live browser verification: proposal → governance and rebalance → auctions

Review

Engineer review required: this changes shared route-selection behavior in the command menu.

Summary by CodeRabbit

  • Bug Fixes

    • Improved command-menu navigation between DTF sections.
    • Preserves the relevant section when switching from governance, auction, staking, and management pages.
    • Maintains the current DTF subroute when available and falls back to the overview when unavailable.
  • Tests

    • Added coverage for DTF and token navigation across supported sections.
  • Documentation

    • Updated the progress ledger with verification and review status.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploying register-app with  Cloudflare Pages  Cloudflare Pages

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

View logs

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 67fa2ed9-ce38-452a-a9c4-c28cd25bc07d

📥 Commits

Reviewing files that changed from the base of the PR and between 37fbfe1 and 0ac694a.

📒 Files selected for processing (1)
  • src/components/command-menu/tests/navigation.test.tsx

📝 Walkthrough

Walkthrough

The 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.

Changes

DTF Navigation

Layer / File(s) Summary
Route-aware DTF navigation and verification
src/components/command-menu/index.tsx, src/components/command-menu/tests/navigation.test.tsx, docs/wiki/progress.md
The command menu derives DTF destinations from the current pathname, preserves valid subroutes, and uses the computed route for links and selections. Parameterized tests cover supported and fallback navigation. The progress ledger records the update and review status.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes preserving the DTF section during search navigation, which is the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/cmdk-preserve-dtf-section

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ebcd6fe and 37fbfe1.

📒 Files selected for processing (3)
  • docs/wiki/progress.md
  • src/components/command-menu/index.tsx
  • src/components/command-menu/tests/navigation.test.tsx

Comment thread src/components/command-menu/tests/navigation.test.tsx
lcamargof
lcamargof previously approved these changes Aug 10, 2026

@lcamargof lcamargof left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@lcamargof
lcamargof merged commit e2b21ff into master Aug 11, 2026
5 checks passed
@lcamargof
lcamargof deleted the feature/cmdk-preserve-dtf-section branch August 11, 2026 00:30
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