Conversation
Just a simplification since these are getting lengthy and repetitive already.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughCentralises keyboard shortcut handling by adding a new Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
🧹 Nitpick comments (1)
app/components/Package/Header.vue (1)
124-143: Clean refactor consolidating keyboard shortcut handlers.The loop-driven approach reduces duplication and improves maintainability. The uniform "compute → check → preventDefault → navigate" pattern is clear.
One minor nitpick: the type annotation includes
false, but the expression on line 128 (props.pkg && {...}) can only returnnull,undefined, or the object—neverfalse. You could simplify the type:🔧 Tighten the type annotation
-const shortcuts: [string, () => RouteLocationRaw | null | false | undefined][] = [ +const shortcuts: [string, () => RouteLocationRaw | null | undefined][] = [
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 45267a1e-308c-41d4-9ddf-d7b804dc0930
📒 Files selected for processing (1)
app/components/Package/Header.vue
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/components/AppHeader.vue (1)
201-204: Keep the header shortcut mapping single-sourced.The
cand,routes are now declared here and indesktopLinks, so a future key or target change can desynchronise the visiblearia-keyshortcutsmetadata from the handler logic. Hoisting these two definitions into one shared constant would keep this refactor aligned with its “less repetition” goal.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b5c8189f-6b58-4efa-a928-c5242f2bbeca
📒 Files selected for processing (4)
app/app.vueapp/components/AppHeader.vueapp/components/Package/Header.vueapp/composables/useShortcuts.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- app/components/Package/Header.vue
🔗 Linked issue
N/A
📚 Description
Just a simplification since these are getting lengthy and repetitive
already.