You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turning on Hide default branch makes a folder project disappear when its root is its only workspace. Folder projects have no branches, so this change keeps their roots visible while continuing to hide Git main checkouts.
What Changed
The shared isDefaultBranchWorkspace predicate excludes folder projects, including roots that carry Git branch metadata. Desktop filtering, reveal/import actions, and execution-host row facts now use the corrected classification. Tests cover single-root folders, POSIX/Windows paths and SSH metadata, additional workspaces, lineage, detached/offline Git roots, import preferences, and runtime summaries.
Why
This revisits #22744 as requested in #29720: hiding a folder's only workspace removes the whole project. Correcting the shared classification keeps consumers consistent instead of adding a sidebar-only exception. Existing Git and provisioned-root exceptions remain intact.
Real compiled Electron renderer, same disposable projects, isolated profile, light theme and 1470 × 923 CSS-pixel window. All BrowserWindows remained hidden throughout; screenshots came through Playwright/CDP.
Before: both projects disappear
After: folder root remains, Git main is hidden
The before renderer was compiled using the base predicate, then the fixed source and renderer were restored. Toggling the real switch off shows both roots; toggling it on keeps only the folder root after the fix. An archived folder root remains excluded. Sidebar and controls fit within the viewport.
Testing
Tested the local rendered app using Playwright
Automated regression tests added/updated
On macOS ARM64 with Node 24.21.0 and Bun 1.4.3 (pnpm 12.8.1 for lint, tests and build):
pnpm run typecheck:ci --bun-concurrency=1 --bun-threads=2: all four projects passed.
pnpm lint: the complete lint command passed, including type-aware analysis and all repository gates.
pnpm test src/renderer/src/components/sidebar src/main/runtime/runtime-worktree-ps-summaries.test.ts src/shared/workspace-view --maxWorkers=2: 3,186 passed, one benchmark test skipped, zero failures across 374 files.
pnpm run build:electron-vite --mode e2e: main, preload and renderer built successfully; renderer boot-graph verification passed. The final fixed renderer was rebuilt after capturing the base behavior.
Formatting and git diff --check passed. Regression failures were confirmed before the fix.
A full-suite attempt was stopped after recording eight failures in three files; all eight were reproduced on base commit 93a5a1a20a2c. Two compare macOS /var/... temporary paths with their canonical /private/var/... form, and six involve development rebuild watchers. Re-running all three affected files with TMPDIR=/private/tmp passed: 1,440 passed, one skipped, zero failures (src/main/runtime/orca-runtime.test.ts, config/scripts/process-host-dev-rebuild.test.ts, and src/main/cli/packaged-cli-assets.test.ts). Combined with the completed sidebar/workspace-view run, 4,626 tests passed in these two non-overlapping runs. The entire test suite was not completed.
Full cross-platform CI is waiting for maintainer approval of this fork's workflows. Native Windows/Linux and live SSH were not exercised locally; paths and SSH identity are covered by fixtures. Release packaging and the separate mobile bundle were not built locally.
AI Disclosure
Prepared with OpenAI Codex assistance.
Review
Self-review: one constant-time classification expression changes in production. The rule is independent of OS, coding agent, integration and Git provider. Local and remote consumers share it; no new filesystem, credential, subprocess or network access is introduced. The existing boolean wire field needs no new client capability; older execution hosts retain their behavior until updated. Actual workspace visibility was checked in the hidden Electron renderer; no styling, layout or shortcut changes are included.
Agent skill upstream boundary
Not applicable; no upstream skill-installer material is copied or translated.
Notes
Author: @rotirotirafa. X/Twitter handle not provided.
Checklist
This PR is small and focused
Explained the user-facing before/after, mechanism and approach
Before/after screenshots attached
Self-reviewed for correctness, security and performance
Cross-platform, SSH/remote and path/shortcut impact considered
Full local lint and typecheck, relevant tests and Electron build passed; see testing notes for full-suite and CI status
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
isDefaultBranchWorkspace now excludes folder repositories and requires a non-empty branch. Updated tests expect folder roots to remain visible when “Hide default branch” is enabled, while Git main checkouts remain hidden. Add-repository tests also expect the setting to remain enabled for folder projects.
Priority: ➖ Normal
Severity of issue fixed: Medium
Merge Risk:⚪ Minimal · up to f9eba
Folder roots remain visible when Hide default branch is enabled, while Git and provisioned-root behavior remains unchanged. No material merge risk was identified in the reviewed change.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 6 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Linked Issues check
The change satisfies active issue #29720. isDefaultBranchWorkspace now returns false for folder repositories, including folder roots with branch metadata. The shared predicate keeps folder roots vis…
Out of Scope Changes check
The pull request stays within #29720. Production changes are limited to the shared workspace classification. Test updates verify the corrected classification and its desktop, import, and runtime-summa…
Title check
The title clearly and concisely describes the primary change: keeping folder roots visible when the default branch filter is enabled.
Description check
The description covers the required sections, user impact, implementation, rationale, linked issue, visual proof, testing, limitations, and checklist. It explicitly documents incomplete full-suite, cr…
Full details: Linked Issues check
Explanation
The change satisfies active issue #29720. isDefaultBranchWorkspace now returns false for folder repositories, including folder roots with branch metadata. The shared predicate keeps folder roots visible when Hide default branch is enabled. The predicate still hides Git main worktrees with a branch and preserves provisioned-root, detached, and offline exceptions. Tests cover single-root folders, POSIX and Windows paths, SSH metadata, additional workspaces, lineage, and mixed Git and folder projects.
Full details: Out of Scope Changes check
Explanation
The pull request stays within #29720. Production changes are limited to the shared workspace classification. Test updates verify the corrected classification and its desktop, import, and runtime-summary consumers. No unrelated feature, styling, layout, shortcut, filesystem, credential, subprocess, or network changes are present in the reviewed diff.
Full details: Description check
Explanation
The description covers the required sections, user impact, implementation, rationale, linked issue, visual proof, testing, limitations, and checklist. It explicitly documents incomplete full-suite, cross-platform, SSH, packaging, and mobile validation.
Fix all pre-merge checks with AI
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Thanks @rotirotirafa! Your branch conflicts with main now, so I carried your commit over unchanged in #37444 and added a small test trim on top. You stay the author of the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Turning on Hide default branch makes a folder project disappear when its root is its only workspace. Folder projects have no branches, so this change keeps their roots visible while continuing to hide Git main checkouts.
What Changed
The shared
isDefaultBranchWorkspacepredicate excludes folder projects, including roots that carry Git branch metadata. Desktop filtering, reveal/import actions, and execution-host row facts now use the corrected classification. Tests cover single-root folders, POSIX/Windows paths and SSH metadata, additional workspaces, lineage, detached/offline Git roots, import preferences, and runtime summaries.Why
This revisits #22744 as requested in #29720: hiding a folder's only workspace removes the whole project. Correcting the shared classification keeps consumers consistent instead of adding a sidebar-only exception. Existing Git and provisioned-root exceptions remain intact.
Linked Issue
Fixes #29720
Visual Proof
Real compiled Electron renderer, same disposable projects, isolated profile, light theme and 1470 × 923 CSS-pixel window. All BrowserWindows remained hidden throughout; screenshots came through Playwright/CDP.
The before renderer was compiled using the base predicate, then the fixed source and renderer were restored. Toggling the real switch off shows both roots; toggling it on keeps only the folder root after the fix. An archived folder root remains excluded. Sidebar and controls fit within the viewport.
Testing
On macOS ARM64 with Node 24.21.0 and Bun 1.4.3 (pnpm 12.8.1 for lint, tests and build):
pnpm run typecheck:ci --bun-concurrency=1 --bun-threads=2: all four projects passed.pnpm lint: the complete lint command passed, including type-aware analysis and all repository gates.pnpm test src/renderer/src/components/sidebar src/main/runtime/runtime-worktree-ps-summaries.test.ts src/shared/workspace-view --maxWorkers=2: 3,186 passed, one benchmark test skipped, zero failures across 374 files.pnpm run build:electron-vite --mode e2e: main, preload and renderer built successfully; renderer boot-graph verification passed. The final fixed renderer was rebuilt after capturing the base behavior.git diff --checkpassed. Regression failures were confirmed before the fix.A full-suite attempt was stopped after recording eight failures in three files; all eight were reproduced on base commit
93a5a1a20a2c. Two compare macOS/var/...temporary paths with their canonical/private/var/...form, and six involve development rebuild watchers. Re-running all three affected files withTMPDIR=/private/tmppassed: 1,440 passed, one skipped, zero failures (src/main/runtime/orca-runtime.test.ts,config/scripts/process-host-dev-rebuild.test.ts, andsrc/main/cli/packaged-cli-assets.test.ts). Combined with the completed sidebar/workspace-view run, 4,626 tests passed in these two non-overlapping runs. The entire test suite was not completed.Full cross-platform CI is waiting for maintainer approval of this fork's workflows. Native Windows/Linux and live SSH were not exercised locally; paths and SSH identity are covered by fixtures. Release packaging and the separate mobile bundle were not built locally.
AI Disclosure
Prepared with OpenAI Codex assistance.
Review
Self-review: one constant-time classification expression changes in production. The rule is independent of OS, coding agent, integration and Git provider. Local and remote consumers share it; no new filesystem, credential, subprocess or network access is introduced. The existing boolean wire field needs no new client capability; older execution hosts retain their behavior until updated. Actual workspace visibility was checked in the hidden Electron renderer; no styling, layout or shortcut changes are included.
Agent skill upstream boundary
Notes
Author: @rotirotirafa. X/Twitter handle not provided.
Checklist