refactor(updater): drop the never-matching break-change gate (#8742)

This commit is contained in:
Tunglies
2026-11-27 06:18:37 +00:00
committed by GitHub
parent 1a92ac9c95
commit 385022bd13
27 changed files with 10 additions and 104 deletions
+1 -5
View File
@@ -6,8 +6,6 @@ pub mod notification;
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, specta::Type)]
pub enum NoticeStatus {
#[serde(rename = "info")]
Info,
#[serde(rename = "import_sub_url::ok")]
ImportSubUrlOk,
#[serde(rename = "import_sub_url::error")]
@@ -83,8 +81,7 @@ impl NoticeStatus {
/// test both derive their variant list from here; expected strings stay
/// hand-written in the test so renames cannot slip through.
#[cfg(test)]
pub const ALL: [Self; 34] = [
Self::Info,
pub const ALL: [Self; 33] = [
Self::ImportSubUrlOk,
Self::ImportSubUrlError,
Self::SetConfigError,
@@ -129,7 +126,6 @@ mod tests {
fn notice_status_wire_contract() -> Result<(), serde_json::Error> {
let statuses = NoticeStatus::ALL;
let expected = [
"info",
"import_sub_url::ok",
"import_sub_url::error",
"set_config::error",
+2 -2
View File
@@ -387,11 +387,11 @@ fn sample_frontend_events(uid: &str) -> Vec<(FrontendEvent<'_>, &'static str, se
),
(
FrontendEvent::NoticeMessage {
status: NoticeStatus::Info,
status: NoticeStatus::UpdateFailed,
message: Arc::from("ok"),
},
"verge://notice-message",
json!(["info", "ok"]),
json!(["update_failed", "ok"]),
),
(
FrontendEvent::TimerUpdated { profile_index: uid },
-15
View File
@@ -605,21 +605,6 @@ impl SilentUpdater {
let version = update.version.as_str();
logging!(info, Type::System, "Silent updater: update available: v{version}");
if let Some(body) = &update.body
&& body.to_lowercase().contains("break change")
{
logging!(
info,
Type::System,
"Silent updater: breaking change detected in v{version}, notifying frontend"
);
super::handle::Handle::notice(
super::notify::NoticeStatus::Info,
format!("New version v{version} contains breaking changes. Please update manually."),
);
return Ok(());
}
if Self::verified_cache(&update).is_some() {
logging!(info, Type::System, "Silent updater: v{version} already cached");
} else {