feat(updater): UpdaterController + GitHub release parsing (#441)#730
Conversation
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>
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 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".
|
|
||
| result.parseOk = true; | ||
| result.release = chosen; | ||
| result.comparison = UpdateVersion::compare(localVersion, chosen.tagName); |
There was a problem hiding this comment.
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 👍 / 👎.
| QNetworkReply* reply = m_activeReply; | ||
| m_activeReply = nullptr; |
There was a problem hiding this comment.
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>
|



Summary
UpdaterControllerQML singleton with worker-thread GitHub Releases API checks (Update: UpdaterController singleton + GitHub release JSON parsing #441)GitHubReleaseParserwith stable/beta channel selection and fixture-backed unit testsMainWindow::on_actionVerify_Update_triggerednetwork lambda withUpdaterController::checkForUpdates()UpdateVersionsemver compare (Update: Semver-correct version comparison #442)Technical Details
UpdaterWorkerownsQNetworkAccessManageron a worker thread; fetches/releases?per_page=20UpdaterControllerexposes state, channel, install flavor, latest version/url/changelog; emitsupdateAvailable/noUpdate/checkErrorInstallFlavor::updateCommandHint()without hitting GitHubQMessageBoxUX until Update: UpdaterDialog QML — states, changelog viewer, channel picker #449 (UpdaterDialogQML)downloadAndInstall()stubbed for Update: Resumable downloader with progress + cancellation #444updater.check.start,updater.check.success,updater.check.errorTest plan
./build_local/bin/UnitTests --gtest_filter="GitHubReleaseParser*:UpdateVersion*"(16 tests pass)cmake --build build_local --target QtMeshEditorsucceedsCloses #441
Made with Cursor