native macOS codings agent orchestrator
6
fork

Configure Feed

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

new menubar

khoi 9a3e6c3d f111e0fd

+160 -26
+42 -2
supacode.xcodeproj/project.pbxproj
··· 7 7 objects = { 8 8 9 9 /* Begin PBXBuildFile section */ 10 + 12E9231689003F2C79951A15 /* XcodeStyleToolbarViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED463971B9461E5ECBBF65FE /* XcodeStyleToolbarViews.swift */; }; 10 11 32513D1E25BB4F418CABB2A8 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 8B2985744DB94333AE1B5878 /* Sentry */; }; 11 12 886A649F771240E8A5AC792D /* Dependencies in Frameworks */ = {isa = PBXBuildFile; productRef = 8D787DCF45744283A83F226F /* Dependencies */; }; 12 13 C8B33B9AFE69E738ABFA08BE /* ComposableArchitecture in Frameworks */ = {isa = PBXBuildFile; productRef = 497B582F42253CBC8FBF101F /* ComposableArchitecture */; }; ··· 37 38 D6A1CB2F2F1F4A48004FDABD /* GhosttyKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = GhosttyKit.xcframework; sourceTree = "<group>"; }; 38 39 D6A1CB342F1F4AC2004FDABD /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; 39 40 D6F821012F1FCBC1004B4174 /* supacodeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = supacodeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 41 + ED463971B9461E5ECBBF65FE /* XcodeStyleToolbarViews.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; lastKnownFileType = sourcecode.swift; name = XcodeStyleToolbarViews.swift; path = XcodeStyleToolbarViews.swift; sourceTree = "<group>"; }; 40 42 /* End PBXFileReference section */ 41 43 42 44 /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ 43 - D4C9CFFBF3C440848B2DA2B0 /* Exceptions for "supacode" folder in "supacode" target */ = { 45 + D4C9CFFBF3C440848B2DA2B0 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { 44 46 isa = PBXFileSystemSynchronizedBuildFileExceptionSet; 45 47 membershipExceptions = ( 46 48 Info.plist, ··· 53 55 D69CE04C2F1F378200584C57 /* supacode */ = { 54 56 isa = PBXFileSystemSynchronizedRootGroup; 55 57 exceptions = ( 56 - D4C9CFFBF3C440848B2DA2B0 /* Exceptions for "supacode" folder in "supacode" target */, 58 + D4C9CFFBF3C440848B2DA2B0 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, 57 59 ); 58 60 path = supacode; 59 61 sourceTree = "<group>"; ··· 90 92 /* End PBXFrameworksBuildPhase section */ 91 93 92 94 /* Begin PBXGroup section */ 95 + 06D3031424A604C5C5DDBBCB /* supacode */ = { 96 + isa = PBXGroup; 97 + children = ( 98 + 7CB8E823F75AD0C43E69F80D /* Features */, 99 + ); 100 + name = supacode; 101 + path = supacode; 102 + sourceTree = "<group>"; 103 + }; 104 + 7CB8E823F75AD0C43E69F80D /* Features */ = { 105 + isa = PBXGroup; 106 + children = ( 107 + ABD2418FB894805F47945939 /* Repositories */, 108 + ); 109 + name = Features; 110 + path = Features; 111 + sourceTree = "<group>"; 112 + }; 113 + A5590D708C914844C4CD97D7 /* Views */ = { 114 + isa = PBXGroup; 115 + children = ( 116 + ED463971B9461E5ECBBF65FE /* XcodeStyleToolbarViews.swift */, 117 + ); 118 + name = Views; 119 + path = Views; 120 + sourceTree = "<group>"; 121 + }; 122 + ABD2418FB894805F47945939 /* Repositories */ = { 123 + isa = PBXGroup; 124 + children = ( 125 + A5590D708C914844C4CD97D7 /* Views */, 126 + ); 127 + name = Repositories; 128 + path = Repositories; 129 + sourceTree = "<group>"; 130 + }; 93 131 D69CE0412F1F378200584C57 = { 94 132 isa = PBXGroup; 95 133 children = ( ··· 100 138 D6F821022F1FCBC1004B4174 /* supacodeTests */, 101 139 D69CE04B2F1F378200584C57 /* Products */, 102 140 D6A1CB2E2F1F4A36004FDABD /* Frameworks */, 141 + 06D3031424A604C5C5DDBBCB /* supacode */, 103 142 ); 104 143 sourceTree = "<group>"; 105 144 }; ··· 245 284 isa = PBXSourcesBuildPhase; 246 285 buildActionMask = 2147483647; 247 286 files = ( 287 + 12E9231689003F2C79951A15 /* XcodeStyleToolbarViews.swift in Sources */, 248 288 ); 249 289 runOnlyForDeploymentPostprocessing = 0; 250 290 };
+45 -24
supacode/Features/Repositories/Views/WorktreeDetailView.swift
··· 16 16 let selectedRow = repositories.selectedRow(for: repositories.selectedWorktreeID) 17 17 let selectedWorktree = repositories.worktree(for: repositories.selectedWorktreeID) 18 18 let loadingInfo = loadingInfo(for: selectedRow, repositories: repositories) 19 - let isOpenDisabled = selectedWorktree == nil || loadingInfo != nil 19 + let hasActiveWorktree = selectedWorktree != nil && loadingInfo == nil 20 20 let openActionSelection = state.openActionSelection 21 - let openSelectedWorktreeAction: (() -> Void)? = isOpenDisabled 22 - ? nil 23 - : { store.send(.openSelectedWorktree) } 24 - let newTerminalAction: (() -> Void)? = isOpenDisabled 25 - ? nil 26 - : { store.send(.newTerminal) } 27 - let closeTabAction: (() -> Void)? = isOpenDisabled 28 - ? nil 29 - : { store.send(.closeTab) } 30 - let closeSurfaceAction: (() -> Void)? = isOpenDisabled 31 - ? nil 32 - : { store.send(.closeSurface) } 21 + let openSelectedWorktreeAction: (() -> Void)? = hasActiveWorktree 22 + ? { store.send(.openSelectedWorktree) } 23 + : nil 24 + let newTerminalAction: (() -> Void)? = hasActiveWorktree 25 + ? { store.send(.newTerminal) } 26 + : nil 27 + let closeTabAction: (() -> Void)? = hasActiveWorktree 28 + ? { store.send(.closeTab) } 29 + : nil 30 + let closeSurfaceAction: (() -> Void)? = hasActiveWorktree 31 + ? { store.send(.closeSurface) } 32 + : nil 33 33 Group { 34 34 if let loadingInfo { 35 35 WorktreeLoadingView(info: loadingInfo) ··· 59 59 } 60 60 .navigationTitle(selectedWorktree?.name ?? loadingInfo?.name ?? "Supacode") 61 61 .toolbar { 62 - openToolbar( 63 - isOpenDisabled: isOpenDisabled, 64 - openActionSelection: openActionSelection, 65 - showExtras: commandKeyObserver.isPressed 66 - ) 62 + if hasActiveWorktree, let selectedWorktree { 63 + worktreeToolbar( 64 + branchName: selectedWorktree.name, 65 + openActionSelection: openActionSelection, 66 + showExtras: commandKeyObserver.isPressed 67 + ) 68 + } 67 69 } 68 70 .focusedSceneValue(\.newTerminalAction, newTerminalAction) 69 71 .focusedSceneValue(\.closeTabAction, closeTabAction) ··· 95 97 } 96 98 97 99 @ToolbarContentBuilder 98 - private func openToolbar( 99 - isOpenDisabled: Bool, 100 + private func worktreeToolbar( 101 + branchName: String, 100 102 openActionSelection: OpenWorktreeAction, 101 103 showExtras: Bool 102 104 ) -> some ToolbarContent { 103 - if !isOpenDisabled { 104 - ToolbarItemGroup(placement: .primaryAction) { 105 - openMenu(openActionSelection: openActionSelection, showExtras: showExtras) 105 + ToolbarItem(placement: .principal) { 106 + XcodeStyleStatusView() 107 + } 108 + 109 + #if DEBUG 110 + ToolbarItem(placement: .automatic) { 111 + Button("AUTOMATIC") { }.padding(.horizontal) 112 + 113 + } 114 + 115 + ToolbarItem(placement: .primaryAction) { 116 + Button("PR Button") { }.padding(.horizontal) 117 + } 118 + 119 + 120 + ToolbarItem(placement: .secondaryAction) { 121 + Button("secpond") { }.padding(.horizontal) 122 + } 123 + #endif 124 + 125 + ToolbarItem(placement: .status) { 126 + openMenu(openActionSelection: openActionSelection, showExtras: showExtras) 106 127 } 107 - } 128 + 108 129 } 109 130 110 131 @ViewBuilder
+73
supacode/Features/Repositories/Views/XcodeStyleToolbarViews.swift
··· 1 + import SwiftUI 2 + 3 + struct XcodeStyleStatusView: View { 4 + var body: some View { 5 + HStack(spacing: 8) { 6 + Image(systemName: "checkmark.circle.fill") 7 + .foregroundStyle(.green) 8 + .font(.system(size: 14)) 9 + 10 + Text("Build Succeeded") 11 + .font(.system(size: 12)) 12 + .foregroundStyle(.secondary) 13 + 14 + Text("|") 15 + .font(.system(size: 12)) 16 + .foregroundStyle(.quaternary) 17 + 18 + Text("Today at 2:34 PM") 19 + .font(.system(size: 12)) 20 + .foregroundStyle(.tertiary) 21 + } 22 + } 23 + } 24 + 25 + struct NoGlassEffectModifier: ViewModifier { 26 + func body(content: Content) -> some View { 27 + if #available(macOS 26.0, *) { 28 + content.glassEffect(.identity) 29 + } else { 30 + content 31 + } 32 + } 33 + } 34 + 35 + struct XcodeStyleDiagnosticsView: View { 36 + var body: some View { 37 + HStack(spacing: 8) { 38 + HStack(spacing: 5) { 39 + Image(systemName: "exclamationmark.triangle.fill") 40 + .foregroundStyle(.yellow) 41 + .font(.system(size: 12)) 42 + Text("3") 43 + .font(.system(size: 12, weight: .medium, design: .rounded)) 44 + } 45 + .padding(.horizontal, 8) 46 + .padding(.vertical, 4) 47 + .background(.yellow.opacity(0.15), in: RoundedRectangle(cornerRadius: 5)) 48 + 49 + HStack(spacing: 5) { 50 + Image(systemName: "xmark.circle.fill") 51 + .foregroundStyle(.red) 52 + .font(.system(size: 12)) 53 + Text("0") 54 + .font(.system(size: 12, weight: .medium, design: .rounded)) 55 + } 56 + .padding(.horizontal, 8) 57 + .padding(.vertical, 4) 58 + .background(.red.opacity(0.1), in: RoundedRectangle(cornerRadius: 5)) 59 + } 60 + .padding(.trailing, 4) 61 + } 62 + } 63 + 64 + 65 + #Preview("Status View") { 66 + XcodeStyleStatusView() 67 + .padding() 68 + } 69 + 70 + #Preview("Diagnostics View") { 71 + XcodeStyleDiagnosticsView() 72 + .padding() 73 + }