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: monochrome theme, background push sync, panel click fix

libokaif4d78e9f1b35
diff --git a/Codync-iOS/App/AppDelegate.swift b/Codync-iOS/App/AppDelegate.swift
new file mode 100644
index 00000000..6d6e5aed
--- /dev/null
+++ b/Codync-iOS/App/AppDelegate.swift
@@ -0,0 +1,27 @@
+import UIKit
+import CloudKit
+import CodyncShared
+
+final class AppDelegate: NSObject, UIApplicationDelegate {
+ weak var receiver: CloudKitReceiver?
+
+ func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
+ ) -> Bool {
+ application.registerForRemoteNotifications()
+ return true
+ }
+
+ func application(
+ _ application: UIApplication,
+ didReceiveRemoteNotification userInfo: [AnyHashable: Any]
+ ) async -> UIBackgroundFetchResult {
+ let notification = CKNotification(fromRemoteNotificationDictionary: userInfo)
+ guard notification?.subscriptionID == "session-changes" else {
+ return .noData
+ }
+ await receiver?.fetch()
+ return .newData
+ }
+}
diff --git a/Codync-iOS/App/Codync-iOS.entitlements b/Codync-iOS/App/Codync-iOS.entitlements
index 3554934f..60f51655 100644
--- a/Codync-iOS/App/Codync-iOS.entitlements
+++ b/Codync-iOS/App/Codync-iOS.entitlements
@@ -10,5 +10,7 @@
<array>
<string>CloudKit</string>
</array>
+ <key>aps-environment</key>
+ <string>development</string>
</dict>
</plist>
diff --git a/Codync-iOS/App/CodyncIOSApp.swift b/Codync-iOS/App/CodyncIOSApp.swift
index cc9d85ed..ce9439e2 100644
--- a/Codync-iOS/App/CodyncIOSApp.swift
+++ b/Codync-iOS/App/CodyncIOSApp.swift
@@ -3,13 +3,17 @@ import CodyncShared
@main
struct CodyncIOSApp: App {
+ @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
@StateObject private var receiver = CloudKitReceiver()
@StateObject private var liveActivityManager = LiveActivityManager()
var body: some Scene {
WindowGroup {
IOSRootView(receiver: receiver, liveActivityManager: liveActivityManager)
- .task { await receiver.start() }
+ .task {
+ appDelegate.receiver = receiver
+ await receiver.start()
+ }
.task {
let center = UNUserNotificationCenter.current()
try? await center.requestAuthorization(options: [.alert, .sound, .badge])
diff --git a/Codync-iOS/Views/IOSOnboardingView.swift b/Codync-iOS/Views/IOSOnboardingView.swift
index 6225332f..f54d1ccc 100644
--- a/Codync-iOS/Views/IOSOnboardingView.swift
+++ b/Codync-iOS/Views/IOSOnboardingView.swift
@@ -66,7 +66,8 @@ struct IOSOnboardingView: View {
}
.padding(.bottom, 32)
}
- .background(theme.background)
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
+ .background(theme.background.ignoresSafeArea())
.task {
await checkICloudStatus()
}
diff --git a/Codync-iOS/Views/IOSRootView.swift b/Codync-iOS/Views/IOSRootView.swift
index 9d32e62e..e6908795 100644
--- a/Codync-iOS/Views/IOSRootView.swift
+++ b/Codync-iOS/Views/IOSRootView.swift
@@ -4,13 +4,14 @@ import CodyncShared
struct IOSRootView: View {
@ObservedObject var receiver: CloudKitReceiver
@ObservedObject var liveActivityManager: LiveActivityManager
+ @AppStorage("codync_onboardingComplete") private var onboardingComplete = false
private let theme = CodyncTheme()
var body: some View {
NavigationStack {
Group {
- if receiver.sessions.isEmpty {
+ if !onboardingComplete {
IOSOnboardingView()
} else {
IOSSessionListView(
@@ -23,6 +24,9 @@ struct IOSRootView: View {
.environment(\.theme, theme)
.preferredColorScheme(.dark)
.onChange(of: receiver.sessions) { _, sessions in
+ if !sessions.isEmpty {
+ onboardingComplete = true
+ }
liveActivityManager.updateSessions(sessions)
}
}
diff --git a/Codync-iOS/Views/IOSTheme.swift b/Codync-iOS/Views/IOSTheme.swift
index a90071f9..1d2d88f1 100644
--- a/Codync-iOS/Views/IOSTheme.swift
+++ b/Codync-iOS/Views/IOSTheme.swift
@@ -27,7 +27,7 @@ struct CodyncTheme: Sendable {
// MARK: - Semantic
- var accent: Color { Color(red: 0.35, green: 0.56, blue: 1.0) }
+ var accent: Color { Self.fg }
var warning: Color { Self.fg }
var danger: Color { Self.fg }
diff --git a/Codync-macOS/App/EventMonitor.swift b/Codync-macOS/App/EventMonitor.swift
index eecd59ad..7eecefe8 100644
--- a/Codync-macOS/App/EventMonitor.swift
+++ b/Codync-macOS/App/EventMonitor.swift
@@ -19,10 +19,6 @@ final class EventMonitor {
globalMonitor = NSEvent.addGlobalMonitorForEvents(matching: mask) { [weak self] event in
self?.handler(event)
}
- localMonitor = NSEvent.addLocalMonitorForEvents(matching: mask) { [weak self] event in
- self?.handler(event)
- return event
- }
}
func stop() {
diff --git a/Codync-macOS/App/MenuBarController.swift b/Codync-macOS/App/MenuBarController.swift
index b91d8ec4..a1ec2759 100644
--- a/Codync-macOS/App/MenuBarController.swift
+++ b/Codync-macOS/App/MenuBarController.swift
@@ -10,7 +10,8 @@ final class CodyncPanelState: ObservableObject {
@Published var headerSize: CGSize = .zero
@Published var contentHeight: CGFloat = 0
var collapsedRect: CGRect = .zero
- var panelRect: CGRect = .zero
+ var panelRect: CGRect = .zero // fixed size — used for hitTest
+ var contentRect: CGRect = .zero // dynamic — used for click-outside dismissal
private let expandedWidth: CGFloat = 380
private let expandedHeight: CGFloat = 500
@@ -19,10 +20,10 @@ final class CodyncPanelState: ObservableObject {
func updateGeometry(for screen: NSScreen) {
screenRef = screen
headerSize = screen.notchSize
- recomputePanelRect()
+ recomputeRects()
}
- func recomputePanelRect() {
+ func recomputeRects() {
guard let screen = screenRef else { return }
let centerX = screen.frame.origin.x + screen.frame.width / 2
@@ -33,12 +34,21 @@ final class CodyncPanelState: ObservableObject {
height: headerSize.height
)
- let height = contentHeight > 0 ? min(contentHeight, expandedHeight) : expandedHeight
+ // hitTest rect — always full size so clicks reach SwiftUI
panelRect = CGRect(
x: centerX - expandedWidth / 2,
- y: screen.frame.maxY - height,
+ y: screen.frame.maxY - expandedHeight,
width: expandedWidth,
- height: height
+ height: expandedHeight
+ )
+
+ // content rect — dynamic, for click-outside dismissal
+ let h = contentHeight > 0 ? min(contentHeight, expandedHeight) : expandedHeight
+ contentRect = CGRect(
+ x: centerX - expandedWidth / 2,
+ y: screen.frame.maxY - h,
+ width: expandedWidth,
+ height: h
)
}
}
@@ -152,8 +162,8 @@ final class MenuBarController: NSObject {
panelState.$contentHeight
.sink { [weak self] _ in
guard let self else { return }
- self.panelState.recomputePanelRect()
- self.hitTestView?.panelRect = self.panelState.panelRect
+ self.panelState.recomputeRects()
+ // hitTestView.panelRect stays fixed — only contentRect is dynamic
}
.store(in: &cancellables)
@@ -181,16 +191,7 @@ final class MenuBarController: NSObject {
private func handleGlobalClick() {
guard panelState.isExpanded else { return }
-
- let mouseLocation = NSEvent.mouseLocation
-
- if panelState.panelRect.contains(mouseLocation) { return }
-
- if let button = statusItem.button, let buttonWindow = button.window {
- let buttonScreenFrame = buttonWindow.convertToScreen(button.convert(button.bounds, to: nil))
- if buttonScreenFrame.contains(mouseLocation) { return }
- }
-
+ // Global monitor only fires for clicks OUTSIDE our app — dismiss panel
panelState.isExpanded = false
}
@@ -210,7 +211,7 @@ final class MenuBarController: NSObject {
let screen = NSScreen.builtInOrMain
panelState.updateGeometry(for: screen)
hitTestView?.collapsedRect = panelState.collapsedRect
- hitTestView?.panelRect = panelState.panelRect
+ hitTestView?.panelRect = panelState.panelRect // fixed full-size rect
panel?.setFrame(fullScreenTopFrame(for: screen), display: true)
}
}
diff --git a/Codync-macOS/Views/Theme.swift b/Codync-macOS/Views/Theme.swift
index 20402dc8..68c7ec6f 100644
--- a/Codync-macOS/Views/Theme.swift
+++ b/Codync-macOS/Views/Theme.swift
@@ -80,17 +80,10 @@ struct CodyncTheme {
// MARK: - Semantic colors
- var accent: Color { .blue }
+ var accent: Color { primaryText }
- /// Attention state — bright white on panel, orange on standard
- var warning: Color {
- isPanel ? Self.panelForeground : .orange
- }
-
- /// Permission alert — bright white on panel, red on standard
- var danger: Color {
- isPanel ? Self.panelForeground : .red.opacity(0.85)
- }
+ var warning: Color { primaryText }
+ var danger: Color { primaryText }
/// Color for a waiting session based on its reason.
/// Permission prompt = danger (red), everything else = warning (yellow/orange).
diff --git a/Codync.xcodeproj/project.pbxproj b/Codync.xcodeproj/project.pbxproj
index 88375b4a..6762274f 100644
--- a/Codync.xcodeproj/project.pbxproj
+++ b/Codync.xcodeproj/project.pbxproj
@@ -12,6 +12,7 @@
070688CBF55E74F38DC650E3 /* CodyncShared in Frameworks */ = {isa = PBXBuildFile; productRef = 4BA154F0B1967DCBBB7600E5 /* CodyncShared */; };
0B6B1D4B20837A47EAF88322 /* IOSSessionDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C01C9748A39F3475869F956 /* IOSSessionDetailView.swift */; };
106A1E305D6DBDFC35AF01BD /* CloudKitSync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22479FA0953120F3B50A1AF3 /* CloudKitSync.swift */; };
+ 1122334455667788AABBCCDD /* CodyncPanelShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = AABBCCDD11223344556677EE /* CodyncPanelShape.swift */; };
21DBF9BED5F40E2F671CB1F9 /* StatusDotView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED6193555CB3FAC1BA7E2A /* StatusDotView.swift */; };
3DC7D9E7E79444359ED6D09F /* ClaudePaths.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F1E5418D5496E651BD58FA2 /* ClaudePaths.swift */; };
4450C6683BA7614D2DBB5E55 /* MenuBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C55AF6C89E20B6FD1CF5CD4 /* MenuBarController.swift */; };
@@ -23,6 +24,9 @@
911C6ABDB9539A60844931F2 /* PIDChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D161FDC49BE96E3A73FEA33 /* PIDChecker.swift */; };
A30C11E610763F5064698D43 /* IOSSessionListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01A225437E7A00B3337883E /* IOSSessionListView.swift */; };
A98E0466D559EC6EBE0E39F4 /* ClaudeHookServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E25C5CD874B7119D57AB2BB1 /* ClaudeHookServer.swift */; };
+ B1C2D3E4F5A6B7C8D9E0F1A1 /* IOSTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1A1 /* IOSTheme.swift */; };
+ B1C2D3E4F5A6B7C8D9E0F1A2 /* IOSStatusIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1A2 /* IOSStatusIndicator.swift */; };
+ B1C2D3E4F5A6B7C8D9E0F1A3 /* IOSSessionTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1A3 /* IOSSessionTagView.swift */; };
B575261E2F89280C4805C654 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3935CEE144EC8AFCA3AEAEA3 /* Assets.xcassets */; };
BB50434DF1BC51FED1AFED51 /* CodyncLiveActivityWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A9A7BAE27F6E4CEEDA1B48D /* CodyncLiveActivityWidget.swift */; };
BF17F10AC69617C12975E0EB /* SessionDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D10CABFC27BF22D45064777A /* SessionDetailView.swift */; };
@@ -31,21 +35,18 @@
D2A3B4C5E6F7081920314253 /* TranscriptWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C4D5E6F708192A3B4C5D6E /* TranscriptWatcher.swift */; };
D4BC114BC4A6C08EECD54925 /* CodyncShared in Frameworks */ = {isa = PBXBuildFile; productRef = 7660B5D6DD8CC2065A9F4ED3 /* CodyncShared */; };
DBD957B5BFDEC3B62B310F8F /* IOSRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF291DF4A4EF932B774F227D /* IOSRootView.swift */; };
+ DD44EE55FF66001122334455 /* CodyncPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA11BB22CC33DD44EE55FF66 /* CodyncPanel.swift */; };
E1740D692C1C19693058D20B /* SessionRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD09204E8CD3C16D75BA3048 /* SessionRowView.swift */; };
E36D87A2D2D0F1177F263772 /* CodyncLiveActivityBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BCD1168005B123A7F9ACB37 /* CodyncLiveActivityBundle.swift */; };
EB132AF39AB968D2DFA6151B /* CodyncApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A67A3CD19408484AB11BB73 /* CodyncApp.swift */; };
EDCB66A65FD85B26FE7B4664 /* SessionScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42BAF66F7C50D732B7E69333 /* SessionScanner.swift */; };
+ EE55FF6600112233445566AA /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB22CC33DD44EE55FF660011 /* EventMonitor.swift */; };
EEF78145300C2A3547AD832A /* IOSOnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D866EFD6224AECD6846B76BE /* IOSOnboardingView.swift */; };
EF0A0CEAD3C7B875064F8556 /* LiveActivityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CADC1A963B2C1124F480F9CE /* LiveActivityManager.swift */; };
F1E2D3C4B5A6F7E8D9C0B1A2 /* SessionTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1F2 /* SessionTagView.swift */; };
- DD44EE55FF66001122334455 /* CodyncPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA11BB22CC33DD44EE55FF66 /* CodyncPanel.swift */; };
- EE55FF6600112233445566AA /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB22CC33DD44EE55FF660011 /* EventMonitor.swift */; };
- FF66001122334455667788BB /* NSScreen+Notch.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC33DD44EE55FF6600112233 /* NSScreen+Notch.swift */; };
- 1122334455667788AABBCCDD /* CodyncPanelShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = AABBCCDD11223344556677EE /* CodyncPanelShape.swift */; };
F4F54F91459EE6A15DD7B246 /* CodyncIOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8453D8BE6EE838E1B9EA4588 /* CodyncIOSApp.swift */; };
- B1C2D3E4F5A6B7C8D9E0F1A1 /* IOSTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1A1 /* IOSTheme.swift */; };
- B1C2D3E4F5A6B7C8D9E0F1A2 /* IOSStatusIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1A2 /* IOSStatusIndicator.swift */; };
- B1C2D3E4F5A6B7C8D9E0F1A3 /* IOSSessionTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F6A7B8C9D0E1A3 /* IOSSessionTagView.swift */; };
+ F5A6B7C8D9E0F1A2B3C4D5E6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A6B7C8D9E0F1A2B3C4D5E7 /* AppDelegate.swift */; };
+ FF66001122334455667788BB /* NSScreen+Notch.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC33DD44EE55FF6600112233 /* NSScreen+Notch.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -85,6 +86,7 @@
4A67A3CD19408484AB11BB73 /* CodyncApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncApp.swift; sourceTree = "<group>"; };
4C55AF6C89E20B6FD1CF5CD4 /* MenuBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarController.swift; sourceTree = "<group>"; };
8453D8BE6EE838E1B9EA4588 /* CodyncIOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncIOSApp.swift; sourceTree = "<group>"; };
+ F5A6B7C8D9E0F1A2B3C4D5E7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8A9A7BAE27F6E4CEEDA1B48D /* CodyncLiveActivityWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncLiveActivityWidget.swift; sourceTree = "<group>"; };
8B5EA7075E9DC97237EF2227 /* Codync.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Codync.app; sourceTree = BUILT_PRODUCTS_DIR; };
8F1E5418D5496E651BD58FA2 /* ClaudePaths.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClaudePaths.swift; sourceTree = "<group>"; };
@@ -92,10 +94,17 @@
9C01C9748A39F3475869F956 /* IOSSessionDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSSessionDetailView.swift; sourceTree = "<group>"; };
A01A225437E7A00B3337883E /* IOSSessionListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSSessionListView.swift; sourceTree = "<group>"; };
A19BA18A6829F0BE991D4C7D /* SessionFileParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionFileParser.swift; sourceTree = "<group>"; };
+ A1B2C3D4E5F6A7B8C9D0E1A1 /* IOSTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSTheme.swift; sourceTree = "<group>"; };
+ A1B2C3D4E5F6A7B8C9D0E1A2 /* IOSStatusIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSStatusIndicator.swift; sourceTree = "<group>"; };
+ A1B2C3D4E5F6A7B8C9D0E1A3 /* IOSSessionTagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSSessionTagView.swift; sourceTree = "<group>"; };
A1B2C3D4E5F6A7B8C9D0E1F2 /* SessionTagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionTagView.swift; sourceTree = "<group>"; };
+ AA11BB22CC33DD44EE55FF66 /* CodyncPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncPanel.swift; sourceTree = "<group>"; };
+ AABBCCDD11223344556677EE /* CodyncPanelShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncPanelShape.swift; sourceTree = "<group>"; };
AD09204E8CD3C16D75BA3048 /* SessionRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionRowView.swift; sourceTree = "<group>"; };
B3C4D5E6F708192A3B4C5D6E /* TranscriptWatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TranscriptWatcher.swift; sourceTree = "<group>"; };
+ BB22CC33DD44EE55FF660011 /* EventMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventMonitor.swift; sourceTree = "<group>"; };
CADC1A963B2C1124F480F9CE /* LiveActivityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivityManager.swift; sourceTree = "<group>"; };
+ CC33DD44EE55FF6600112233 /* NSScreen+Notch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSScreen+Notch.swift"; sourceTree = "<group>"; };
CD5A99B72DC7E1F01D755DF6 /* Codync.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Codync.entitlements; sourceTree = "<group>"; };
CEED6193555CB3FAC1BA7E2A /* StatusDotView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusDotView.swift; sourceTree = "<group>"; };
D10CABFC27BF22D45064777A /* SessionDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionDetailView.swift; sourceTree = "<group>"; };
@@ -107,13 +116,6 @@
F033CA1408917B1655BC66D2 /* CodyncShared */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CodyncShared; sourceTree = SOURCE_ROOT; };
F19A27E00B1B13A579A950F4 /* CloudKitReceiver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudKitReceiver.swift; sourceTree = "<group>"; };
F71E03612F167D883C324D25 /* SessionStateManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionStateManager.swift; sourceTree = "<group>"; };
- AA11BB22CC33DD44EE55FF66 /* CodyncPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncPanel.swift; sourceTree = "<group>"; };
- BB22CC33DD44EE55FF660011 /* EventMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventMonitor.swift; sourceTree = "<group>"; };
- CC33DD44EE55FF6600112233 /* NSScreen+Notch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSScreen+Notch.swift"; sourceTree = "<group>"; };
- AABBCCDD11223344556677EE /* CodyncPanelShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodyncPanelShape.swift; sourceTree = "<group>"; };
- A1B2C3D4E5F6A7B8C9D0E1A1 /* IOSTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSTheme.swift; sourceTree = "<group>"; };
- A1B2C3D4E5F6A7B8C9D0E1A2 /* IOSStatusIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSStatusIndicator.swift; sourceTree = "<group>"; };
- A1B2C3D4E5F6A7B8C9D0E1A3 /* IOSSessionTagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOSSessionTagView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -169,6 +171,7 @@
isa = PBXGroup;
children = (
433D534BFD8D3D76B489B324 /* Codync-iOS.entitlements */,
+ F5A6B7C8D9E0F1A2B3C4D5E7 /* AppDelegate.swift */,
8453D8BE6EE838E1B9EA4588 /* CodyncIOSApp.swift */,
);
path = App;
@@ -446,6 +449,7 @@
files = (
7534D98B6CDF84E44B0D25A9 /* CloudKitReceiver.swift in Sources */,
F4F54F91459EE6A15DD7B246 /* CodyncIOSApp.swift in Sources */,
+ F5A6B7C8D9E0F1A2B3C4D5E6 /* AppDelegate.swift in Sources */,
EEF78145300C2A3547AD832A /* IOSOnboardingView.swift in Sources */,
DBD957B5BFDEC3B62B310F8F /* IOSRootView.swift in Sources */,
0B6B1D4B20837A47EAF88322 /* IOSSessionDetailView.swift in Sources */,
@@ -471,11 +475,10 @@
05A665239A83C10C704662CC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = DEVELOPMENT_TEAM_REDACTED;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = CodyncLiveActivity/Info.plist;
- MARKETING_VERSION = 1.0;
- CURRENT_PROJECT_VERSION = 1;
INFOPLIST_KEY_CFBundleDisplayName = CodyncLiveActivity;
INFOPLIST_KEY_NSExtension_NSExtensionPointIdentifier = "com.apple.widgetkit-extension";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
@@ -484,6 +487,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
+ MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.pokai.Codync.ios.LiveActivity;
PRODUCT_NAME = CodyncLiveActivity;
SDKROOT = iphoneos;
@@ -618,10 +622,11 @@
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
+ INFOPLIST_KEY_UIBackgroundModes = "remote-notification";
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 17.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 18.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -645,10 +650,11 @@
INFOPLIST_KEY_NSSupportsLiveActivities = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
+ INFOPLIST_KEY_UIBackgroundModes = "remote-notification";
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 17.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 18.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -664,11 +670,10 @@
BBB96964FECC01CD9E90CE59 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = DEVELOPMENT_TEAM_REDACTED;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = CodyncLiveActivity/Info.plist;
- MARKETING_VERSION = 1.0;
- CURRENT_PROJECT_VERSION = 1;
INFOPLIST_KEY_CFBundleDisplayName = CodyncLiveActivity;
INFOPLIST_KEY_NSExtension_NSExtensionPointIdentifier = "com.apple.widgetkit-extension";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
@@ -677,6 +682,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
+ MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.pokai.Codync.ios.LiveActivity;
PRODUCT_NAME = CodyncLiveActivity;
SDKROOT = iphoneos;
diff --git a/CodyncLiveActivity/CodyncLiveActivityWidget.swift b/CodyncLiveActivity/CodyncLiveActivityWidget.swift
index 3db7a096..51b8b775 100644
--- a/CodyncLiveActivity/CodyncLiveActivityWidget.swift
+++ b/CodyncLiveActivity/CodyncLiveActivityWidget.swift
@@ -6,6 +6,9 @@ import CodyncShared
struct CodyncLiveActivityWidget: Widget {
let kind: String = "CodyncLiveActivity"
+ // Monochrome palette — dark navy on light Lock Screen background
+ private static let fg = Color(red: 47/255, green: 59/255, blue: 84/255)
+
var body: some WidgetConfiguration {
ActivityConfiguration(for: CodyncAttributes.self) { context in
lockScreenBanner(context: context)
@@ -13,8 +16,9 @@ struct CodyncLiveActivityWidget: Widget {
DynamicIsland {
DynamicIslandExpandedRegion(.leading) {
Circle()
- .fill(islandStatusColor(context.state))
+ .fill(.white)
.frame(width: 8, height: 8)
+ .opacity(context.state.status == "completed" ? 0.5 : 1)
.padding(.top, 6)
}
DynamicIslandExpandedRegion(.center) {
@@ -36,11 +40,10 @@ struct CodyncLiveActivityWidget: Widget {
}
DynamicIslandExpandedRegion(.bottom) {
if context.state.totalCount > 0 {
- // Progress bar in Dynamic Island
HStack(spacing: 2) {
ForEach(Array(context.state.tasks.enumerated()), id: \.offset) { _, task in
RoundedRectangle(cornerRadius: 2)
- .fill(taskColor(task.status))
+ .fill(islandTaskColor(task.status))
.frame(height: 4)
}
}
@@ -50,7 +53,7 @@ struct CodyncLiveActivityWidget: Widget {
HStack(spacing: 6) {
Image(systemName: "checkmark")
.font(.caption2.weight(.semibold))
- .foregroundStyle(.green)
+ .foregroundStyle(.white.opacity(0.7))
Text(prev.truncatedContent)
.font(.caption2)
.foregroundStyle(.secondary)
@@ -61,13 +64,14 @@ struct CodyncLiveActivityWidget: Widget {
}
} compactLeading: {
Circle()
- .fill(islandStatusColor(context.state))
+ .fill(.white)
.frame(width: 6, height: 6)
+ .opacity(context.state.status == "completed" ? 0.5 : 1)
} compactTrailing: {
if context.state.status == "completed" {
Text("Done")
.font(.caption2)
- .foregroundStyle(.green)
+ .foregroundStyle(.white.opacity(0.5))
} else if context.state.totalCount > 0 {
Text("\(context.state.completedCount)/\(context.state.totalCount)")
.font(.caption2)
@@ -80,8 +84,9 @@ struct CodyncLiveActivityWidget: Widget {
}
} minimal: {
Circle()
- .fill(islandStatusColor(context.state))
+ .fill(.white)
.frame(width: 6, height: 6)
+ .opacity(context.state.status == "completed" ? 0.5 : 1)
}
}
}
@@ -90,69 +95,60 @@ struct CodyncLiveActivityWidget: Widget {
@ViewBuilder
private func lockScreenBanner(context: ActivityViewContext<CodyncAttributes>) -> some View {
- let state = context.state
-
- if state.totalCount > 0 {
+ if context.state.totalCount > 0 {
progressBanner(context: context)
} else {
- chowderBanner(context: context)
+ cardBanner(context: context)
}
}
- // MARK: - Progress Bar Mode (has task list)
+ // MARK: - Progress Bar Mode
@ViewBuilder
private func progressBanner(context: ActivityViewContext<CodyncAttributes>) -> some View {
let state = context.state
let isCompleted = state.status == "completed"
- let primaryFg = Color(red: 47/255, green: 59/255, blue: 84/255)
let progress = state.totalCount > 0
? Double(state.completedCount) / Double(state.totalCount)
: 0
VStack(alignment: .leading, spacing: 0) {
- // Header
- bannerHeader(context: context, primaryFg: primaryFg)
+ bannerHeader(context: context)
- // Current task + progress
VStack(alignment: .leading, spacing: 10) {
if isCompleted {
- // Completion
HStack(spacing: 8) {
Image(systemName: "checkmark.circle.fill")
.font(.system(size: 20))
- .foregroundStyle(.green)
+ .foregroundStyle(Self.fg)
VStack(alignment: .leading, spacing: 1) {
Text("All tasks complete")
.font(.subheadline.bold())
- .foregroundStyle(primaryFg)
+ .foregroundStyle(Self.fg)
Text("$\(String(format: "%.2f", state.costUSD))")
.font(.caption)
- .foregroundStyle(.secondary)
+ .foregroundStyle(Self.fg.opacity(0.5))
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 6)
} else if let task = state.currentTask {
- // Current task
HStack(alignment: .top, spacing: 6) {
Image(systemName: "arrow.turn.down.right")
.font(.system(size: 11, weight: .semibold))
- .foregroundStyle(primaryFg.opacity(0.4))
+ .foregroundStyle(Self.fg.opacity(0.4))
.frame(width: 16, height: 16)
.padding(.top, 1)
Text(task)
.font(.callout)
- .foregroundStyle(primaryFg)
+ .foregroundStyle(Self.fg)
.lineLimit(2)
.frame(maxWidth: .infinity, alignment: .leading)
}
.padding(.horizontal, 6)
}
- // Progress bar
VStack(spacing: 6) {
- // Segmented progress
HStack(spacing: 2) {
ForEach(Array(state.tasks.enumerated()), id: \.offset) { _, task in
RoundedRectangle(cornerRadius: 3)
@@ -162,23 +158,21 @@ struct CodyncLiveActivityWidget: Widget {
}
.padding(.horizontal, 6)
- // Count + percentage
HStack {
Text("\(state.completedCount)/\(state.totalCount) tasks")
.font(.caption)
- .foregroundStyle(.secondary)
+ .foregroundStyle(Self.fg.opacity(0.5))
Spacer()
Text("\(Int(progress * 100))%")
.font(.caption.bold())
- .foregroundStyle(primaryFg.opacity(0.6))
+ .foregroundStyle(Self.fg.opacity(0.6))
}
.padding(.horizontal, 6)
}
}
.frame(maxHeight: .infinity)
- // Footer
- bannerFooter(context: context, primaryFg: primaryFg, isWaiting: false)
+ bannerFooter(context: context, isWaiting: false)
}
.padding(.horizontal, 8)
.padding(.vertical, 10)
@@ -187,10 +181,10 @@ struct CodyncLiveActivityWidget: Widget {
.activityBackgroundTint(.clear)
}
- // MARK: - Chowder Card Mode (no task list)
+ // MARK: - Card Stack Mode
@ViewBuilder
- private func chowderBanner(context: ActivityViewContext<CodyncAttributes>) -> some View {
+ private func cardBanner(context: ActivityViewContext<CodyncAttributes>) -> some View {
let state = context.state
let isCompleted = state.status == "completed"
@@ -208,13 +202,9 @@ struct CodyncLiveActivityWidget: Widget {
let frontCard = completedTasks.last?.truncatedContent
let isWaiting = cards.isEmpty && !isCompleted
- let primaryFg = Color(red: 47/255, green: 59/255, blue: 84/255)
-
VStack(alignment: .leading, spacing: 4) {
- // Header
- bannerHeader(context: context, primaryFg: primaryFg)
+ bannerHeader(context: context)
- // Cards area
ZStack {
if isCompleted {
VStack(alignment: .center, spacing: 8) {
@@ -222,15 +212,15 @@ struct CodyncLiveActivityWidget: Widget {
.font(.system(size: 16, weight: .bold))
.foregroundStyle(.white)
.frame(width: 28, height: 28)
- .background(Color.green, in: Circle())
+ .background(Self.fg, in: Circle())
VStack(spacing: 2) {
Text("Session Complete")
.font(.subheadline.bold())
- .foregroundStyle(primaryFg)
+ .foregroundStyle(Self.fg)
Text("$\(String(format: "%.2f", state.costUSD))")
.font(.footnote)
- .foregroundStyle(.secondary)
+ .foregroundStyle(Self.fg.opacity(0.5))
}
}
.frame(maxWidth: .infinity)
@@ -239,11 +229,11 @@ struct CodyncLiveActivityWidget: Widget {
Text(state.currentTask ?? "Analyzing code…")
.lineLimit(2)
.multilineTextAlignment(.leading)
- .foregroundStyle(.blue)
+ .foregroundStyle(Self.fg)
.padding(12)
.frame(minWidth: 52)
.background(
- Color.blue.opacity(0.12),
+ Self.fg.opacity(0.08),
in: RoundedRectangle(cornerRadius: 16, style: .continuous)
)
.padding(.leading, 48)
@@ -267,8 +257,7 @@ struct CodyncLiveActivityWidget: Widget {
.frame(maxHeight: .infinity)
.zIndex(10)
- // Footer
- bannerFooter(context: context, primaryFg: primaryFg, isWaiting: isWaiting)
+ bannerFooter(context: context, isWaiting: isWaiting)
}
.padding(.horizontal, 8)
.padding(.vertical, 10)
@@ -277,19 +266,19 @@ struct CodyncLiveActivityWidget: Widget {
.activityBackgroundTint(.clear)
}
- // MARK: - Shared Banner Components
+ // MARK: - Shared Components
@ViewBuilder
- private func bannerHeader(context: ActivityViewContext<CodyncAttributes>, primaryFg: Color) -> some View {
+ private func bannerHeader(context: ActivityViewContext<CodyncAttributes>) -> some View {
let state = context.state
HStack(spacing: 10) {
HStack(spacing: 6) {
Image(systemName: "chevron.left.forwardslash.chevron.right")
.font(.system(size: 10, weight: .bold))
- .foregroundStyle(primaryFg.opacity(0.6))
+ .foregroundStyle(Self.fg.opacity(0.6))
.frame(width: 21, height: 21)
- .background(primaryFg.opacity(0.08), in: Circle())
+ .background(Self.fg.opacity(0.08), in: Circle())
Text(context.attributes.projectName)
.font(.callout.bold())
@@ -309,14 +298,14 @@ struct CodyncLiveActivityWidget: Widget {
.padding(.horizontal, 8)
.overlay {
Capsule()
- .stroke(primaryFg.opacity(alert ? 0.06 : 0.12))
+ .stroke(Self.fg.opacity(alert ? 0.06 : 0.12))
}
- .background(primaryFg.opacity(alert ? 0.12 : 0), in: Capsule())
+ .background(Self.fg.opacity(alert ? 0.12 : 0), in: Capsule())
.monospacedDigit()
} else {
HStack(spacing: 5) {
Circle()
- .fill(statusColor(state.status))
+ .fill(Self.fg)
.frame(width: 5, height: 5)
Text(statusLabel(state.status))
.opacity(0.48)
@@ -327,11 +316,11 @@ struct CodyncLiveActivityWidget: Widget {
.font(.subheadline.bold())
.frame(height: 28)
.padding(.horizontal, 6)
- .foregroundStyle(primaryFg)
+ .foregroundStyle(Self.fg)
}
@ViewBuilder
- private func bannerFooter(context: ActivityViewContext<CodyncAttributes>, primaryFg: Color, isWaiting: Bool) -> some View {
+ private func bannerFooter(context: ActivityViewContext<CodyncAttributes>, isWaiting: Bool) -> some View {
let state = context.state
let isCompleted = state.status == "completed"
@@ -342,7 +331,7 @@ struct CodyncLiveActivityWidget: Widget {
.padding(.leading, 8)
} else {
HStack(spacing: 2) {
- Image(systemName: statusIcon(state.status))
+ Image(systemName: "arrow.turn.down.right")
.frame(width: 24, height: 18)
Text(isWaiting ? "Starting…" : (state.currentTask ?? statusLabel(state.status)))
.lineLimit(1)
@@ -369,7 +358,7 @@ struct CodyncLiveActivityWidget: Widget {
.layoutPriority(1)
}
}
- .foregroundStyle(primaryFg)
+ .foregroundStyle(Self.fg)
.padding(.leading, 4)
.padding(.trailing, 12)
.font(.footnote.bold())
@@ -378,22 +367,6 @@ struct CodyncLiveActivityWidget: Widget {
// MARK: - Helpers
- private func statusColor(_ status: String) -> Color {
- switch status {
- case "working": .blue
- case "idle": .secondary
- case "needsInput": .orange
- case "compacting": .purple
- case "error": .red
- case "completed": .green
- default: .gray
- }
- }
-
- private func islandStatusColor(_ state: CodyncAttributes.ContentState) -> Color {
- state.status == "completed" ? .green : .blue
- }
-
private func statusLabel(_ status: String) -> String {
switch status {
case "working": "Working"
@@ -406,46 +379,47 @@ struct CodyncLiveActivityWidget: Widget {
}
}
- private func statusIcon(_ status: String) -> String {
+ /// Lock Screen task segments — monochrome navy at different opacities
+ private func taskColor(_ status: TaskStatus) -> Color {
switch status {
- case "working": "arrow.turn.down.right"
- case "idle": "pause.circle"
- case "needsInput": "exclamationmark.bubble"
- case "compacting": "arrow.triangle.2.circlepath"
- case "error": "exclamationmark.triangle"
- default: "arrow.turn.down.right"
+ case .completed: Self.fg
+ case .inProgress: Self.fg.opacity(0.4)
+ case .pending: Self.fg.opacity(0.12)
}
}
- private func taskColor(_ status: TaskStatus) -> Color {
+ /// Dynamic Island task segments — monochrome white at different opacities
+ private func islandTaskColor(_ status: TaskStatus) -> Color {
switch status {
- case .completed: .blue
- case .inProgress: .blue.opacity(0.4)
- case .pending: Color(.systemGray4)
+ case .completed: .white
+ case .inProgress: .white.opacity(0.4)
+ case .pending: .white.opacity(0.12)
}
}
}
-// MARK: - Task Card (chowder mode)
+// MARK: - Task Card
struct TaskCard: View {
let text: String
let isBehind: Bool
+ private static let fg = Color(red: 47/255, green: 59/255, blue: 84/255)
+
var body: some View {
HStack(spacing: 8) {
Image(systemName: "checkmark")
.font(.system(size: 11, weight: .semibold))
- .foregroundStyle(.black.opacity(0.5))
+ .foregroundStyle(Self.fg.opacity(0.5))
.frame(width: 21, height: 21)
.background(
Circle()
- .foregroundStyle(.black.opacity(0.12))
+ .foregroundStyle(Self.fg.opacity(0.12))
)
Text(text)
.font(.callout)
- .foregroundStyle(.black)
+ .foregroundStyle(Self.fg)
.lineLimit(2)
.frame(maxWidth: .infinity, alignment: .leading)
}