Skip to content

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.

fix(apps): keep a switched-off push setting per computer and explain where settings moved

leepokaid1c7e24dd4b9
diff --git a/apps/Codync.xcodeproj/project.pbxproj b/apps/Codync.xcodeproj/project.pbxproj
index 2f799137..376afccd 100644
--- a/apps/Codync.xcodeproj/project.pbxproj
+++ b/apps/Codync.xcodeproj/project.pbxproj
@@ -13,6 +13,7 @@
0C920E4962F182ADF75670C5 /* CodyncBot-tablet-Ink.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 120FD9DBA315A6DD543463D8 /* CodyncBot-tablet-Ink.ttf */; };
0D6E2869DC5A1BC7D6385444 /* CodyncOrb-Dot.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0C44BCF971511A5E94D073D5 /* CodyncOrb-Dot.ttf */; };
107232310A15C4D9A3BCF466 /* AppStore+Shortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = C518FF3FFD22C3A114B6D1B8 /* AppStore+Shortcuts.swift */; };
+ 1302DAC1A6D9AE9E33654B84 /* RowLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B708DF60FB00E1724260BCD2 /* RowLabel.swift */; };
16C24A622E33414C24B0C148 /* AppearanceSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0814BD0C30F01A163FBDF896 /* AppearanceSettings.swift */; };
17DD96A91B1EC2AE699F4A2F /* ViewingBadge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C0E04490F5C56FD070539E6 /* ViewingBadge.swift */; };
1855DC364C2F8E5B62878BD8 /* CodyncBot-teardrop-Ink.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 203A43D8DF8D3832F95FA837 /* CodyncBot-teardrop-Ink.ttf */; };
@@ -159,6 +160,7 @@
AD18A04CD014230F1B7B0535 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
B274A0195CB3B2409EA4C194 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
B6E13F8EA6C7B0DA4D899FEE /* RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = "<group>"; };
+ B708DF60FB00E1724260BCD2 /* RowLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RowLabel.swift; sourceTree = "<group>"; };
B97102DEC6029268332DF901 /* AccessRequestView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessRequestView.swift; sourceTree = "<group>"; };
BB1B021A5F4CCAA3D180C2CB /* ReviewInvitationModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewInvitationModifier.swift; sourceTree = "<group>"; };
C3BB9F034194450254CE14EC /* CodyncBot-wedge-Tint.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "CodyncBot-wedge-Tint.ttf"; sourceTree = "<group>"; };
@@ -314,6 +316,7 @@
ECD0B4EA4BBA2BB2826C4362 /* PairingView.swift */,
BB1B021A5F4CCAA3D180C2CB /* ReviewInvitationModifier.swift */,
B6E13F8EA6C7B0DA4D899FEE /* RootView.swift */,
+ B708DF60FB00E1724260BCD2 /* RowLabel.swift */,
0A87B0091DAF0E4807D62017 /* SettingsView.swift */,
9AD0BD16672E128A4F26272B /* SignInButtons.swift */,
CFEBE2E6A9D0AF0A0D89FFE7 /* UsageView.swift */,
@@ -705,6 +708,7 @@
89CA3972915769DBA315876F /* Push.swift in Sources */,
CF8160C37D98BD7C1472CF49 /* ReviewInvitationModifier.swift in Sources */,
0631979397E0D6822747E03A /* RootView.swift in Sources */,
+ 1302DAC1A6D9AE9E33654B84 /* RowLabel.swift in Sources */,
BF77DD7946621D8818EDAB9B /* SettingsView.swift in Sources */,
76E77CC8A2B7C74213512FAB /* SignInButtons.swift in Sources */,
684F7F77EECBA0BD95BDD658 /* UsageView.swift in Sources */,
diff --git a/apps/android/WhatsNew.md b/apps/android/WhatsNew.md
index 98748716..6652e1de 100644
--- a/apps/android/WhatsNew.md
+++ b/apps/android/WhatsNew.md
@@ -7,78 +7,10 @@ released version's section; a version without one gets the PRs' "What's New: And
else a generic "Bug fixes and improvements" line. Delete old sections.
-->
-## 2.28.0
+## 2.29.0
### zh-Hant
-- 主助理的頭像右下角新增金色星星;點一下詳細頁的星星,即可了解它如何追蹤目標、協調 bots 與定時關心進度。
-- 電腦連成網路後,Bot 可以請其他電腦上的 Bot 幫忙。
-- 可以從 ChatGPT 或 Claude 透過聯結器請你的 Bot 做事。
+- 「設定」現在是「狀態」右邊的獨立分頁,只放這支手機自己的設定。電腦的擴充套件、語音、螢幕、推送通知與連線,都移到「管理電腦」裡那台電腦的卡片上。
### en-US
-- Your lead agent now has a gold star on its avatar. Tap the larger star in its details to learn how it follows your goals, coordinates bots, and checks in.
-- Bots can ask bots on your other computers once they share a network.
-- ChatGPT or Claude can give your bots tasks through the Codync connector.
-
-## 2.27.0
-
-### zh-Hant
-- 擴充套件的列表改回往下捲動,聯結器捲到底會自動載入更多。點項目只看詳情,按「Add」才加入。
-- 用量也會顯示這台電腦上其他 agent 的額度。Cursor 會用本機登入向 cursor.com 查詢。
-
-### en-US
-- Extensions lists scroll again; connectors load more at the end. Tapping one only opens it; Add adds it.
-- Adds other agents' limits. Cursor asks cursor.com.
-
-## 2.26.2
-
-### zh-Hant
-- Bot 傳來的圖片會直接顯示在聊天裡,點一下可以放大看,不用先下載。
-- 電腦上的 Codync 版本太舊時,更新提示多了「Update now」按鈕,直接從手機叫那台電腦更新。
-- 擴充套件一次顯示一個分類:智慧體、聯結器或技能,每個列表都分頁。點列表兩側的圓形按鈕或左右滑動翻頁,每頁可選 6、10、20 或 50 筆。
-- 電腦使用自建中繼時,設定和連線狀態會顯示該中繼的地址,不再一律寫成 Cloudflare。
-- 可以建立使用 WorkBuddy 的 Bot,在聊天裡登入即可。
-
-### en-US
-- Images a bot sends now show right in the chat; tap one to see it full size, no download needed.
-- When a computer's Codync is too old for this app, Update now on the notice updates that computer from your phone.
-- Extensions shows Agents, Connectors or Skills in pages: tap the round buttons or swipe, 6 to 50 per page.
-- A private relay shows its address in Settings and status.
-- Bots can run WorkBuddy; sign in from the chat.
-
-## 2.26.0
-
-### zh-Hant
-- Bot 工作時,Gemini 與 OpenAI 的語音會主動告訴你它在做什麼、有沒有等你核准或遇到問題,做完就念出結果。
-- 通話中短暫斷線再連上時,錯過的回覆會補念給你聽。
-- Gemini 或 OpenAI 通話斷線時會自動重新連上並接著聊,不必重打。
-- 通話的通知會顯示通話時長、狀態和 Bot 正在做的事。
-- Gemini 與 OpenAI 的語音用你正在說的語言回答,你換語言它就跟著換。
-
-### en-US
-- While the bot works, the Gemini and OpenAI voice says what it's doing, when an approval waits or something fails, and reads the result.
-- Replies missed while a call reconnects are read once it's back.
-- A dropped Gemini or OpenAI call reconnects without hanging up.
-- The call's notification shows its length, state and what the bot is doing.
-- The Gemini and OpenAI voice answers in the language you speak and follows when you switch.
-
-## 2.25.0
-
-### zh-Hant
-- 每台電腦都有一個主助理,固定在列表最上面:它會主動跟進你的事,每天兩次看看有沒有該提醒或能幫忙的,需要時請你授權 Gmail 等服務;打電話給它時由它先開口。
-- 語音通話:連線中顯示來回的線,中途換語音不必掛斷,結束只留一行標題,點開看逐字稿。
-- Bot 可以做 Artifact:報告、追蹤表、儀表板這類要回來看的內容會以卡片出現在聊天裡,點開看完整內容,直接在下方留言請它改,改好就自動更新。
-- 每個 Bot 的「資料庫」收齊它做的 Artifact,以及聊天裡分享過的檔案和圖片。
-- 可以建立使用 Hermes Agent 的 Bot。
-- Bot 之間交辦工作不必等待,對方的回覆會回到發問的 Bot,再由它回覆你。
-- 帳號選單裡的「電腦與設定」和它打開的頁面同名。
-- 新增聯結器失敗後再試一次,會使用你改好的金鑰。
-- 在設定開啟「顯示思考細節」後,點一下工作中 Bot 的狀態膠囊,就能展開這一輪的思考與步驟。
-- 點對話上方的 Bot 會打開它的詳情、資料庫與設定;「新會話」改到 Bot 列表的長按選單。
-
-### en-US
-- Each computer has a lead bot on top that follows up, checks in twice a day and speaks first on calls.
-- Calls leave one titled line; tap it for the transcript. Change voices mid-call as settings close.
-- Bots make artifacts as chat cards you can ask to edit; each bot's Library holds them and its files.
-- Create Hermes Agent bots; bots hand off work without waiting.
-- Settings › Show thinking details unfolds a bot's steps.
-- Tap a chat's title for bot details; New session is under touch & hold.
+- Settings is now its own tab, next to State, with only this phone's own settings. Your computer's Extensions, Voice chat, Screen, Push notifications and Connection are on its card in Manage computers.
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AccountSwitcherView.kt b/apps/android/app/src/main/kotlin/com/codync/android/AccountSwitcherView.kt
index a0383533..a3f65593 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AccountSwitcherView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AccountSwitcherView.kt
@@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
-import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
@@ -113,16 +112,6 @@ import com.kyant.shapes.RoundedRectangle
}
}
-/** An icon and a short name, with a chevron when it leads somewhere. */
-@Composable internal fun RowLabel(title: String, systemImage: String, tint: Color = Palette.text, chevron: Boolean = false,
- modifier: Modifier = Modifier) {
- Row(modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
- Box(Modifier.width(26.dp), contentAlignment = Alignment.Center) { Symbol(systemImage, size = 20.dp, tint = tint) }
- Text(tr(title), Modifier.weight(1f), style = Type.body, color = tint)
- if (chevron) Symbol("chevron.right", size = 13.dp, tint = Palette.tertiary)
- }
-}
-
/** The account's photo; its first letter on a tinted circle until (or unless) the photo loads. */
@Composable internal fun AccountAvatar(url: String?, email: String?, size: Dp) {
Box(Modifier.size(size).clip(Capsule()).background(Palette.bubbleUser).clearAndSetSemantics {}, contentAlignment = Alignment.Center) {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ComputersView.kt b/apps/android/app/src/main/kotlin/com/codync/android/ComputersView.kt
index 0be8dcac..e08f313f 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ComputersView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ComputersView.kt
@@ -124,10 +124,7 @@ private fun CardRows.computerRows(state: AppState, store: AppStore, inAccount: B
}
if (BuildConfig.PUSH_CONFIGURED) row {
CodyncSwitch(state.notifications, store::notifications, Modifier.fillMaxWidth()) {
- Row(Modifier.weight(1f), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
- Box(Modifier.width(26.dp), contentAlignment = Alignment.Center) { Symbol("bell", size = 20.dp, tint = Palette.text) }
- Text(tr("Push notifications"), style = Type.body, color = Palette.text)
- }
+ RowLabel("Push notifications", "bell", modifier = Modifier.weight(1f))
}
}
row { ConnectionRow(state.computers.first(), store) }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/RowLabel.kt b/apps/android/app/src/main/kotlin/com/codync/android/RowLabel.kt
new file mode 100644
index 00000000..1cc144ee
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/RowLabel.kt
@@ -0,0 +1,24 @@
+package com.codync.android
+
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.width
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.dp
+import com.codync.android.design.*
+
+/** An icon and a short name, with a chevron when it leads somewhere. */
+@Composable internal fun RowLabel(title: String, systemImage: String, tint: Color = Palette.text, chevron: Boolean = false,
+ modifier: Modifier = Modifier) {
+ Row(modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
+ Box(Modifier.width(26.dp), contentAlignment = Alignment.Center) { Symbol(systemImage, size = 20.dp, tint = tint) }
+ Text(tr(title), Modifier.weight(1f), style = Type.body, color = tint)
+ if (chevron) Symbol("chevron.right", size = 13.dp, tint = Palette.tertiary)
+ }
+}
diff --git a/apps/ios/App/CodyncApp.swift b/apps/ios/App/CodyncApp.swift
index 9ec5ec5c..c3450996 100644
--- a/apps/ios/App/CodyncApp.swift
+++ b/apps/ios/App/CodyncApp.swift
@@ -143,6 +143,7 @@ final class AppStore {
}
CrashReports.shared.start()
contextID = storage.id
+ Self.splitPushSwitch(contexts: [nil, storage.accountID] + session.accounts.map(\.id))
(accounts, cloud) = Self.makeAccounts(storage, session: session)
}
@@ -324,6 +325,25 @@ final class AppStore {
// A revoke that went through forgot it already.
if accounts.computers.contains(where: { $0.id == id }) { accounts.forget(id) }
}
+
+ /// A computer's push switch: saved here, then the computer is told to alert this iPhone or to stop.
+ func setNotifications(_ id: ComputerID, _ on: Bool) {
+ accounts.setNotifications(id, on)
+ if let store = accounts.store(for: id) { PushRegistrar.shared.syncDevice(with: store) }
+ Analytics.shared.capture(.settingChanged(.push, on: on))
+ }
+
+ /// 2.28.0 had one push switch for every computer; switched off, it becomes each saved computer's own switch.
+ /// Accounts Clerk hasn't restored by launch keep theirs on.
+ private static func splitPushSwitch(contexts ids: [String?]) {
+ let key = "notificationsEnabled"
+ defer { UserDefaults.standard.removeObject(forKey: key) }
+ guard UserDefaults.standard.object(forKey: key) as? Bool == false else { return }
+ for id in Set(ids) {
+ let context = SharedStore.Context(accountID: id)
+ context.computers = context.computers.map { var computer = $0; computer.notifications = false; return computer }
+ }
+ }
}
final class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
diff --git a/apps/ios/Kit/Sources/CodyncKit/Models/Computer.swift b/apps/ios/Kit/Sources/CodyncKit/Models/Computer.swift
index 479000dd..decfea30 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Models/Computer.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Models/Computer.swift
@@ -36,6 +36,13 @@ public struct Computer: Codable, Hashable, Sendable, Identifiable {
self.color = color
}
+ /// Keeps what this device picked (color, route, push) over a newer copy from pairing, the account or `hello`.
+ public mutating func keepDevicePicks(from previous: Computer) {
+ color = previous.color
+ route = previous.route
+ notifications = previous.notifications
+ }
+
/// `true` when `id` really is the computer ID of `signKey`.
public var isConsistent: Bool {
Data(base64URL: signKey).map { $0.count == 32 && RelayCrypto.computerId(signKey: $0) == id } ?? false
diff --git a/apps/ios/Kit/Sources/CodyncUI/Store/AccountStore.swift b/apps/ios/Kit/Sources/CodyncUI/Store/AccountStore.swift
index 3886f8fb..13751a28 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Store/AccountStore.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Store/AccountStore.swift
@@ -102,12 +102,7 @@ public final class AccountStore {
let identity = try DeviceIdentity.load(context: storage)
var computer = try await HostConnector.pair(pairing, identity: identity, deviceName: deviceName, platform: platform)
guard !retired else { throw CancellationError() }
- // Picked on this device: re-pairing keeps them.
- if let previous = saved.first(where: { $0.id == computer.id }) {
- computer.color = previous.color
- computer.route = previous.route
- computer.notifications = previous.notifications
- }
+ if let previous = saved.first(where: { $0.id == computer.id }) { computer.keepDevicePicks(from: previous) }
save(computer)
open(computer)
return computer
@@ -125,33 +120,25 @@ public final class AccountStore {
/// Saved with the computer on this device; its channel reconnects over the new order right away.
public func setRoute(_ id: ComputerID, _ route: ConnectionRoute) {
- let value: ConnectionRoute? = route == .automatic ? nil : route
- if let i = saved.firstIndex(where: { $0.id == id }) {
- saved[i].route = value
- persist()
- }
- stores[id]?.updateComputer { $0.route = value }
+ updateSaved(id) { $0.route = route == .automatic ? nil : route }
stores[id]?.restartStream()
- refreshList()
}
public func setColor(_ id: ComputerID, _ color: String) {
- if let i = saved.firstIndex(where: { $0.id == id }) {
- saved[i].color = color
- persist()
- }
- stores[id]?.updateComputer { $0.color = color }
- refreshList()
+ updateSaved(id) { $0.color = color }
}
- /// Saved with the computer on this device; the caller then registers or unregisters this device's push.
+ /// Saved with the computer on this device.
public func setNotifications(_ id: ComputerID, _ on: Bool) {
- let value: Bool? = on ? nil : false
+ updateSaved(id) { $0.notifications = on ? nil : false }
+ }
+
+ private func updateSaved(_ id: ComputerID, _ change: (inout Computer) -> Void) {
if let i = saved.firstIndex(where: { $0.id == id }) {
- saved[i].notifications = value
+ change(&saved[i])
persist()
}
- stores[id]?.updateComputer { $0.notifications = value }
+ stores[id]?.updateComputer(change)
refreshList()
}
@@ -314,9 +301,7 @@ public final class AccountStore {
if let previous = saved.first(where: { $0.id == computer.id && $0.signKey == computer.signKey }) {
computer.urls = previous.urls
computer.boxKey = previous.boxKey
- computer.color = previous.color
- computer.route = previous.route
- computer.notifications = previous.notifications
+ computer.keepDevicePicks(from: previous)
}
save(computer)
open(computer)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Store/BotStore+Connection.swift b/apps/ios/Kit/Sources/CodyncUI/Store/BotStore+Connection.swift
index cb5a37e2..79f29ce7 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Store/BotStore+Connection.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Store/BotStore+Connection.swift
@@ -216,13 +216,11 @@ extension BotStore {
Task { [weak self] in
for await computer in updates {
guard let self, !self.retired else { return }
- // The color, route and notifications are picked on this device; the transport's copy may be older.
+ // The transport's copy of this device's picks may be older.
self.updateComputer { current in
- let (color, route, notifications) = (current.color, current.route, current.notifications)
- current = computer
- current.color = color
- current.route = route
- current.notifications = notifications
+ var next = computer
+ next.keepDevicePicks(from: current)
+ current = next
}
}
}
diff --git a/apps/ios/Kit/Tests/CodyncUITests/AccessRenewalTests.swift b/apps/ios/Kit/Tests/CodyncUITests/AccessRenewalTests.swift
index c4e4af15..5f495349 100644
--- a/apps/ios/Kit/Tests/CodyncUITests/AccessRenewalTests.swift
+++ b/apps/ios/Kit/Tests/CodyncUITests/AccessRenewalTests.swift
@@ -68,6 +68,7 @@ struct AccessRenewalTests {
var computer = Computer(id: id, name: "Desk", signKey: renewalHostKey.base64URL, urls: ["http://192.168.1.20:19223"])
computer.color = "blue"
computer.route = .directOnly
+ computer.notifications = false
storage.computers = [computer]
let accounts = AccountStore(storage: storage, cloud: cloud) { computer in
BotStore(computer: computer, storage: storage) { _ in FakeRemote(.connecting) }
@@ -99,6 +100,7 @@ struct AccessRenewalTests {
#expect(accounts.pendingAccess[id] == nil)
#expect(storage.computers.first?.color == "blue")
#expect(storage.computers.first?.route == .directOnly)
+ #expect(storage.computers.first?.notifications == false)
#expect(storage.computers.first?.urls == computer.urls)
}
diff --git a/apps/ios/Kit/Tests/CodyncUITests/StoreTests.swift b/apps/ios/Kit/Tests/CodyncUITests/StoreTests.swift
index 0ce576a1..d5756a7d 100644
--- a/apps/ios/Kit/Tests/CodyncUITests/StoreTests.swift
+++ b/apps/ios/Kit/Tests/CodyncUITests/StoreTests.swift
@@ -375,6 +375,23 @@ private func botEvent(_ id: String, name: String, rev: Int) -> String {
account.retire()
}
+@MainActor @Test func eachComputersPushSwitchIsSavedWithIt() async throws {
+ let (storage, suite) = context()
+ defer { UserDefaults(suiteName: suite)?.removePersistentDomain(forName: suite) }
+ let saved = randomComputer("Saved")
+ storage.computers = [saved]
+ let account = AccountStore(storage: storage, cloud: nil) { _ in
+ BotStore(computer: saved, storage: storage) { _ in FakeRemote(.ready(.direct)) }
+ }
+ defer { account.retire() }
+ account.setNotifications(saved.id, false)
+ #expect(storage.computers.first?.notifications == false)
+ #expect(account.store(for: saved.id)?.computer.notifications == false)
+ account.setNotifications(saved.id, true)
+ #expect(storage.computers.first?.notifications == nil)
+ #expect(account.store(for: saved.id)?.computer.notifications == nil)
+}
+
extension FakeRemote {
func setCancelResult(_ result: MailboxCancel) { cancelResult = result }
}
diff --git a/apps/ios/Views/AccountSwitcherView.swift b/apps/ios/Views/AccountSwitcherView.swift
index 365d20ee..df2f5acf 100644
--- a/apps/ios/Views/AccountSwitcherView.swift
+++ b/apps/ios/Views/AccountSwitcherView.swift
@@ -183,36 +183,6 @@ struct GoogleSignInButton: View {
}
}
-/// An icon and a short name, with a chevron when it leads somewhere.
-struct RowLabel: View {
- let title: String
- let systemImage: String
- var tint: Color = Palette.text
- var chevron = false
-
- init(_ title: String, systemImage: String, tint: Color = Palette.text, chevron: Bool = false) {
- self.title = title
- self.systemImage = systemImage
- self.tint = tint
- self.chevron = chevron
- }
-
- var body: some View {
- HStack(spacing: 12) {
- Image(systemName: systemImage)
- .font(.system(size: 17))
- .frame(width: 26)
- Text(L10n.tr(title))
- Spacer(minLength: 8)
- if chevron {
- Image(systemName: "chevron.right").font(.caption.weight(.semibold)).foregroundStyle(Palette.tertiary)
- }
- }
- .foregroundStyle(tint)
- .contentShape(Rectangle())
- }
-}
-
/// The account's photo; its first letter on a tinted circle until (or unless) the photo loads.
struct AccountAvatar: View {
let url: URL?
diff --git a/apps/ios/Views/ComputersView.swift b/apps/ios/Views/ComputersView.swift
index 995f7503..482ea542 100644
--- a/apps/ios/Views/ComputersView.swift
+++ b/apps/ios/Views/ComputersView.swift
@@ -152,6 +152,7 @@ private struct ComputerRows: View {
/// Set when this iPhone's access to the computer can be revoked.
let revoke: (() -> Void)?
let remove: () -> Void
+ @Environment(AppStore.self) private var app
@Environment(AccountStore.self) private var accounts
@State private var coloring = false
@State private var voiceSettings = false
@@ -168,11 +169,8 @@ private struct ComputerRows: View {
.buttonStyle(.plain)
}
}
- Toggle(isOn: Binding(get: { store.computer.notifications ?? true }, set: setNotifications)) {
- HStack(spacing: 12) {
- Image(systemName: "bell").font(.system(size: 17)).frame(width: 26)
- Text(L10n.tr("Push notifications"))
- }
+ Toggle(isOn: Binding(get: { store.computer.notifications ?? true }, set: { app.setNotifications(store.computer.id, $0) })) {
+ RowLabel("Push notifications", systemImage: "bell")
}
.toggleStyle(.codync)
connection
@@ -236,13 +234,6 @@ private struct ComputerRows: View {
}
}
- /// This computer's push switch: saved here, then the computer is told to alert this iPhone or to stop.
- private func setNotifications(_ on: Bool) {
- accounts.setNotifications(store.computer.id, on)
- PushRegistrar.shared.syncDevice(with: store)
- Analytics.shared.capture(.settingChanged(.push, on: on))
- }
-
/// How this iPhone reaches the computer: the short name on the row, the whole route in the menu.
private var connection: some View {
DropdownMenu {
diff --git a/apps/ios/Views/RowLabel.swift b/apps/ios/Views/RowLabel.swift
new file mode 100644
index 00000000..c355b727
--- /dev/null
+++ b/apps/ios/Views/RowLabel.swift
@@ -0,0 +1,32 @@
+import CodyncKit
+import SwiftUI
+
+/// An icon and a short name, with a chevron when it leads somewhere.
+struct RowLabel: View {
+ let title: String
+ let systemImage: String
+ var tint: Color = Palette.text
+ var chevron = false
+
+ init(_ title: String, systemImage: String, tint: Color = Palette.text, chevron: Bool = false) {
+ self.title = title
+ self.systemImage = systemImage
+ self.tint = tint
+ self.chevron = chevron
+ }
+
+ var body: some View {
+ HStack(spacing: 12) {
+ Image(systemName: systemImage)
+ .font(.system(size: 17))
+ .frame(width: 26)
+ Text(L10n.tr(title))
+ Spacer(minLength: 8)
+ if chevron {
+ Image(systemName: "chevron.right").font(.caption.weight(.semibold)).foregroundStyle(Palette.tertiary)
+ }
+ }
+ .foregroundStyle(tint)
+ .contentShape(Rectangle())
+ }
+}
diff --git a/apps/ios/Views/SettingsView.swift b/apps/ios/Views/SettingsView.swift
index ea0d4750..c3becf11 100644
--- a/apps/ios/Views/SettingsView.swift
+++ b/apps/ios/Views/SettingsView.swift
@@ -8,6 +8,7 @@ import SwiftUI
struct SettingsView: View {
@Environment(AppStore.self) private var app
@Environment(\.openURL) private var openURL
+ @Environment(\.scenePhase) private var scenePhase
@State private var notificationsAllowed: Bool?
@AppStorage(Analytics.enabledKey) private var analyticsEnabled = true
@State private var confirmStartOver = false
@@ -83,6 +84,10 @@ struct SettingsView: View {
[DialogAction("Start over", destructive: true) { Task { await app.startOver() } }]
}
.task { notificationsAllowed = await PushRegistrar.shared.isAllowed() }
+ // The tab stays alive: coming back from iOS Settings reads the permission again.
+ .onChange(of: scenePhase) { _, phase in
+ if phase == .active { Task { notificationsAllowed = await PushRegistrar.shared.isAllowed() } }
+ }
.codyncSheet(isPresented: $aboutAnalytics) { AnalyticsSheet() }
}
diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.md
index 408477f1..ba3324f3 100644
--- a/apps/ios/WhatsNew.md
+++ b/apps/ios/WhatsNew.md
@@ -10,6 +10,8 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o
### zh-Hant
- 評分邀請只會在你使用一段時間、看完 Bot 的成果並回到列表後出現,不會在開啟 App 時打擾你。也可以隨時從設定前往 App Store 評分。
+- 「設定」現在是「狀態」右邊的獨立分頁,只放這支 iPhone 自己的設定。每台電腦的擴充套件、語音、螢幕、推送通知與連線,都移到「管理電腦」裡那台電腦的卡片上;推送通知可以逐台電腦開關。
### en-US
- Rating invitations wait until you have used Codync for a while, viewed a bot's result, and returned to the list. You can also rate Codync anytime from Settings.
+- Settings is now its own tab, next to State, with only this iPhone's own settings. Each computer's Extensions, Voice chat, Screen, Push notifications and Connection are on its card in Manage computers, and push can be turned off for each computer.
diff --git a/docs/design/ui-conventions.md b/docs/design/ui-conventions.md
index 07a163b8..22b07684 100644
--- a/docs/design/ui-conventions.md
+++ b/docs/design/ui-conventions.md
@@ -186,7 +186,7 @@ moved to each computer (`ExtensionsMovedTip.tsx`); dismissing it, or opening Ext
a heading, hides it for good on that device. Logos represent examples, not connected status.
This is a desktop sidebar treatment across macOS, Linux and Windows. iOS keeps its
-native navigation and per-computer Extensions entries (each computer's row in Settings, and
+native navigation and per-computer Extensions entries (each computer's card in Computer management, and
each computer heading in the Bots list with several computers); the TUI
keeps its keyboard Extensions action and connector tabs. Neither has this persistent
desktop footer or supports the same layered backdrop material; no capabilities or
diff --git a/docs/features/voice-call.md b/docs/features/voice-call.md
index 7d035515..31f6c3f0 100644
--- a/docs/features/voice-call.md
+++ b/docs/features/voice-call.md
@@ -168,7 +168,8 @@ The gear's first section is **Voice engine**. Each client remembers what the run
differs, the call ends that engine and starts the new one without hanging up: same call, one "Voice chat" line
at the end, cloud minutes counted up to the switch, mute kept, a fallback notice cleared. A call that fell back
to On device tries the picked cloud engine again the same way. Desktop and Android check whenever a voice
-settings view closes (the gear, Settings, a computer's row); on the iPhone only the gear is open during a call.
+settings view closes (desktop: the gear, Settings; Android: the gear, the computer's card in Computer
+management); on the iPhone only the gear is open during a call.
Where on-device speech is missing (desktop on Linux or Windows), the provider standing in for On device keeps
running while On device stays picked.
diff --git a/docs/plans/android-app.md b/docs/plans/android-app.md
index 19024ae2..d91d3f21 100644
--- a/docs/plans/android-app.md
+++ b/docs/plans/android-app.md
@@ -75,7 +75,7 @@ was walked through on an emulator against a real host.
- **Shared files**: leaving the chat during a download skips the share sheet when it finishes
(the card shows *Downloaded*); shared copies are deleted after a day (`AppStoreFiles.kt`,
`AttachmentFiles.kt`).
-- **Pull to refresh** on the roster and in Settings uses the chat's indicator; iOS uses the system one.
+- **Pull to refresh** on the roster and in Computer management uses the chat's indicator; iOS uses the system one.
- **`computers` / `plugins` links** open over the current tab; iOS switches to Bots first.
- **Shortcuts actions** (Open Live Mode, Send Text to Bot) are an Apple App Intents integration with no
Android counterpart ([iOS Shortcuts](../features/ios-shortcuts.md)).
diff --git a/web/content/docs/agents.mdx b/web/content/docs/agents.mdx
index fe5d0f9c..9e0470db 100644
--- a/web/content/docs/agents.mdx
+++ b/web/content/docs/agents.mdx
@@ -65,7 +65,7 @@ Opening **Extensions** checks again, so an agent you installed or signed in to o
Agents are set up from **Extensions**, which belongs to one computer:
- **Desktop:** **Extensions** at the bottom of the sidebar. With several computers, each computer's heading in the sidebar has its own Extensions button instead.
-- **iPhone:** open the computer menu, choose **Manage computers**, and tap **Extensions**.
+- **iPhone:** tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and tap **Extensions** on the computer.
- **Terminal UI:** press `A`.
The **Agents** section shows each agent's status: **Installed**, **Not installed**, **Not signed in**, **Needs Node.js**, or **Sets up on first use** (registry agents). Select an agent to open its setup sheet. It walks through up to three steps.
diff --git a/web/content/docs/bots.mdx b/web/content/docs/bots.mdx
index 6844ee68..9f1b514c 100644
--- a/web/content/docs/bots.mdx
+++ b/web/content/docs/bots.mdx
@@ -85,7 +85,7 @@ Each bot keeps a long-term memory across sessions, which you can read on its **M
- **Order:** drag bots into the order you want. The computer keeps the order, so it's the same on every device. iPhone: touch and hold a bot, then drag it. Desktop: drag it, or select it and press Alt+Up or Alt+Down. Terminal UI: `J` and `K`.
- **Computers:** with more than one computer, each has a heading above its bots. Drag a heading (iPhone: touch and hold it first) to move that computer and its bots up or down; this order stays on the device. Click or tap a heading to fold its bots away.
- **Hide:** iPhone: touch and hold the bot, then **Hide from list**. Desktop: right-click it, then **Hide from sidebar**. A hidden bot sends no notifications. To bring it back:
- - **iPhone:** open the computer menu, choose **Manage computers**, and tap the eye button (**Unhide**) beside the bot under **Hidden bots**.
+ - **iPhone:** tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and tap the eye button (**Unhide**) beside the bot under **Hidden bots**.
- **Desktop:** open **Settings → General** and click the eye button (**Unhide**) beside the bot under **Hidden bots**.
- **Terminal UI:** press Ctrl+K, type `unhide`, and pick **Unhide** followed by the bot's name.
- **Mark as read:** clears a bot's unread badge, from the same menus.
diff --git a/web/content/docs/computer-use.mdx b/web/content/docs/computer-use.mdx
index 286f48f4..6b8e0633 100644
--- a/web/content/docs/computer-use.mdx
+++ b/web/content/docs/computer-use.mdx
@@ -26,7 +26,7 @@ To change it, use the menu bar or tray menu on the computer: **Remote screen →
Open the screen in either of two ways:
- In a chat, tap the **Computer** button at the top right.
-- Open the computer menu, choose **Manage computers**, and tap **Screen**.
+- Tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and tap **Screen** on the computer.
You have control right away, unless that chat's bot is using the computer at that moment (then you watch first, as described under "Watch a bot work" below). While you have control, bots can still look at the screen, but they can't act until you hand it back.
diff --git a/web/content/docs/connectors-and-skills.mdx b/web/content/docs/connectors-and-skills.mdx
index bd45f677..7b4a5803 100644
--- a/web/content/docs/connectors-and-skills.mdx
+++ b/web/content/docs/connectors-and-skills.mdx
@@ -5,7 +5,7 @@ You add both in **Extensions**. They install on the computer, so every bot on th
## Open Extensions
- **Desktop app:** click **Extensions** at the bottom of the sidebar. With several computers, click the Extensions button on that computer's heading in the sidebar; each computer has its own.
-- **iPhone:** open the computer menu, choose **Manage computers**, and tap **Extensions**. With several computers, the Extensions button on a computer's heading in the Bots tab opens it too.
+- **iPhone:** tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and tap **Extensions** on the computer. With several computers, the Extensions button on a computer's heading in the Bots tab opens it too.
- **Terminal UI:** press `A`, or pick "Extensions: agents, connectors, skills…" from the action list. Tab switches between Agents, Connectors and Skills.
The header names the computer everything installs on. **Credentials** sits on that same row, beside the name. Under the open section, one line says where those items come from and that they install on this computer. Once you've added something, a count under it ("3 installed", **Connectors & skills**) opens your library, where you can sign in to a connector or remove one.
diff --git a/web/content/docs/conversations.mdx b/web/content/docs/conversations.mdx
index 72eeb869..c0a384ba 100644
--- a/web/content/docs/conversations.mdx
+++ b/web/content/docs/conversations.mdx
@@ -140,7 +140,7 @@ You don't get one when:
Routine runs notify you too. A group chat sends one "done" once its bots have finished answering your message.
-To turn notifications off on the iPhone, open the computer menu, choose **Manage computers**, and switch off **Push notifications** on the computer whose alerts you don't want; each computer has its own switch. Previews, sounds and Focus follow your iOS settings. The push relay and Apple see only a generic line ("Your task is complete. Open Codync to read the result.") plus routing IDs. The bot's name and the message text are encrypted to your iPhone's key and decrypted on the phone. See [Privacy](/docs/privacy).
+To turn notifications off on the iPhone, tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and switch off **Push notifications** on the computer whose alerts you don't want; each computer has its own switch. Previews, sounds and Focus follow your iOS settings. The push relay and Apple see only a generic line ("Your task is complete. Open Codync to read the result.") plus routing IDs. The bot's name and the message text are encrypted to your iPhone's key and decrypted on the phone. See [Privacy](/docs/privacy).
### Live Activities
diff --git a/web/content/docs/getting-started.mdx b/web/content/docs/getting-started.mdx
index c031739d..df113549 100644
--- a/web/content/docs/getting-started.mdx
+++ b/web/content/docs/getting-started.mdx
@@ -75,6 +75,8 @@ On the computer, show the pairing code:
On the iPhone, open Codync and tap **Get started**, then **Continue**, then scan the code. The iPhone Camera app can scan it too. If you can't scan, copy the pairing link on the computer and paste it into the field under the viewfinder. To pair later, tap the account button at the top left of the Bots tab, then **Scan a computer's code**.
+The iPhone app has three tabs: **Bots** (your bots and chats), **State** (widgets, Live Activities and usage limits) and **Settings** (this iPhone's own settings). Each computer's settings, such as Extensions, voice chat and push notifications, are in **Manage computers**: tap the connection status at the top of the Bots tab (such as **1 connected**).
+
A pairing code expires. If pairing fails, show a new code on the computer and scan again.
After pairing, the phone connects directly when it's on the same Wi-Fi or Tailscale network as the computer. Anywhere else it goes through the Codync relay, end-to-end encrypted, while **Reach from anywhere** is on in the computer's Codync settings. See [Remote access](/docs/remote-access).
diff --git a/web/content/docs/linux-servers.mdx b/web/content/docs/linux-servers.mdx
index bf5fad0c..4178759a 100644
--- a/web/content/docs/linux-servers.mdx
+++ b/web/content/docs/linux-servers.mdx
@@ -41,7 +41,7 @@ codync-host status
## Pair your phone
-With the host running, run `codync-host pair` over SSH. It prints a QR code in your terminal. On the iPhone, scan it from the welcome screen or from the computer menu, **Manage computers → Pair a computer**. If scanning a terminal QR code is awkward, run `codync-host pair --json` and paste the `codync://pair` link into the field under the scanner.
+With the host running, run `codync-host pair` over SSH. It prints a QR code in your terminal. On the iPhone, scan it from the welcome screen or later from **Manage computers → Pair a computer** (tap the connection status at the top of the Bots tab, such as **1 connected**). If scanning a terminal QR code is awkward, run `codync-host pair --json` and paste the `codync://pair` link into the field under the scanner.
The code works once and expires after 10 minutes. More about pairing and accounts: [Remote access](/docs/remote-access).
diff --git a/web/content/docs/privacy.mdx b/web/content/docs/privacy.mdx
index 6a3183aa..4353be88 100644
--- a/web/content/docs/privacy.mdx
+++ b/web/content/docs/privacy.mdx
@@ -41,7 +41,7 @@ On the iPhone, a bot can notify you when it needs you, when it's done, or when i
- Live Activities on the Lock Screen and in the Dynamic Island get only the bot's status from the computer, never message text.
- No notification is sent while the iPhone app is connected to the computer. Muted and hidden bots don't notify.
-To turn notifications off on an iPhone, open the computer menu, choose **Manage computers**, and turn off **Push notifications** on that computer. Each bot's settings have their own notification options.
+To turn notifications off on an iPhone, tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and turn off **Push notifications** on that computer. Each bot's settings have their own notification options.
## Voice
@@ -75,7 +75,7 @@ Analytics are never sold, never used for ads and never used to track you across
Each phone and each computer has its own switch, **Share usage analytics**. Turning it off stops sending right away and drops anything not sent yet.
-- **iPhone:** **Settings → Share usage analytics.**
+- **iPhone:** the **Settings** tab, **Share usage analytics**.
- **Desktop app:** **Settings → General**, under **Privacy**. This switch belongs to the computer's host, so it also covers the terminal UI on that computer.
- **Terminal UI:** press `^k` and choose **Share usage analytics**.
@@ -83,15 +83,15 @@ The info button next to the switch (**About usage analytics…** in the terminal
## Removing your data
-Delete a bot to remove its conversation. To remove everything from a computer, see "Uninstalling" in [Updates](/docs/updates). On the iPhone, **Start over** in **Settings** signs out and forgets every computer; your computers keep their bots and chats. Deleting the iPhone app removes its cache.
+Delete a bot to remove its conversation. To remove everything from a computer, see "Uninstalling" in [Updates](/docs/updates). On the iPhone, **Start over** on the **Settings** tab signs out and forgets every computer; your computers keep their bots and chats. Deleting the iPhone app removes its cache.
## iPhone rating invitations
Codync may invite you to rate it after you have used it on several days, viewed a bot's
completed result, and returned to the bot list. It does not ask when you open the app.
Invitations are at least 120 days apart, with at most two requests in a year. Apple decides
-whether to show its rating window. You can also choose **Rate on the App Store** in
-**Settings** at any time. **Report an issue** opens a separate feedback link,
+whether to show its rating window. You can also choose **Rate on the App Store** on the
+**Settings** tab at any time. **Report an issue** opens a separate feedback link,
regardless of whether you choose to rate the app.
The timing history stays on your iPhone. If **Share usage analytics** is on, Codync records
diff --git a/web/content/docs/remote-access.mdx b/web/content/docs/remote-access.mdx
index 6b5b05dc..3fba5344 100644
--- a/web/content/docs/remote-access.mdx
+++ b/web/content/docs/remote-access.mdx
@@ -26,7 +26,7 @@ Show the code on the computer:
- **Terminal:** run `codync-host pair`. It prints the QR code in the terminal. `codync-host pair --json` prints the link instead.
- **Terminal UI:** press `^k` and choose **Pair a phone…**.
-Then, on the iPhone, scan it from the welcome screen, or later from the computer menu, **Manage computers → Pair a computer**. You can also paste the `codync://pair` link instead of scanning.
+Then, on the iPhone, scan it from the welcome screen, or later from **Manage computers → Pair a computer** (tap the connection status at the top of the Bots tab, such as **1 connected**). You can also paste the `codync://pair` link instead of scanning.
A code works once and expires after 10 minutes. If it has expired, show a new one on the computer. Pairing needs no account and works over any route, including the relay.
@@ -35,7 +35,7 @@ A code works once and expires after 10 minutes. If it has expired, show a new on
You can sign in with Apple or Google on the iPhone and in the desktop app. Signing in doesn't give any device access by itself. It lets your phone find the computers in your account without scanning a code:
1. On the computer, sign in to the desktop app. The computer joins your account. For an SSH computer, choose **Add to account** on its card in **Settings → Computers**.
-2. On the iPhone, sign in with the same account and open the computer menu, then **Manage computers**. Your account's computers are listed there. Tap **Ask for access**. The phone shows a 6-digit code.
+2. On the iPhone, sign in with the same account and open **Manage computers**. Your account's computers are listed there. Tap **Ask for access**. The phone shows a 6-digit code.
3. On the computer, an **Access request** opens with a code. Choose **Approve** only if it matches the code on your phone exactly. If it doesn't, choose **Deny**: someone may be trying to get in.
On a computer without the desktop app, use `codync-host access` to list requests and `codync-host access approve <code>` to approve one.
diff --git a/web/content/docs/updates.mdx b/web/content/docs/updates.mdx
index 6bc8c117..5db235bc 100644
--- a/web/content/docs/updates.mdx
+++ b/web/content/docs/updates.mdx
@@ -94,4 +94,4 @@ To erase everything from the desktop app in one step, choose **Settings → Rese
### On the iPhone
-In **Manage computers**, remove a computer. In **Settings**, choose **Start over** to sign out and forget every computer. Deleting the app removes its cache. Your computers keep their bots and chats either way.
+In **Manage computers** (tap the connection status at the top of the Bots tab, such as **1 connected**), remove a computer. On the **Settings** tab, choose **Start over** to sign out and forget every computer. Deleting the app removes its cache. Your computers keep their bots and chats either way.
diff --git a/web/content/docs/voice.mdx b/web/content/docs/voice.mdx
index f1d73649..a34da1f9 100644
--- a/web/content/docs/voice.mdx
+++ b/web/content/docs/voice.mdx
@@ -36,7 +36,7 @@ In the Shortcuts app, add Codync's **Open Live Mode** action and pick a **Bot**,
Open **Voice chat** settings from the call bar's gear, or:
-- **iPhone and Android:** open the computer menu, choose **Manage computers**, and tap **Voice chat** on the computer.
+- **iPhone and Android:** tap the connection status at the top of the Bots tab (such as **1 connected**), choose **Manage computers**, and tap **Voice chat** on the computer.
- **Desktop app:** **Settings → Voice chat**.
Under **Engine**, pick one. The choice is kept on this device. Changed during a call, it takes over that call once you close the settings; the call goes on, still muted if it was.