Skip to content

Split ProgramaApp.swift (5,854); dedupe file-watchers; clarify the three config systems #100

Description

@arzafran

Three parts:

  1. ProgramaApp.swift split: DEBUG windows, SettingsView's sections (body is one 1,130-line computed property), settings enums, design-system helpers, Commands scene. Clean seams cut it to ~a fifth.
  2. File-watcher logic exists three times (twice in ProgramaConfig.swift, once in KeyboardShortcutSettingsFileStore.swift) and the in-file copies have already drifted in retry/backoff behavior. One watcher helper.
  3. Config-system boundaries: the general-purpose settings.json store lives in a file misleadingly named KeyboardShortcutSettingsFileStore.swift; GhosttyConfig and settings.json both write the same sidebar-tint UserDefaults keys with no declared precedence; every setting is enumerated twice by hand (@AppStorage list vs resetAllSettings()) with no compiler link. The store's ~40 hand-written parse blocks could become a declarative table (the sibling programa.json store proves the idiom).

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