Skip to content

Split GhosttyTerminalView.swift (9,490) and TerminalWindowPortal.swift (2,045) #97

Description

@arzafran

GhosttyTerminalView.swift hosts 6+ subsystems (surface, IME, focus arbitration, overlays, bell, background-log, render stats); GhosttySurfaceScrollView alone is ~2,780 lines mixing 6 concerns. The +Keyboard/+Mouse/+DragDrop/+Accessibility split convention already exists in this module and simply was not applied to the rest.

TerminalWindowPortal.swift mixes divider hit-testing, portal bookkeeping, and a static cross-window registry.

Hard boundary: hitTest pointer gating, forceRefresh, and the keyDown path are protected typing-latency structures; this is file reorganization only, zero behavioral reshaping of those paths.


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