Skip to content

refactor(main): split tab-manager.ts for 450-line rule#96

Merged
hmmhmmhm merged 1 commit into
mainfrom
chore/split-tab-manager
May 6, 2026
Merged

refactor(main): split tab-manager.ts for 450-line rule#96
hmmhmmhm merged 1 commit into
mainfrom
chore/split-tab-manager

Conversation

@hmmhmmhm

@hmmhmmhm hmmhmmhm commented May 5, 2026

Copy link
Copy Markdown
Owner

apps/browser/src/main/tab-manager.ts was 1288 lines, the largest src violation in the personal-agent fleet, exceeding the 450-line rule from AGENTS.md.

Split into apps/browser/src/main/tabs/ with tab-manager.ts as the thin orchestrator:

  • apps/browser/src/main/tab-manager.ts: 389 lines (down from 1288)
  • apps/browser/src/main/tabs/tab-navigation.ts: 277 lines
  • apps/browser/src/main/tabs/tab-error-codes.ts: 197 lines
  • apps/browser/src/main/tabs/tab-fullscreen.ts: 177 lines
  • apps/browser/src/main/tabs/tab-page-loader.ts: 133 lines

All files now under 450 lines. IPC channel signatures preserved.

Verification:

  • pnpm check-types: passed
  • pnpm build: copy:assets step fails on Windows due to a pre-existing mkdir -p bash-ism, unrelated to this refactor

No IPC channel names, message shapes, or DRM-related code changed.

@hmmhmmhm
hmmhmmhm marked this pull request as ready for review May 5, 2026 06:27
@hmmhmmhm
hmmhmmhm merged commit 3e9a912 into main May 6, 2026
2 checks passed
@hmmhmmhm
hmmhmmhm deleted the chore/split-tab-manager branch May 6, 2026 12:15
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