Repository navigation
Find projects and repo groups from Cmd+J - #6193
Conversation
Co-authored-by: Orca <[email protected]>
|
Warning Review limit reached
More reviews will be available in 26 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds "Projects & Groups" as a new navigation target in the Cmd+J jump palette. A new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 4
🧹 Nitpick comments (3)
src/renderer/src/components/cmd-j/palette-project-results.ts (1)
166-186: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd short “Why” comments for ranking and query guard behavior.
The ordered ranking rules and the early query exits are policy-heavy and non-obvious; a 1–2 line rationale near each block will reduce accidental behavior drift.
As per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
📝 Suggested patch
function projectRankingForCandidate( query: string, candidate: CmdJProjectSearchResult ): RankedProjectResult | null { + // Why: keep Cmd+J ranking predictable by preferring exact/prefix/type-intent + // matches before fuzzy token scoring. const title = normalizeQuery(candidate.title) if (query === title) { return { result: candidate, rule: 1, score: 0 } } @@ export function searchCmdJProjectResults({ @@ }): CmdJProjectSearchResult[] { + // Why: avoid scanning candidates for pathological or noisy inputs to keep + // palette interactions responsive and deterministic. if (isCmdJPaletteQueryTooLarge(query)) { return [] } const normalizedQuery = normalizeQuery(query)Also applies to: 216-223
Source: Coding guidelines
src/renderer/src/components/WorktreeJumpPalette.tsx (2)
770-792: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument why this set mirrors sidebar-renderable repos.
This logic is intentionally broader than “repos with active worktrees” because Lines 777-790 include empty repos, imported-worktree cards, and pending creations. Add a short
// Why:comment so future edits preserve the revealability contract.Suggested comment
+ // Why: project targets must only include repo rows the sidebar can mount and + // reveal, including empty repos, imported-worktree cards, and pending creations. const renderableProjectRepoIds = useMemo(() => {As per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Source: Coding guidelines
1364-1380: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExplain the reveal-only selection behavior.
Project/group selection deliberately reveals a sidebar row and restores previous focus without activating a worktree. Add a short
// Why:comment so this does not regress intoactivateAndRevealWorktreeduring future cleanup.Suggested comment
const handleSelectProjectTarget = useCallback( (result: CmdJProjectSearchResult) => { + // Why: project/group results navigate the sidebar only; they must not + // activate a workspace, so return focus to the previous surface. skipRestoreFocusRef.current = trueAs per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: dcb78166-4850-47c1-b117-7d85c3f36d92
📒 Files selected for processing (15)
src/renderer/src/components/WorktreeJumpPalette.tsxsrc/renderer/src/components/cmd-j/palette-project-results.tssrc/renderer/src/components/cmd-j/palette-results.test.tssrc/renderer/src/components/sidebar/WorktreeList.tsxsrc/renderer/src/components/sidebar/visible-worktrees.test.tssrc/renderer/src/components/sidebar/visible-worktrees.tssrc/renderer/src/components/sidebar/worktree-list-groups.tssrc/renderer/src/components/task-page-github-work-item-status.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/scroll-to-current-workspace-status.tssrc/renderer/src/store/slices/ui.ts
💤 Files with no reviewable changes (1)
- src/renderer/src/components/task-page-github-work-item-status.ts
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Summary
Design Review
tmp/brennan-yolo-lite/cmd-j-project-group-search-design.md(ignored, not included in PR).auto-design-review-fixcompleted after 5 iterations withCLEAN: no P0/P1 findings.Implementation Notes
palette-project-results.tsfor pure Cmd+J project/repo-group result building and ranking.pendingRevealSidebarRowstate and sidebar consumption/retry/cleanup logic.Completeness Verification
completeand verified typed-only search, no worktree activation, store-backed reveal, legacy reveal/rename compatibility, filter/host clearing, repo grouping switch, ancestor expansion, stale cleanup, SSH/cross-platform assumptions, and no agent-facing prompt changes.Code Review Loop
config/localization-audit.md, which documentspnpm run sync:localization-catalogseeding English placeholders for ordinary UI copy changes; no code issue remained.Validation
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/cmd-j/palette-results.test.ts src/renderer/src/components/sidebar/visible-worktrees.test.ts src/renderer/src/components/feature-interaction-writer-boundaries.test.ts— passed, 78 tests.pnpm run typecheck:web— passed.pnpm run typecheck— passed during Brennan validation.pnpm run lint— passed.git diff --check— passed.pnpm exec oxlint <changed files>— passed earlier in the loop.Brennan Test Changes
land after fixeswas only because full lint found a pre-existing exhaustive-switch cleanup plus missing localization catalog entries.task-page-github-work-item-status.ts; ranpnpm run sync:localization-catalog; localized new project-result descriptions; fullpnpm run lintnow passes.Manual UI/product validation covered:
Repo groupandProjectrows.activeWorktreeId: null.pendingRevealSidebarRow, and leftactiveWorktreeId: null.Screenshot evidence (ignored local artifacts, not committed):
.playwright-cli/page-2026-06-23T19-23-31-011Z.png— palette results withRepo groupandProject..playwright-cli/page-2026-06-23T19-24-02-389Z.png— repo-group reveal after filter/grouping cleanup..playwright-cli/page-2026-06-23T19-25-26-496Z.png— project reveal highlight.Assumptions / Gaps
Meta+J; validation opened the same palette via the sidebar Search control and exercised real UI typing/selection.Post-PR Stabilization
Made with Orca 🐋