Skip to content

Split AppDelegate.swift (11,871 lines); untangle handleCustomShortcut #95

Description

@arzafran

~2,940 lines are free-standing types (VSCode integration, CLI installer, typing profilers, menu-bar rendering, NSWindow/NSApplication swizzles) with zero dependency on the AppDelegate class; the mechanical 5-file split is blocked only by one fileprivate that needs widening.

Inside the class: handleCustomShortcut is one 966-line function doing ~55 sequential dispatch checks with undocumented precedence between palette/browser/app-shortcut concerns, and per-window command-palette state is fragmented across 7 dictionaries with duplicated manual teardown.

Longer-term (flagged, not for this issue): AppDelegate.shared is consumed from 213 call sites across 25 files; Codex proposed extracting a MainWindowRegistry + SurfaceMoveCoordinator as the first cut.


From the 2026-07-09 nuclear review (10 module reviewers + Codex cross-model pass, disprove-first). Line refs are against the reductive-audit branch (PR #81).

Metadata

Metadata

Assignees

No one assigned

    Labels

    nuclear-reviewFrom the 2026-07-09 whole-codebase nuclear reviewtech-debtKnown latent issue / maintenance debt

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions