Skip to content

[audit] Split the GTK App god object along coordinator seams #297

Description

@bnema

Summary

internal/ui/app.go still centralizes too many unrelated responsibilities.

Why this matters

This file has a large merge/conflict surface, broad test/setup requirements, and high coupling across lifecycle, windows, tabs, sessions, downloads, updates, and engine state.

Evidence

  • internal/ui/app.go:76 defines an App that owns GTK lifecycle, windows, tabs, panes, keyboard, downloads, sessions, snapshots, updates, and engine state.
  • internal/ui/app.go is 5,204 lines long with 186 func (a *App) methods.

Suggested scope

  • Continue extraction in staged slices rather than a big-bang rewrite.
  • Target cohesive seams first: window registry, download lifecycle, session restore/snapshot, runtime settings, etc.
  • Keep App as orchestration while moving behavior into focused collaborators.

Acceptance criteria

  • At least one substantial responsibility moves behind a focused service/coordinator boundary.
  • App becomes smaller and easier to reason about without changing behavior.
  • The refactor lands with regression coverage around the moved behavior.

Notes

This is intentionally a lower-priority structural refactor, not an urgent bug fix.

Audit context

  • Audit date: 2026-06-10
  • Audited at commit: 5eba8fd5

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditRaised from a structured codebase auditgoPull requests that update go codehelp wantedExtra attention is neededpriority: lowLower prioritytech debtRefactor or architectural maintenance

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions