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.

refactor: remove glass card effects from session lists, keep smooth reorder only

libokaid2abf17655e2
diff --git a/Codync-iOS/Views/IOSSessionListView.swift b/Codync-iOS/Views/IOSSessionListView.swift
index 40404c90..2efd7797 100644
--- a/Codync-iOS/Views/IOSSessionListView.swift
+++ b/Codync-iOS/Views/IOSSessionListView.swift
@@ -5,9 +5,6 @@ struct IOSSessionListView: View {
let sessions: [SessionState]
@ObservedObject var liveActivityManager: LiveActivityManager
@Environment(\.theme) private var theme
- @State private var previousOrder: [String] = []
- @State private var cardStyles: [String: GlassCardStyle] = [:]
-
var body: some View {
ScrollView {
LazyVStack(spacing: 1) {
@@ -22,7 +19,6 @@ struct IOSSessionListView: View {
}
.buttonStyle(.plain)
.tint(theme.primaryText)
- .glassCard(cardStyles[session.sessionId] ?? .normal, isDark: theme.isDark)
}
}
}
@@ -38,23 +34,6 @@ struct IOSSessionListView: View {
}
}
.toolbarColorScheme(.dark, for: .navigationBar)
- .onChange(of: sessions.map(\.sessionId)) { _, newOrder in
- var newStyles: [String: GlassCardStyle] = [:]
- for (newIdx, id) in newOrder.enumerated() {
- if let oldIdx = previousOrder.firstIndex(of: id) {
- if newIdx < oldIdx { newStyles[id] = .elevated }
- else if newIdx > oldIdx { newStyles[id] = .receded }
- }
- }
- cardStyles = newStyles
- previousOrder = newOrder
-
- // Reset after animation completes
- Task {
- try? await Task.sleep(for: .seconds(2.0))
- withAnimation(.easeOut(duration: 0.3)) { cardStyles = [:] }
- }
- }
}
}
diff --git a/Codync-macOS/App/MenuBarController.swift b/Codync-macOS/App/MenuBarController.swift
index 449ffb3f..b9d8899d 100644
--- a/Codync-macOS/App/MenuBarController.swift
+++ b/Codync-macOS/App/MenuBarController.swift
@@ -289,8 +289,8 @@ private struct CodyncPanelContentView: View {
// Session list appears when expanded
if isExpanded {
SessionListView(stateManager: stateManager, panelState: panelState)
- .environment(\.theme, CodyncTheme(isDark: isDarkMode, isPanel: true))
- .preferredColorScheme(isDarkMode ? .dark : .light)
+ .environment(\.theme, CodyncTheme(isDark: true, isPanel: true))
+ .preferredColorScheme(.dark)
.transition(
.asymmetric(
insertion: .opacity
diff --git a/Codync-macOS/Views/SessionListView.swift b/Codync-macOS/Views/SessionListView.swift
index c53c28e2..340a2a98 100644
--- a/Codync-macOS/Views/SessionListView.swift
+++ b/Codync-macOS/Views/SessionListView.swift
@@ -4,12 +4,11 @@ import CodyncShared
struct SessionListView: View {
@ObservedObject var stateManager: SessionStateManager
var panelState: CodyncPanelState?
- @AppStorage("codync_darkMode") private var isDarkMode = false
+ @AppStorage("codync_darkMode") private var storedDarkMode = true
+ @State private var isDarkMode = true
@State private var selectedSession: SessionState?
@State private var displayedSessions: [SessionState] = []
@State private var reorderTimer: Timer?
- @State private var previousOrder: [String] = []
- @State private var cardStyles: [String: GlassCardStyle] = [:]
@Environment(\.theme) private var injectedTheme
private var theme: CodyncTheme {
@@ -32,6 +31,10 @@ struct SessionListView: View {
.background(theme.background)
.environment(\.theme, theme)
.preferredColorScheme(theme.isDark ? .dark : .light)
+ .onAppear { isDarkMode = storedDarkMode }
+ .onChange(of: storedDarkMode) { _, newValue in
+ withAnimation(.easeInOut(duration: 0.6)) { isDarkMode = newValue }
+ }
.task {
displayedSessions = stateManager.sessions
reorderTimer?.invalidate()
@@ -65,35 +68,21 @@ struct SessionListView: View {
SessionRowView(session: session) {
withAnimation(.easeInOut(duration: 0.2)) { selectedSession = session }
}
- .glassCard(cardStyles[session.sessionId] ?? .normal, isDark: theme.isDark)
}
}
.padding(.vertical, 6)
.padding(.horizontal, 4)
}
+ .environment(\.theme, CodyncTheme(isDark: isDarkMode, isPanel: false))
.frame(maxHeight: 420)
- .background(theme.cardBackground, in: RoundedRectangle(cornerRadius: 12, style: .continuous))
+ .background(
+ (isDarkMode ? theme.cardBackground : Color.white.opacity(0.85)),
+ in: RoundedRectangle(cornerRadius: 12, style: .continuous)
+ )
.padding(.horizontal, 14)
.padding(.vertical, 6)
}
}
- .onChange(of: displayedSessions.map(\.sessionId)) { _, newOrder in
- var newStyles: [String: GlassCardStyle] = [:]
- for (newIdx, id) in newOrder.enumerated() {
- if let oldIdx = previousOrder.firstIndex(of: id) {
- if newIdx < oldIdx { newStyles[id] = .elevated }
- else if newIdx > oldIdx { newStyles[id] = .receded }
- }
- }
- cardStyles = newStyles
- previousOrder = newOrder
-
- // Reset after animation completes
- Task {
- try? await Task.sleep(for: .seconds(2.0))
- withAnimation(.easeOut(duration: 0.3)) { cardStyles = [:] }
- }
- }
}
private var emptyState: some View {