Skip to content

feat(updater): UpdaterController + GitHub release parsing (#441)#730

Merged
fernandotonon merged 2 commits into
masterfrom
feat/updater-controller-441
Jun 16, 2026
Merged

feat(updater): UpdaterController + GitHub release parsing (#441)#730
fernandotonon merged 2 commits into
masterfrom
feat/updater-controller-441

Conversation

@fernandotonon

Copy link
Copy Markdown
Owner

Summary

Technical Details

Test plan

  • ./build_local/bin/UnitTests --gtest_filter="GitHubReleaseParser*:UpdateVersion*" (16 tests pass)
  • cmake --build build_local --target QtMeshEditor succeeds
  • CI unit-tests-linux green
  • Manual: Help → Check for Updates on portable build (network)

Closes #441

Made with Cursor

Replace the inline Help → Check for Updates handler with a QML-facing
UpdaterController singleton, worker-thread GitHub API fetch, and pure
GitHubReleaseParser with fixture-backed unit tests. Reuses UpdateVersion
for semver compare (#442).

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@fernandotonon, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 36 minutes and 19 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af8f308b-ba55-4708-81d4-8dee6b7c9044

📥 Commits

Reviewing files that changed from the base of the PR and between a639d88 and 79dc80d.

📒 Files selected for processing (15)
  • docs/AUTO_UPDATER_DESIGN.md
  • src/CMakeLists.txt
  • src/UpdateVersion.cpp
  • src/UpdateVersion.h
  • src/UpdateVersion_test.cpp
  • src/mainwindow.cpp
  • src/updater/GitHubReleaseParser.cpp
  • src/updater/GitHubReleaseParser.h
  • src/updater/GitHubReleaseParser_test.cpp
  • src/updater/UpdaterController.cpp
  • src/updater/UpdaterController.h
  • src/updater/UpdaterWorker.cpp
  • src/updater/UpdaterWorker.h
  • tests/CMakeLists.txt
  • tests/fixtures/updater/github-releases-sample.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/updater-controller-441

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1f524a0f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/updater/GitHubReleaseParser.cpp Outdated

result.parseOk = true;
result.release = chosen;
result.comparison = UpdateVersion::compare(localVersion, chosen.tagName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve prerelease suffixes for beta comparisons

When the beta channel is selected, this comparison cannot detect updates between prereleases with the same numeric base, because UpdateVersion::compare() normalizes away everything after -. For example, a user running 3.6.0-beta.1 will compare as Same against 3.6.0-beta.2, so applyCheckResult() emits noUpdate() even though a newer beta exists.

Useful? React with 👍 / 👎.

Comment thread src/updater/UpdaterWorker.cpp Outdated
Comment on lines +49 to +50
QNetworkReply* reply = m_activeReply;
m_activeReply = nullptr;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore stale finished replies after cancellation

If a check is cancelled and another check is started before the aborted reply's finished signal is delivered, this slot handles the stale signal by taking whatever is currently in m_activeReply; that can clear/delete the new request and emit a result for the wrong reply, causing the real update response to be dropped. Use the reply from sender() and ignore it when it is not the current active reply.

Useful? React with 👍 / 👎.

Link updater sources in MaterialEditorQML test builds, ignore stale
QNetworkReply callbacks after cancel/replace, and compare beta prerelease
suffixes explicitly (QVersionNumber drops them).

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

@fernandotonon fernandotonon merged commit 86678f1 into master Jun 16, 2026
21 checks passed
@fernandotonon fernandotonon deleted the feat/updater-controller-441 branch June 16, 2026 23:36
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.

Update: UpdaterController singleton + GitHub release JSON parsing

1 participant