Skip to content

refactor(git): split oversized repository services - #16161

Closed
nwparker wants to merge 1 commit into
nwparker/pregnant-woman-less-big-2from
nwparker/pregnant-woman-less-big-2-git-github
Closed

nwparker wants to merge 1 commit into
nwparker/pregnant-woman-less-big-2from
nwparker/pregnant-woman-less-big-2-git-github

Conversation

@nwparker

@nwparker nwparker commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 186 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1201 $\color{#cf222e}{\Huge{\mathbf{−}}}$​334 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​867
Prod 160 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10112 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9960 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​152

Summary

  • stacked on refactor(daemon): split oversized PTY services #16160
  • split oversized Git repository, runner, status, and worktree services into concrete domain modules
  • split GitHub PR refresh, ProjectV2 read, and ProjectV2 mutation responsibilities into concrete modules
  • migrate GitHub/GitLab CLI, IPC, runtime, and test callers directly to owning modules with no compatibility barrels
  • keep Git 2.25 fallbacks and native, WSL, SSH, GHES, cancellation, cache, and child-process boundaries intact
  • remove seven additional max-lines suppressions

Verification

  • pnpm run typecheck
  • pnpm exec oxlint --deny-warnings
  • pnpm run check:max-lines-ratchet (178 grandfathered suppressions, no new bypasses)
  • focused Git suites: 675 passed, 4 skipped
  • GitHub, ProjectV2, GitLab, and hosted-review suites: 971/971 passed
  • full pnpm run lint passed on the complete stack

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Too many files changed for review (346 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@nwparker

Copy link
Copy Markdown
Contributor Author

Closing in favour of re-cutting this as several narrow PRs.

Why. This modifies 277 existing files (346 changed). Every other PR in this batch touched 20–70. Across the batch, 13 of 34 PRs turned out to carry behavior changes smuggled into a "pure refactor" — and 9 of those were fully CI-green (see #16360). At that rate a 277-file PR is both where the most regressions would be and the hardest place to find them.

It also never received the two independent behavior audits every other PR in the batch got, it was stacked on #16160 (since merged in modified form), and it overlapped 6 other PRs that have all now landed — so it would have to absorb every one of those changes on rebase.

What replaces it. These files in the domains this PR targeted are still oversized on main and are the actual remaining work:

lines file
2824 src/main/ipc/repos.ts
2679 src/main/ipc/worktree-remote.ts
2373 src/main/ipc/filesystem.ts
2362 src/main/git/status.ts
2175 src/main/git/runner.ts
1975 src/main/ipc/filesystem-watcher.ts
1807 src/main/ipc/ssh.ts
1801 src/main/github/project-view.ts
1693 src/main/git/worktree.ts

Each will be cut from current main as its own PR, small enough to audit to the same standard the other 33 met. No work is lost — the targets are unchanged, only the delivery.

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