[WEB-5569] chore: top nav search enhancements#8226
Conversation
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
WalkthroughThis pull request adds prop forwarding for a search menu close handler across the component hierarchy, from top-nav-power-k through commands-list to search-menu. Additionally, the expandable search hook now tracks keyboard triggers (Cmd/Ctrl+F) to distinguish keyboard-initiated focus from programmatic focus restoration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,mts,cts}📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-10-09T20:42:31.843ZApplied to files:
📚 Learning: 2025-10-21T17:22:05.204ZApplied to files:
🧬 Code graph analysis (1)apps/web/core/components/power-k/ui/modal/search-menu.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (6)
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.
Pull request overview
This PR enhances the top navigation search component to support keyboard shortcut triggering (Cmd+F / Ctrl+F) and ensures the search panel closes properly when a search result is selected.
- Adds keyboard shortcut detection to
useExpandableSearchhook to recognize when Cmd+F triggers focus - Threads
handleSearchMenuClosecallback through components to enable proper panel closure from TopNavPowerK - Updates documentation to reflect support for keyboard shortcut-triggered search
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/web/core/hooks/use-expandable-search.ts | Adds keyboard event listener to detect Cmd+F shortcut and opens panel when focus is triggered by keyboard; updates documentation |
| apps/web/core/components/power-k/ui/modal/search-menu.tsx | Adds optional handleSearchMenuClose prop and calls it before closing PowerK modal to support dual close behavior |
| apps/web/core/components/power-k/ui/modal/commands-list.tsx | Threads handleSearchMenuClose prop from parent to PowerKModalSearchMenu component |
| apps/web/core/components/navigation/top-nav-power-k.tsx | Passes closePanel as handleSearchMenuClose to ensure top nav search closes when results are selected |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* chore: top nav power k search menu enhancements * chore: expandable search panel refactor
* chore: top nav power k search menu enhancements * chore: expandable search panel refactor
* chore: top nav power k search menu enhancements * chore: expandable search panel refactor
Description
This PR includes enhancements for top nav search.
Type of Change
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.