Skip to content

refactor: split TabManager into per-concern extension files - #59

Merged
arzafran merged 1 commit into
mainfrom
refactor/wp5-split-tabmanager
Jul 8, 2026
Merged

refactor: split TabManager into per-concern extension files#59
arzafran merged 1 commit into
mainfrom
refactor/wp5-split-tabmanager

Conversation

@arzafran

@arzafran arzafran commented Jul 8, 2026

Copy link
Copy Markdown
Member

What this does

Splits the 5,968-line TabManager class into focused files so working on git polling, browser panels, splits, or session persistence stops recompiling (and re-reading) everything else. Core lifecycle/selection stays in TabManager.swift (now 5,086 lines).

Nuclear-review finding WP5. File surgery by one agent, verified and finished by a second pass.

Summary

  • TabManager+GitMetadataPolling.swift (233) — Agent PID sweep + git metadata timers (orig. 954–1177)
  • TabManager+Browser.swift (268) — browser panel operations (orig. 4227–4486)
  • TabManager+Splits.swift (246) — split creation + backwards-compat split ops (orig. 3906–3947, 4034–4226)
  • TabManager+SessionPersistence.swift (167) — was already a standalone extension at end of file; clean lift
  • Line math: 5,086 + 233 + 268 + 246 + 167 = 6,000 = 5,968 + 32 header lines
  • ~30 members widened private→internal (cross-file references only); isWorkspaceCycleHot becomes internal(set)
  • Registered in project.pbxproj

Test Plan

  • Debug build compiles clean in isolated worktree
  • CI green (TabManagerUnitTests)

TabManager.swift hosted git-metadata polling, browser-panel operations,
split operations, and session persistence alongside core lifecycle in
one 5,968-line class. The four clusters move verbatim to same-type
extension files (5,968 -> 5,086 lines in the core file); stored
properties and deinit stay in the class body. Visibility widened from
private to internal only where the move split a same-file reference.
Nuclear-review WP5.
@arzafran
arzafran merged commit 3e99508 into main Jul 8, 2026
11 of 13 checks passed
@arzafran
arzafran deleted the refactor/wp5-split-tabmanager branch July 8, 2026 04:31
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