Skip to content

Portfolio alignment + MainUiState refactor - #3

Merged
emir-hasanbegovic merged 2 commits into
mainfrom
feature/portfolio-alignment
Apr 26, 2026
Merged

Portfolio alignment + MainUiState refactor#3
emir-hasanbegovic merged 2 commits into
mainfrom
feature/portfolio-alignment

Conversation

@emir-hasanbegovic

Copy link
Copy Markdown
Contributor

Summary

  • MainUiState refactor: consolidates slotsChanged, connectionsChanged, and pairingTargetChanged into a single stateChanged() signal carrying a canonical MainUiState slice. MainWindow now subscribes once and reads model_->state().{slotList, connections, pairingTarget} — same shape as dish-android's MainUiState and dish-mac's @Published properties. Field is slotList (not slots) because Qt's moc reserves that token.
  • Tooling: .clang-format / .clang-tidy replaced with the canonical TinkerNorth rulesets (md5-identical to dish-android and satellite). Source tree reformatted; all 29 tests still pass.
  • Hooks: .githooks/pre-commit flipped from --dry-run --Werror to autofix-and-restage, matching dish-mac and satellite.
  • CI: clang-format pinned to 22.1.4 via pipx (was unpinned apt — Ubuntu 24.04's v18 disagreed with brew's v22).
  • Release pipeline: new release.yml builds on ubuntu-22.04, packages as .deb + AppImage on tag, uploads to GitHub Releases.
  • Docs: CONTRIBUTING.md updated to reflect autofix hook.

Test plan

  • cmake --build build-debug clean, no errors
  • ctest --output-on-failure --parallel → 29/29 pass
  • Pre-commit hook runs clang-format autofix + clang-tidy advisory (verified during this commit)
  • Manual: tag a v* push and confirm release.yml produces .deb + AppImage

Note on the refactor

MainWindow::onStateChanged() now drives header rebuild, slot list rebuild, and pairing-prompt trigger off a single observation. The old per-signal connect calls have been collapsed accordingly.

Brings the Linux client in line with the rest of the TinkerNorth portfolio
(dish-android, dish-mac, satellite) on tooling, CI, hook semantics, and
data-flow shape, and ships a release pipeline.

Tooling
- .clang-format / .clang-tidy replaced with the canonical TinkerNorth
  rulesets (md5 matches dish-android + satellite verbatim). Source tree
  reformatted; ctest still 100% pass (29/29).
- .githooks/pre-commit flipped from --dry-run --Werror to autofix-and-
  re-stage, matching the dish-mac and satellite hooks.

CI (.github/workflows/linux-ci.yml)
- clang-format pinned to 22.1.4 via pipx (was unpinned apt — Ubuntu
  24.04's v18 disagreed with brew's v22 on braced-init lists).

AppModel refactor — MainUiState
- Replaces the slotsChanged / connectionsChanged / pairingTargetChanged
  trio with one canonical stateChanged() signal carrying a MainUiState
  slice (slotList, connections, pairingTarget). Mirrors dish-android's
  MainViewModel + dish-mac's @published shape so the three clients all
  expose state the same way.
- MainWindow subscribes once and reads model->state().{slotList,
  connections, pairingTarget}. Pairing dialog flow now driven from
  state-change observation instead of a separate signal.
- Field is named slotList not slots because Qt's moc reserves that token.

Release pipeline (new .github/workflows/release.yml)
- Tag-triggered (v*) build of release binary on ubuntu-22.04 (matches
  oldest LTS we want to support at runtime).
- Packages as both .deb (for Debian/Ubuntu) and AppImage (for everyone
  else), uploaded to GitHub Releases.

Documentation
- CONTRIBUTING.md updated to reflect autofix hook semantics.
The Qt signal 'event' shadows QObject::event(QEvent*), which clang flags
as -Wclang-diagnostic-overloaded-virtual. The repo's CMake config
promotes that to a clang-tidy error via dish_strict's -Werror, so CI
clang-tidy fails on every header that pulls in WifiConnectionManager.

Renaming the signal to connectionEvent resolves the conflict without
changing semantics — same payload (ConnectionEvent), same emit sites,
same connect() target in AppModel.
@emir-hasanbegovic
emir-hasanbegovic merged commit e7ec2dd into main Apr 26, 2026
1 check passed
@emir-hasanbegovic
emir-hasanbegovic deleted the feature/portfolio-alignment branch April 26, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant