📌 Description
src/hooks/useCommandPalette.ts manages command-palette open state and the Cmd/Ctrl-K shortcut, but it is untested. Toggle behaviour and keyboard binding are unverified.
🎯 Requirements and Context
- Cover open, close, and toggle transitions.
- Assert the Cmd-K / Ctrl-K key handler toggles the palette and is removed on unmount.
- Assert it does not toggle while typing in inputs if that guard exists.
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b test/use-command-palette-tests
2. Implement changes
src/hooks/__tests__/useCommandPalette.test.ts — new unit test
src/hooks/useCommandPalette.ts — read only
3. Test and commit
- Run the suite:
pnpm test (or npm test) and pnpm lint.
- Cover edge cases: meta+k vs ctrl+k; listener cleanup on unmount; repeated toggles; key pressed inside an input.
- Include test output (and a short note of any behavioural findings) in the PR.
Example commit message
test: add unit coverage for useCommandPalette shortcut and state
✅ Guidelines
- Minimum 95% test coverage on the new/changed lines.
- Clear, reviewer-friendly documentation and a small, focused diff.
- No regressions against existing suites.
- Timeframe: 96 hours.
🏷️ Labels
type-testing · area-frontend · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN
💬 Community & Support
- Join the CommitLabs contributor Discord to coordinate, ask questions, and get
unblocked fast: https://discord.gg/WV7tdYkJk
- Please introduce yourself in the channel before you start so we can avoid
duplicate work, pair you with a reviewer, and get your PR merged quickly.
- Maintainers actively triage this channel and aim for fast, clear, respectful
reviews — reach out any time you're blocked.
📌 Description
src/hooks/useCommandPalette.tsmanages command-palette open state and the Cmd/Ctrl-K shortcut, but it is untested. Toggle behaviour and keyboard binding are unverified.🎯 Requirements and Context
🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
src/hooks/__tests__/useCommandPalette.test.ts— new unit testsrc/hooks/useCommandPalette.ts— read only3. Test and commit
pnpm test(ornpm test) andpnpm lint.Example commit message
✅ Guidelines
🏷️ Labels
type-testing·area-frontend·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support
unblocked fast: https://discord.gg/WV7tdYkJk
duplicate work, pair you with a reviewer, and get your PR merged quickly.
reviews — reach out any time you're blocked.