native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'main' of github.com:onevcat/Prowl

onevcat 71b3d0f7 02141e46

+30 -20
+9 -4
supacode/Clients/Git/GitClient.swift
··· 605 605 nonisolated private func parseLocalRefsWithUpstream(_ output: String) -> [String] { 606 606 output 607 607 .split(whereSeparator: \.isNewline) 608 - .compactMap { line in 608 + .flatMap { line -> [String] in 609 609 let parts = line.split(separator: "\t", omittingEmptySubsequences: false) 610 610 guard let local = parts.first else { 611 - return nil 611 + return [] 612 612 } 613 613 let localRef = String(local).trimmingCharacters(in: .whitespacesAndNewlines) 614 614 let upstreamRef = 615 615 parts.count > 1 616 616 ? String(parts[1]).trimmingCharacters(in: .whitespacesAndNewlines) 617 617 : "" 618 + 619 + var refs: [String] = [] 620 + if !localRef.isEmpty { 621 + refs.append(localRef) 622 + } 618 623 if !upstreamRef.isEmpty { 619 - return upstreamRef 624 + refs.append(upstreamRef) 620 625 } 621 - return localRef.isEmpty ? nil : localRef 626 + return refs 622 627 } 623 628 } 624 629
-10
supacode/Features/CommandPalette/Views/CommandPaletteOverlayView.swift
··· 605 605 fileprivate var isLightColor: Bool { 606 606 luminance > 0.5 607 607 } 608 - 609 - fileprivate var luminance: Double { 610 - var red: CGFloat = 0 611 - var green: CGFloat = 0 612 - var blue: CGFloat = 0 613 - var alpha: CGFloat = 0 614 - guard let rgb = usingColorSpace(.sRGB) else { return 0 } 615 - rgb.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 616 - return (0.299 * red) + (0.587 * green) + (0.114 * blue) 617 - } 618 608 }
+7 -1
supacode/Features/Repositories/Views/SidebarFooterView.swift
··· 86 86 .padding(.horizontal, 12) 87 87 .padding(.vertical, 8) 88 88 .frame(maxWidth: .infinity, alignment: .leading) 89 - .background(Color(nsColor: .windowBackgroundColor).opacity(surfaceBottomChromeBackgroundOpacity)) 89 + .background { 90 + if surfaceBottomChromeBackgroundOpacity < 1 { 91 + Rectangle().fill(.regularMaterial) 92 + } else { 93 + Color(nsColor: .windowBackgroundColor) 94 + } 95 + } 90 96 .overlay(alignment: .top) { 91 97 Divider() 92 98 }
+9 -1
supacode/Infrastructure/Ghostty/GhosttyRuntime.swift
··· 624 624 backgroundColor().isLightColor ? .aqua : .darkAqua 625 625 } 626 626 627 + /// Returns a window background color that tints the macOS glass effect 628 + /// for non-opaque windows. macOS 26 renders a white-biased glass on 629 + /// non-opaque windows; darker colors need higher alpha to counteract 630 + /// the white bias, lighter colors need almost none. 631 + static func chromeBackgroundColor(for color: NSColor) -> NSColor { 632 + color.withAlphaComponent(0.7) 633 + } 634 + 627 635 private func backgroundColorFromConfig() -> NSColor? { 628 636 guard let config else { return nil } 629 637 var color: ghostty_config_color_s = .init() ··· 687 695 luminance > 0.5 688 696 } 689 697 690 - fileprivate var luminance: Double { 698 + var luminance: Double { 691 699 var red: CGFloat = 0 692 700 var green: CGFloat = 0 693 701 var blue: CGFloat = 0
+2 -1
supacode/Infrastructure/Ghostty/GhosttySurfaceView.swift
··· 441 441 if !isBackgroundOpaqueOverride, !window.styleMask.contains(.fullScreen), opacity < 1 { 442 442 window.isOpaque = false 443 443 window.titlebarAppearsTransparent = true 444 - window.backgroundColor = .white.withAlphaComponent(0.001) 444 + let isDark = window.effectiveAppearance.bestMatch(from: [.darkAqua, .aqua]) == .darkAqua 445 + window.backgroundColor = GhosttyRuntime.chromeBackgroundColor(for: isDark ? .black : .white) 445 446 if let app = runtime.app { 446 447 ghostty_set_window_background_blur( 447 448 app,
+3 -3
supacodeTests/GitClientBranchRefsTests.swift
··· 12 12 } 13 13 14 14 struct GitClientBranchRefsTests { 15 - @Test func branchRefsUsesUpstreamsOrLocalRefs() async throws { 15 + @Test func branchRefsIncludesLocalAndUpstreamRefs() async throws { 16 16 let store = ShellCallStore() 17 17 let output = """ 18 18 feature\torigin/feature ··· 31 31 32 32 let refs = try await client.branchRefs(for: repoRoot) 33 33 34 - let expected = ["origin/bugfix", "origin/feature", "main"] 34 + let expected = ["bugfix", "feature", "main", "origin/bugfix", "origin/feature"] 35 35 .sorted { $0.localizedStandardCompare($1) == .orderedAscending } 36 36 #expect(refs == expected) 37 37 let calls = await store.calls ··· 57 57 58 58 let refs = try await client.branchRefs(for: repoRoot) 59 59 60 - #expect(refs == ["origin/main"]) 60 + #expect(refs == ["head", "main", "origin/main"]) 61 61 } 62 62 63 63 @Test func defaultRemoteBranchRefStripsPrefix() async throws {