Skip to content

Cmd+K palette: jump to any bot, room, or message - #206

Merged
milind-soni merged 1 commit into
mainfrom
feat/command-palette
Aug 17, 2026
Merged

Cmd+K palette: jump to any bot, room, or message#206
milind-soni merged 1 commit into
mainfrom
feat/command-palette

Conversation

@milind-soni

Copy link
Copy Markdown
Owner

In plain terms

⌘K (Ctrl+K) opens a command palette: type a few letters to jump to any bot or room, or search across every transcript — message hits open the exact task they live in. Empty query = a quick switcher list.

Notes

  • Reuses the existing /api/search endpoint with the sidebar's debounce-and-drop-stale pattern; names answer instantly from local state.
  • Ranking is a pure helper (src/lib/palette-rank.ts): prefix matches outrank substring matches, input order preserved within tiers (the caller's order already means something).
  • Selection details that keep keyboards happy: one flat cursor across sections with wrap-around; hover moves selection on mousemove rather than mouseenter so async hits arriving under a resting pointer can't steal the keyboard cursor; Esc closes with stopPropagation so modals underneath don't also react.
  • No new dependencies; mounted after the modals so DOM order keeps it on top within the same z-tier.

Test plan

  • src/lib/palette-rank.test.ts — 5 cases: prefix-beats-substring, case-insensitivity, tie order, no-match filtering, empty-query passthrough
  • Mutation checks: tier swap, dropped filter, dropped lowercasing, empty-query short-circuit — every mutant killed
  • pnpm typecheck clean; full pnpm vitest run green (741 passed); touched files zero oxlint diagnostics
  • Reviewer eyeball: ⌘K → type a bot name fragment → Enter switches; type message text → hit opens the owning task; Esc/backdrop close

🤖 Generated with Claude Code

⌘K / Ctrl+K from anywhere opens a centered switcher: bots and rooms
answer instantly from local state, transcript hits ride the existing
/api/search endpoint a 150ms debounce later (same stale-response guard
as the sidebar search). Empty query is pure switcher mode — every bot
and room, no message section.

Ranking lives in src/lib/palette-rank.ts as a pure helper: prefix
matches outrank substring matches, matching is case-insensitive, and
each tier preserves the caller's order so pinned-first lists survive.
Arrow keys move one flat cursor across the sections, Enter selects
(message hits open the owning bot or room, switching to the hit's task
like the sidebar does), Esc closes. Row hover tracks mousemove rather
than mouseenter so hits arriving under a resting pointer can't steal
the keyboard selection.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@milind-soni, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Limit details: You’ve used all 3 included reviews currently available under your plan.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 43edbb87-def8-4ca9-a4bd-a8b593fbfdcc

📥 Commits

Reviewing files that changed from the base of the PR and between 8b95206 and e50df84.

📒 Files selected for processing (4)
  • src/App.tsx
  • src/components/CommandPalette.tsx
  • src/lib/palette-rank.test.ts
  • src/lib/palette-rank.ts

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

@milind-soni
milind-soni merged commit 32b5b23 into main Aug 17, 2026
5 checks passed
@milind-soni
milind-soni deleted the feat/command-palette branch August 17, 2026 20:35
kargnas added a commit to kargnas/OpenMausBot that referenced this pull request Aug 17, 2026
main의 milind-soni#207(긴 대화 Show-earlier), milind-soni#206(Cmd+K 팔레트), milind-soni#204(iOS
컴패니언), milind-soni#203(스트리밍 코드 하이라이트) 병합. 충돌은 테스트 파일의
node:fs import union뿐이었다.

Tested: pnpm typecheck, pnpm vitest run (94 files, 905 passed, 8 skipped)

Confidence: high
Scope-risk: narrow
Reversibility: clean
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.

1 participant