Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
refactor: drop the reminder for hosts behind the app
leepokaib4e8e53fa390
diff --git a/apps/linux/src/ui.rs b/apps/linux/src/ui.rsindex 3848f253..090980e7 100644--- a/apps/linux/src/ui.rs+++ b/apps/linux/src/ui.rs@@ -946,10 +946,11 @@ fn recheck_versions(ui: &App) {});}-/// Still compatible, but one side is behind a release the other already runs: a toast-/// (gone on its own or when closed) offers the update, once per pair of versions.+/// Still compatible, but this app is behind the host's release: a toast (gone on its own or+/// when closed) offers the update, once per pair of versions. A host behind this app updates+/// itself, so it gets no reminder.fn remind_updates(ui: &App) {- let (host_version, host) = {+ let host_version = {let mut st = ui.state.borrow_mut();let host_version = st.hello["version"].as_str().unwrap_or_default().to_owned();let key = format!("{host_version}/{}", env!("CARGO_PKG_VERSION"));@@ -957,51 +958,21 @@ fn remind_updates(ui: &App) {return;}st.reminded = Some(key);- let host = st.hello["name"]- .as_str()- .unwrap_or("this computer")- .to_owned();- (host_version, host)+ host_version};- let own = env!("CARGO_PKG_VERSION");- let (title, button, host_side) = if crate::compat::below(&host_version, own) {- (- format!("Codync {own} is available for {host} (it runs {host_version})"),- "Update host",- true,- )- } else if crate::compat::below(own, &host_version) {- (- format!("Codync {host_version} is available for this app"),- "Get update",- false,- )- } else {+ if !crate::compat::below(env!("CARGO_PKG_VERSION"), &host_version) {return;- };+ }let reminder = adw::Toast::builder()- .title(title)- .button_label(button)+ .title(format!("Codync {host_version} is available for this app"))+ .button_label("Get update").timeout(10).build();- let ui2 = ui.clone();- reminder.connect_button_clicked(move |_| {- if host_side {- let ui3 = ui2.clone();- client::call(- "installHostUpdate",- json!({"force": false}),- move |r| match r {- Ok(_) => toast(&ui3, "Updating the host; reconnecting when it's ready…"),- Err(e) => toast(&ui3, &e),- },- );- } else {- let _ = gtk::gio::AppInfo::launch_default_for_uri(- "https://github.com/leepokai/Codync/releases/latest",- None::<>k::gio::AppLaunchContext>,- );- }+ reminder.connect_button_clicked(|_| {+ let _ = gtk::gio::AppInfo::launch_default_for_uri(+ "https://github.com/leepokai/Codync/releases/latest",+ None::<>k::gio::AppLaunchContext>,+ );});ui.toasts.add_toast(reminder);}diff --git a/docs/reference/compatibility.md b/docs/reference/compatibility.mdindex 81c810a3..05dc2055 100644--- a/docs/reference/compatibility.md+++ b/docs/reference/compatibility.md@@ -103,14 +103,16 @@ keeps it enabled (the App Store page shows the truth).### Reminders-While everything still works, a newer release gets a reminder, dismissed per version:+While everything still works, a client behind a newer release gets a reminder, dismissed per+version. A host behind a client gets none: computers update themselves, and the phone usually+trails them (App Store review), so nudging a computer from it would only be noise.-| Client | This app is behind | A computer's host is behind (older than this app) |-|---|---|---|-| iPhone | Card at the top of the bot list (App Store version from the lookup), *Update* opens the App Store | Card with that computer's update steps |-| Mac | Sparkle's own update prompts | Card in the sidebar for other computers (its own host is the app's) |-| Linux app | Toast with *Get update* (release page) | Toast with *Update host* |-| Terminal client | — (it is the host binary) | Status line note pointing to `^k` → Check for updates |+| Client | This app is behind |+|---|---|+| iPhone | Card at the top of the bot list (App Store version from the lookup), *Update* opens the App Store |+| Mac | Sparkle's own update prompts |+| Linux app | Toast with *Get update* (release page) |+| Terminal client | — (it is the host binary) |### Wire shape snapshotdiff --git a/host/src/tui/app.rs b/host/src/tui/app.rsindex a7dda13f..a75573e7 100644--- a/host/src/tui/app.rs+++ b/host/src/tui/app.rs@@ -1117,16 +1117,6 @@ impl App {}After::Hello => {self.mismatch = crate::compat::check(env!("CARGO_PKG_VERSION"), crate::compat::MIN_HOST, &v);- // Still compatible but behind this client: there's a newer host release.- if self.mismatch.is_none()- && let Some(version) = v["version"].as_str()- && crate::compat::below(version, env!("CARGO_PKG_VERSION"))- {- self.flash(&format!(- "Codync {} is available for this host (it runs {version}): ^k → Check for updates",- env!("CARGO_PKG_VERSION")- ));- }v["name"].as_str().unwrap_or("computer").clone_into(&mut self.host);v["home"].as_str().unwrap_or_default().clone_into(&mut self.home);self.backends = v["backends"].as_array().cloned().unwrap_or_default();diff --git a/kit/Sources/CodyncKit/Models/Compatibility.swift b/kit/Sources/CodyncKit/Models/Compatibility.swiftindex ba5b1a7a..b8bd4453 100644--- a/kit/Sources/CodyncKit/Models/Compatibility.swift+++ b/kit/Sources/CodyncKit/Models/Compatibility.swift@@ -88,10 +88,4 @@ public enum UpdateReminder {guard let store, AppVersion.isBelow(current, store), store != dismissed else { return nil }return store}-- /// This app is newer than the host, so that release exists for it; not dismissed for it.- public static func host(app: String, host: String?, dismissed: String?) -> Bool {- guard let host, AppVersion.isBelow(host, app) else { return false }- return dismissed != app- }}diff --git a/kit/Sources/CodyncUI/UpdateNeededCard.swift b/kit/Sources/CodyncUI/UpdateNeededCard.swiftindex 71b604b9..bed030e4 100644--- a/kit/Sources/CodyncUI/UpdateNeededCard.swift+++ b/kit/Sources/CodyncUI/UpdateNeededCard.swift@@ -132,8 +132,6 @@ public final class AppUpdates {public private(set) var store: String?@ObservationIgnored private var askedAt: Date?private var dismissedApp: String? = UserDefaults.standard.string(forKey: "dismissedAppUpdate")- private var dismissedHosts: [String: String] =- UserDefaults.standard.dictionary(forKey: "dismissedHostUpdates") as? [String: String] ?? [:]public init() {}@@ -154,17 +152,6 @@ public final class AppUpdates {Motion.animate { dismissedApp = store }UserDefaults.standard.set(store, forKey: "dismissedAppUpdate")}-- /// The computer runs an older host than this app, so a newer one exists; not dismissed.- public func hostBehind(_ store: BotStore) -> Bool {- store.mismatch == nil && UpdateReminder.host(app: AppVersion.current, host: store.hostVersion?.version,- dismissed: dismissedHosts[store.computer.id])- }-- public func dismissHost(_ store: BotStore) {- Motion.animate { dismissedHosts[store.computer.id] = AppVersion.current }- UserDefaults.standard.set(dismissedHosts, forKey: "dismissedHostUpdates")- }}/// A quiet, dismissible note that a newer release is out (everything still works).@@ -213,21 +200,6 @@ public struct UpdateReminderCard: View {}}-/// The newer-release reminders for the shown computers (and, with `appUpdates`, this app).-public struct UpdateReminders: View {- let stores: [BotStore]-- public init(stores: [BotStore]) { self.stores = stores }-- public var body: some View {- // Empty when there's nothing newer: no space taken.- VStack(spacing: 0) {- AppUpdateReminder()- ForEach(stores, id: \.computer.id) { HostUpdateReminder(store: $0) }- }- }-}-/// The App Store has a newer app (iPhone; needs `AppUpdates` in the environment).public struct AppUpdateReminder: View {@Environment(AppUpdates.self) private var appUpdates: AppUpdates?@@ -247,39 +219,3 @@ public struct AppUpdateReminder: View {}}}--/// This computer runs an older host than this app.-public struct HostUpdateReminder: View {- let store: BotStore- @Environment(AppUpdates.self) private var appUpdates: AppUpdates?- @Environment(\.hostUpdate) private var hostUpdate-- public init(store: BotStore) { self.store = store }-- public var body: some View {- if let appUpdates, appUpdates.hostBehind(store) {- let canUpdate = hostUpdate?.available(store) == true- UpdateReminderCard(- title: "Codync \(AppVersion.current) is available for \(store.hostName)",- detail: UpdateReminderText.host(store, instructions: !canUpdate),- actionTitle: canUpdate ? "Update" : nil,- action: { hostUpdate?.action(store) },- dismiss: { appUpdates.dismissHost(store) })- .padding(.vertical, 4)- .transition(.opacity)- }- }-}--enum UpdateReminderText {- @MainActor static func host(_ store: BotStore, instructions: Bool) -> String {- let runs = "It runs \(store.hostVersion?.version ?? "an older version")."- guard instructions else { return runs }- let how = switch store.hello?.os {- case "macos": "Open Codync on that Mac and choose Check for Updates."- case "linux": "Run codync-host update there, or use Check for updates in its Codync app."- default: "Update Codync on that computer."- }- return "\(runs) \(how)"- }-}diff --git a/kit/Tests/CodyncKitTests/CodyncKitTests.swift b/kit/Tests/CodyncKitTests/CodyncKitTests.swiftindex 17be64ac..617abf22 100644--- a/kit/Tests/CodyncKitTests/CodyncKitTests.swift+++ b/kit/Tests/CodyncKitTests/CodyncKitTests.swift@@ -120,10 +120,4 @@ import Testing#expect(UpdateReminder.app(current: "2.5.0", store: "2.4.0", dismissed: nil) == nil)#expect(UpdateReminder.app(current: "2.5.0", store: nil, dismissed: nil) == nil)#expect(UpdateReminder.app(current: "", store: "2.5.0", dismissed: nil) == nil)-- #expect(UpdateReminder.host(app: "2.5.0", host: "2.4.3", dismissed: nil))- #expect(!UpdateReminder.host(app: "2.5.0", host: "2.4.3", dismissed: "2.5.0"))- #expect(UpdateReminder.host(app: "2.6.0", host: "2.4.3", dismissed: "2.5.0"))- #expect(!UpdateReminder.host(app: "2.5.0", host: "2.5.0", dismissed: nil))- #expect(!UpdateReminder.host(app: "2.5.0", host: nil, dismissed: nil))}