Repository navigation
Split Git worktree responsibilities - #17253
Conversation
Greptile SummaryThe PR decomposes the Git worktree implementation into focused modules while retaining a small public facade.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the eligible follow-up scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/main/git/worktree.ts | Replaces the monolithic implementation with a compact public re-export facade. |
| src/main/git/worktree-list-reader.ts | Houses Git-version fallback, worktree parsing orchestration, path normalization, and stale-registration annotation. |
| src/main/git/worktree-scan-cache.ts | Isolates shared in-flight worktree scans and mutation-driven generation invalidation. |
| src/main/git/worktree-add.ts | Isolates worktree creation, base selection, local-base refresh, creation metadata, and cache invalidation. |
| src/main/git/worktree-removal.ts | Isolates worktree removal sequencing and post-removal branch handling. |
| src/main/git/worktree-branch-removal.ts | Isolates guarded branch deletion and preservation behavior. |
| src/main/git/worktree-sparse-state.ts | Isolates bounded filesystem and configuration-based sparse-checkout detection. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
F[worktree.ts facade] --> L[Listing and parsing]
F --> C[Add and sparse creation]
F --> R[Removal and branch cleanup]
F --> M[Move]
L --> P[Path translation]
L --> S[Scan cache and sparse state]
C --> B[Base refresh]
C --> I[Read-cache invalidation]
R --> I
M --> I
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
…-bottom-5-pane-tree-ops
…bottom-6-mobile-troubleshoot
…lines-bottom-7-external-manager
…es-bottom-8-attach-services
…s-bottom-9-hosted-review-creation
…ax-lines-bottom-10-automation-dispatch-events
… ra/max-lines-bottom-11-settings-navigation
…-lines-bottom-12-daemon-init
…ottom-13-gitlab-item-dialog
…lines-bottom-14-relay-dispatcher
…nes-bottom-15-mobile-host-screen
…lines-bottom-16-runtime-file-client
…-lines-bottom-17-ports-panel
…ottom-18-runtime-environments-pane
…ra/max-lines-bottom-19-local-pty-provider
…lines-bottom-20-cdp-bridge # Conflicts: # src/main/browser/cdp-bridge.ts
…ttom-21-git-handler
…ottom-22-linear-item-drawer
…lines-bottom-23-telemetry-events
…nes-bottom-24-resource-usage-status
…ax-lines-bottom-25-remote-terminal-multiplexer
…o ra/max-lines-bottom-26-git-worktree
…6-git-worktree # Conflicts: # config/max-lines-baseline.txt # src/renderer/src/hooks/automation-dispatch-completion.ts
|
Warning Review limit reachedNext included review available in 13 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (17)
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 |
* Split speech session lifecycle * Split terminal output scheduler pipeline * Split mobile browser pane modules * Prune resolved max-lines suppressions * Split pane tree equalization logic * Extract mobile troubleshoot screen styles * Split external automation manager * Split main window service attachments * Split hosted review creation checks * Split automation dispatch event handling * Split settings navigation metadata * Split daemon initialization lifecycle * Split GitLab item dialog * Split relay dispatcher layers * Split mobile host screen * Retarget mobile view settings source test * Split runtime file client layers * Split ports panel layers * Split runtime environments pane layers * Split local PTY provider responsibilities * Split CDP bridge responsibilities * Split relay Git handler responsibilities * Track moved relay Git fetch audit * Split Linear item drawer responsibilities * Split telemetry event schema responsibilities * Split resource usage status responsibilities * Split remote terminal multiplexer responsibilities * Split Git worktree responsibilities * Fix F3-speech for stablyai#17123 * Fix F1-cycle for stablyai#17131 * Fix F4-navtest for stablyai#17157 * Fix F2-allowlist for stablyai#17161
Summary
Stacked on #17248.
Validation
pnpm tcpnpm run check:code-quality:changedpnpm check:max-lines-ratchet— 60 grandfathered suppressionspnpm run check:runtime-electron-ratchetpnpm run check:reliability-gatesgit diff --checkKnown inherited baseline findings
Repository-wide lint reaches the pre-existing three
import/no-cyclewarnings inpane-terminal-output-scheduler.ts; the initial Oxlint pass also reports existing GitLab hook warnings. Repository-wide formatting reports the unchangeduse-terminal-tab-cold-parking.ts. None of those files differs from the stacked base, and all changed-file gates pass.The full Git 2.25.5 binary suite passes 7/8 locally; its unrelated stash case reads this machine's global
merge.conflictStyle=zdiff3, which that Git release predates. Both worktree compatibility cases pass against the exact 2.25.5 binary.Visual proof is N/A because this is an internal Git worktree decomposition with no intended rendered UI change.