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.

feat: macOS panel header with pin/dark-mode/quit, remove footer, light mode support

libokai38b74508f69c
diff --git a/Codync-macOS/App/MenuBarController.swift b/Codync-macOS/App/MenuBarController.swift
index a1ec2759..06517c3b 100644
--- a/Codync-macOS/App/MenuBarController.swift
+++ b/Codync-macOS/App/MenuBarController.swift
@@ -7,6 +7,7 @@ import CodyncShared
@MainActor
final class CodyncPanelState: ObservableObject {
@Published var isExpanded = false
+ @Published var isPinned = false
@Published var headerSize: CGSize = .zero
@Published var contentHeight: CGFloat = 0
var collapsedRect: CGRect = .zero
@@ -190,8 +191,7 @@ final class MenuBarController: NSObject {
}
private func handleGlobalClick() {
- guard panelState.isExpanded else { return }
- // Global monitor only fires for clicks OUTSIDE our app — dismiss panel
+ guard panelState.isExpanded, !panelState.isPinned else { return }
panelState.isExpanded = false
}
@@ -242,6 +242,7 @@ private final class CodyncHitTestView: NSView {
private struct CodyncPanelContentView: View {
@ObservedObject var panelState: CodyncPanelState
@ObservedObject var stateManager: SessionStateManager
+ @AppStorage("codync_darkMode") private var isDarkMode = true
private var headerSize: CGSize { panelState.headerSize }
private var isExpanded: Bool { panelState.isExpanded }
@@ -270,11 +271,11 @@ private struct CodyncPanelContentView: View {
panelState.isExpanded.toggle()
}
- // Session list appears when expanded — pure black panel theme
+ // Session list appears when expanded
if isExpanded {
- SessionListView(stateManager: stateManager)
- .environment(\.theme, CodyncTheme(isDark: true, isPanel: true))
- .preferredColorScheme(.dark)
+ SessionListView(stateManager: stateManager, panelState: panelState)
+ .environment(\.theme, CodyncTheme(isDark: isDarkMode, isPanel: true))
+ .preferredColorScheme(isDarkMode ? .dark : .light)
.transition(
.asymmetric(
insertion: .opacity
@@ -289,7 +290,7 @@ private struct CodyncPanelContentView: View {
.frame(width: isExpanded ? 320 : headerSize.width - 12)
.padding(.horizontal, isExpanded ? 19 : 6)
.padding(.bottom, isExpanded ? 12 : 0)
- .background(Color.black)
+ .background(isDarkMode ? Color.black : Color(red: 0.95, green: 0.95, blue: 0.96))
.clipShape(CodyncPanelShape(
topCornerRadius: topCornerRadius,
bottomCornerRadius: bottomCornerRadius
diff --git a/Codync-macOS/Views/PanelHeaderView.swift b/Codync-macOS/Views/PanelHeaderView.swift
new file mode 100644
index 00000000..dd2955e9
--- /dev/null
+++ b/Codync-macOS/Views/PanelHeaderView.swift
@@ -0,0 +1,41 @@
+import SwiftUI
+
+struct PanelHeaderView: View {
+ @ObservedObject var panelState: CodyncPanelState
+ @AppStorage("codync_darkMode") private var isDarkMode = true
+ @Environment(\.theme) private var theme
+
+ var body: some View {
+ HStack(spacing: 8) {
+ Text("Codync")
+ .font(.system(size: 12, weight: .semibold))
+ .foregroundStyle(theme.primaryText)
+
+ Spacer()
+
+ Button(action: { isDarkMode.toggle() }) {
+ Image(systemName: isDarkMode ? "sun.max" : "moon")
+ .font(.system(size: 11))
+ .foregroundStyle(theme.secondaryText)
+ }
+ .buttonStyle(.plain)
+
+ Button(action: { panelState.isPinned.toggle() }) {
+ Image(systemName: panelState.isPinned ? "pin.fill" : "pin")
+ .font(.system(size: 11))
+ .foregroundStyle(panelState.isPinned ? theme.primaryText : theme.secondaryText)
+ .rotationEffect(.degrees(panelState.isPinned ? 0 : 45))
+ }
+ .buttonStyle(.plain)
+
+ Button(action: { NSApp.terminate(nil) }) {
+ Image(systemName: "xmark")
+ .font(.system(size: 10, weight: .medium))
+ .foregroundStyle(theme.secondaryText)
+ }
+ .buttonStyle(.plain)
+ }
+ .padding(.horizontal, 14)
+ .padding(.vertical, 8)
+ }
+}
diff --git a/Codync-macOS/Views/SessionListView.swift b/Codync-macOS/Views/SessionListView.swift
index 0af003de..a03db204 100644
--- a/Codync-macOS/Views/SessionListView.swift
+++ b/Codync-macOS/Views/SessionListView.swift
@@ -3,6 +3,7 @@ import CodyncShared
struct SessionListView: View {
@ObservedObject var stateManager: SessionStateManager
+ var panelState: CodyncPanelState?
@AppStorage("codync_darkMode") private var isDarkMode = false
@State private var selectedSession: SessionState?
@Environment(\.theme) private var injectedTheme
@@ -26,11 +27,15 @@ struct SessionListView: View {
.fixedSize(horizontal: true, vertical: true)
.background(theme.background)
.environment(\.theme, theme)
- .preferredColorScheme(theme.isPanel ? .dark : (isDarkMode ? .dark : .light))
+ .preferredColorScheme(theme.isDark ? .dark : .light)
}
private var sessionList: some View {
VStack(spacing: 0) {
+ if let panelState {
+ PanelHeaderView(panelState: panelState)
+ }
+
if stateManager.sessions.isEmpty {
emptyState
} else {
@@ -50,12 +55,6 @@ struct SessionListView: View {
.padding(.horizontal, 14)
.padding(.vertical, 6)
}
-
- Divider()
- .opacity(theme.isPanel ? 0.3 : 1)
- .padding(.horizontal, 8)
-
- footer
}
}
@@ -72,35 +71,4 @@ struct SessionListView: View {
.frame(maxWidth: .infinity)
}
- private var footer: some View {
- HStack(alignment: .center, spacing: 8) {
- Text("Codync")
- .font(.system(size: 10, weight: .medium))
- .foregroundStyle(theme.tertiaryText)
-
- Spacer()
-
- if !theme.isPanel {
- Button(action: { isDarkMode.toggle() }) {
- Image(systemName: isDarkMode ? "sun.max" : "moon")
- .font(.system(size: 11))
- .foregroundStyle(theme.secondaryText)
- }
- .buttonStyle(.plain)
- }
-
- Button(action: { NSApp.terminate(nil) }) {
- Text("Quit")
- .font(.system(size: 11))
- .foregroundStyle(theme.secondaryText)
- }
- .buttonStyle(.plain)
- .onHover { inside in
- if inside { NSCursor.pointingHand.push() }
- else { NSCursor.pop() }
- }
- }
- .padding(.horizontal, 12)
- .padding(.vertical, 8)
- }
}
diff --git a/Codync.xcodeproj/project.pbxproj b/Codync.xcodeproj/project.pbxproj
index 1395bc38..6cc4ce00 100644
--- a/Codync.xcodeproj/project.pbxproj
+++ b/Codync.xcodeproj/project.pbxproj
@@ -22,6 +22,7 @@
7851B112737C5DD8B8C3380C /* JSONLTailReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05154CFD496486BA9E126E9D /* JSONLTailReader.swift */; };
804863D604952293533147CF /* CodyncLiveActivity.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3B652652FD106495A82565C8 /* CodyncLiveActivity.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
911C6ABDB9539A60844931F2 /* PIDChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D161FDC49BE96E3A73FEA33 /* PIDChecker.swift */; };
+ PANEL001122334455667788 /* PanelHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = PANEL002233445566778899 /* PanelHeaderView.swift */; };
A30C11E610763F5064698D43 /* IOSSessionListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01A225437E7A00B3337883E /* IOSSessionListView.swift */; };
A98E0466D559EC6EBE0E39F4 /* ClaudeHookServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E25C5CD874B7119D57AB2BB1 /* ClaudeHookServer.swift */; };
APNS0001D559EC6EBE0E39F4 /* APNsPushService.swift in Sources */ = {isa = PBXBuildFile; fileRef = APNS0002D559EC6EBE0E39F4 /* APNsPushService.swift */; };
@@ -102,6 +103,7 @@
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>"; };
+ PANEL002233445566778899 /* PanelHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelHeaderView.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>"; };
@@ -227,6 +229,7 @@
81EF17B3D3346D74A837F710 /* Views */ = {
isa = PBXGroup;
children = (
+ PANEL002233445566778899 /* PanelHeaderView.swift */,
D10CABFC27BF22D45064777A /* SessionDetailView.swift */,
DA699D0197B8A14FD7D1BDC4 /* SessionListView.swift */,
AD09204E8CD3C16D75BA3048 /* SessionRowView.swift */,
@@ -433,6 +436,7 @@
EE55FF6600112233445566AA /* EventMonitor.swift in Sources */,
4450C6683BA7614D2DBB5E55 /* MenuBarController.swift in Sources */,
FF66001122334455667788BB /* NSScreen+Notch.swift in Sources */,
+ PANEL001122334455667788 /* PanelHeaderView.swift in Sources */,
911C6ABDB9539A60844931F2 /* PIDChecker.swift in Sources */,
BF17F10AC69617C12975E0EB /* SessionDetailView.swift in Sources */,
73382915E3200DDC5EF16C2F /* SessionFileParser.swift in Sources */,