Skip to content

Extract application orchestration from MainWindow #26

Description

@singular0

MainWindow owns connection switching, device identity, channel caching, SQLite history, pending
sends, removals, unread state and presentation. Extract a DeviceSession or ApplicationController
so the UI only binds state and invokes commands.

Reference: src/ui/main_window.h:86 and src/ui/main_window.cpp.

The controller should own:

  • CompanionClient and connection/session state.
  • Active-device identity and slot-to-channel identity resolution.
  • Message ingestion and persistence.
  • Pending sends and channel mutations.
  • Channel cache and persistent selection.
  • Application-facing error and status reporting.

Worth doing before direct messages and contacts add a second and third conversation kind to the same
class.


Worth landing before #1 and #2 add more conversation kinds to MainWindow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: uiWidgets, delegates, application wiringpriority: P2Wanted, not urgenttech-debtStructural work on what already exists

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions