Skip to content

Find projects and repo groups from Cmd+J - #6193

Merged
brennanb2025 merged 5 commits into
mainfrom
brennanb2025/repo-group-search-reveal
Jun 23, 2026
Merged

brennanb2025 merged 5 commits into
mainfrom
brennanb2025/repo-group-search-reveal

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds typed Cmd+J results for renderable repo groups and project/repo headers.
  • Selecting a project or repo-group result stores a durable sidebar-row reveal request, switches the sidebar to repo grouping when needed, clears sidebar filters including host visibility, expands project-group ancestors, scrolls/highlights the target, and does not activate a worktree.
  • Reuses the existing sidebar virtualized reveal pipeline and keeps legacy active-workspace reveal/rename behavior working.

Design Review

  • Scratch design doc: tmp/brennan-yolo-lite/cmd-j-project-group-search-design.md (ignored, not included in PR).
  • auto-design-review-fix completed after 5 iterations with CLEAN: no P0/P1 findings.
  • I re-read the reviewed doc before implementation and kept the implementation scoped to the requested Cmd+J project/group jump behavior.

Implementation Notes

  • Added palette-project-results.ts for pure Cmd+J project/repo-group result building and ranking.
  • Exported sidebar-owned project header reveal target logic so Cmd+J uses the same header keys the sidebar renders.
  • Added store-backed pendingRevealSidebarRow state and sidebar consumption/retry/cleanup logic.
  • Added tests for project/group matching, renderable-target suppression, oversized query safety, and legacy host-scope filter clearing.
  • No agent-facing prompt text was added or edited.

Completeness Verification

  • First completeness pass found two issues: non-renderable repo targets and focus restore after project/group selection.
  • Both were fixed.
  • Second completeness pass reported complete and 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

  • Round 1: two reviewers found an untracked new module concern and a design-system negative letter-spacing issue.
  • Round 2: reviewers found host-scope reveal and shared-project ancestor expansion issues, plus the same row title tracking issue.
  • Round 3: both reviewers returned clean after fixes.
  • Round 4: one reviewer returned clean; the other noted English fallback strings in non-English catalogs. This matches config/localization-audit.md, which documents pnpm run sync:localization-catalog seeding 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

  • Verdict after behavior validation: product behavior validated; initial land after fixes was only because full lint found a pre-existing exhaustive-switch cleanup plus missing localization catalog entries.
  • Fixes applied: removed the unnecessary exhaustive switch default in task-page-github-work-item-status.ts; ran pnpm run sync:localization-catalog; localized new project-result descriptions; full pnpm run lint now passes.

Manual UI/product validation covered:

  • Cmd+J typed search shows Repo group and Project rows.
  • Selecting a repo-group row switched sidebar grouping, cleared a filter that hid the target, revealed the group header, and left activeWorktreeId: null.
  • Selecting a project row expanded the collapsed ancestor group, revealed/highlighted the project header, cleared pendingRevealSidebarRow, and left activeWorktreeId: null.

Screenshot evidence (ignored local artifacts, not committed):

  • .playwright-cli/page-2026-06-23T19-23-31-011Z.png — palette results with Repo group and Project.
  • .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

  • CDP automation did not trigger Meta+J; validation opened the same palette via the sidebar Search control and exercised real UI typing/selection.
  • No live SSH server was used in manual validation. The host-scope reveal path is covered by code review and focused unit coverage for legacy host-scope clearing.
  • Locale sync intentionally seeds English fallbacks into non-English catalogs per the documented localization workflow; real translation refreshes are separate.

Post-PR Stabilization

  • Pending: after PR creation, this run will wait 8 minutes, inspect CodeRabbit and CI checks, fix actionable issues, and repeat until checks pass. Do not merge.

Made with Orca 🐋

@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@brennanb2025, we couldn't start this review because you've reached your PR review rate limit.

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 @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 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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c9fbb58a-8806-4193-925c-f5231fcf8f35

📥 Commits

Reviewing files that changed from the base of the PR and between bf32163 and 84b249f.

📒 Files selected for processing (1)
  • src/renderer/src/components/WorktreeJumpPalette.tsx
📝 Walkthrough

Walkthrough

This PR adds "Projects & Groups" as a new navigation target in the Cmd+J jump palette. A new palette-project-results.ts module implements ranked project/repo-group search with query normalization, tokenization, and multi-rule scoring. The palette integrates these results as ProjectTargetPaletteItem entries rendered with project/repo-group badges; selecting one calls a new revealSidebarRow UISlice action. The sidebar reveal mechanism in WorktreeList is generalized from worktree-id-based to row-key-based, gaining ancestor-expansion and bounded-retry logic. SidebarFilterState gains a workspaceHostScope field, and ScrollToCurrentWorkspaceRevealRequestDetail becomes a discriminated union. Five locale files receive new strings for these surfaces, the exhaustive-switch fallback is removed from PR icon tone logic, and the worktree display-name tracking class is removed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main feature addition: enabling Cmd+J search to find and navigate to projects and repo groups.
Description check ✅ Passed The description comprehensively covers all required template sections: Summary, Design Review, Implementation Notes, Completeness Verification, Code Review Loop, Validation with test results and command outputs, Brennan Test Changes, Assumptions/Gaps, and Post-PR Stabilization notes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Add 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 win

Document 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 win

Explain 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 into activateAndRevealWorktree during 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 = true

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


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dcb78166-4850-47c1-b117-7d85c3f36d92

📥 Commits

Reviewing files that changed from the base of the PR and between ab04b1b and 71ba841.

📒 Files selected for processing (15)
  • src/renderer/src/components/WorktreeJumpPalette.tsx
  • src/renderer/src/components/cmd-j/palette-project-results.ts
  • src/renderer/src/components/cmd-j/palette-results.test.ts
  • src/renderer/src/components/sidebar/WorktreeList.tsx
  • src/renderer/src/components/sidebar/visible-worktrees.test.ts
  • src/renderer/src/components/sidebar/visible-worktrees.ts
  • src/renderer/src/components/sidebar/worktree-list-groups.ts
  • src/renderer/src/components/task-page-github-work-item-status.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/scroll-to-current-workspace-status.ts
  • src/renderer/src/store/slices/ui.ts
💤 Files with no reviewable changes (1)
  • src/renderer/src/components/task-page-github-work-item-status.ts

@brennanb2025
brennanb2025 merged commit cf39bd7 into main Jun 23, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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