Skip to content

Commit 31aeece

Browse files
committed
fix(osd): show "No update is currently available" instead of a perpetual "Checking for updates…"
The Updates tab's idle status was "Checking for updates…", which never resolves: the update model only tracks positive availability (UpdateState has no "check completed" signal), so on a device already on the latest version it sat on "Checking…" indefinitely, implying a check that never finishes. Show a resolved "No update is currently available." instead — the wording the design already specifies (osd-menu-plan.md §5, "deliberately not a claim that a remote check established 'latest'"). - updateprompt.cpp: kCheckingStatus -> kNoUpdateStatus (both idle call sites). - updateprompt.hpp: hidden_status_ defaults empty so it falls through to the single kNoUpdateStatus source rather than duplicating the literal; ignored/requested states still set their own text. - main.cpp: the notify-mode startup seed matches, so the seed and first live tick agree (no flicker). A newer release still shows what's new and the Update-now/Ignore actions, unchanged. Launcher builds clean, 21 unit tests pass, clang-format-18 clean; independently code-reviewed.
1 parent 51d2902 commit 31aeece

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ minor versions may include breaking changes.
88

99
## [Unreleased]
1010

11+
### Fixed
12+
- **Settings ▸ Updates** no longer sits on "Checking for updates…" forever when you're already on
13+
the latest version. That text implied a check that never finishes; it now shows a resolved
14+
**"No update is currently available."** (a newer release still shows what's new and the update
15+
actions, unchanged).
16+
1117
## [0.0.5] - 2026-07-15
1218

1319
### Fixed

launcher/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ std::string update_policy_status(SelfUpdateMode mode) {
5454
case SelfUpdateMode::Off:
5555
return "Updates are off. Update Deckback in Discover or run flatpak update.";
5656
case SelfUpdateMode::Notify:
57-
return "Checking for updates…";
57+
return "No update is currently available.";
5858
case SelfUpdateMode::Auto:
5959
return "Automatic updates are enabled. New versions install when they are available.";
6060
}

launcher/src/updateprompt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace {
2828

2929
constexpr std::size_t kMaxNotesLen = 4000;
3030
constexpr long kReleasesTimeoutSec = 6;
31-
constexpr std::string_view kCheckingStatus = "Checking for updates…";
31+
constexpr std::string_view kNoUpdateStatus = "No update is currently available.";
3232
constexpr std::string_view kIgnoredStatus =
3333
"This available version is ignored. A newer version will appear here.";
3434
constexpr std::string_view kRequestedStatus =
@@ -384,7 +384,7 @@ void UpdatePromptController::tick(bool on_watch) {
384384
(void)on_watch;
385385
if (!cfg_.osd) return;
386386
if (!cfg_.state || !cfg_.state->available()) {
387-
feed(false, std::string(kCheckingStatus), "");
387+
feed(false, std::string(kNoUpdateStatus), "");
388388
return;
389389
}
390390
const std::string commit = cfg_.state->commit();
@@ -398,7 +398,7 @@ void UpdatePromptController::tick(bool on_watch) {
398398
if (notify_) kick_changelog();
399399
}
400400
if (!notify_) {
401-
feed(false, hidden_status_.empty() ? std::string(kCheckingStatus) : hidden_status_, "");
401+
feed(false, hidden_status_.empty() ? std::string(kNoUpdateStatus) : hidden_status_, "");
402402
return;
403403
}
404404
const ChangelogView cv = current_changelog();

launcher/src/updateprompt.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ class UpdatePromptController {
114114
void feed(bool has_update, const std::string& status, const std::string& notes);
115115

116116
UpdatePromptConfig cfg_;
117-
DevToolsClient client_; // input-thread only (the confirm toast)
118-
std::string last_commit_; // last commit tick() reacted to (edge detection)
119-
bool notify_ = false; // an un-ignored update is available
120-
std::string hidden_status_ = "Checking for updates…";
117+
DevToolsClient client_; // input-thread only (the confirm toast)
118+
std::string last_commit_; // last commit tick() reacted to (edge detection)
119+
bool notify_ = false; // an un-ignored update is available
120+
std::string hidden_status_; // empty -> the generic "no update" idle status (kNoUpdateStatus)
121121

122122
// Last values fed to the OSD, so tick() only calls set_update_model on a change.
123123
bool fed_has_ = false;

0 commit comments

Comments
 (0)