native macOS codings agent orchestrator
6
fork

Configure Feed

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

Merge remote-tracking branch 'upstream/main'

onevcat d7aa37da 0e15104b

+68 -9
+8 -8
supacode.xcodeproj/project.pbxproj
··· 435 435 CODE_SIGN_STYLE = Automatic; 436 436 COMBINE_HIDPI_IMAGES = YES; 437 437 COMPILATION_CACHE_ENABLE_CACHING = YES; 438 - CURRENT_PROJECT_VERSION = 107; 438 + CURRENT_PROJECT_VERSION = 108; 439 439 DEAD_CODE_STRIPPING = YES; 440 440 DEBUG_INFORMATION_FORMAT = dwarf; 441 441 DEVELOPMENT_TEAM = ""; ··· 457 457 "@executable_path/../Frameworks", 458 458 ); 459 459 MACOSX_DEPLOYMENT_TARGET = 26.0; 460 - MARKETING_VERSION = 0.6.2; 460 + MARKETING_VERSION = 0.6.3; 461 461 OTHER_LDFLAGS = ( 462 462 "$(inherited)", 463 463 "-lc++", ··· 490 490 CODE_SIGN_STYLE = Automatic; 491 491 COMBINE_HIDPI_IMAGES = YES; 492 492 COMPILATION_CACHE_ENABLE_CACHING = NO; 493 - CURRENT_PROJECT_VERSION = 107; 493 + CURRENT_PROJECT_VERSION = 108; 494 494 DEAD_CODE_STRIPPING = YES; 495 495 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 496 496 DEVELOPMENT_TEAM = ""; ··· 512 512 "@executable_path/../Frameworks", 513 513 ); 514 514 MACOSX_DEPLOYMENT_TARGET = 26.0; 515 - MARKETING_VERSION = 0.6.2; 515 + MARKETING_VERSION = 0.6.3; 516 516 OTHER_LDFLAGS = ( 517 517 "$(inherited)", 518 518 "-lc++", ··· 541 541 buildSettings = { 542 542 BUNDLE_LOADER = "$(TEST_HOST)"; 543 543 CODE_SIGN_STYLE = Automatic; 544 - CURRENT_PROJECT_VERSION = 107; 544 + CURRENT_PROJECT_VERSION = 108; 545 545 DEAD_CODE_STRIPPING = YES; 546 546 DEVELOPMENT_TEAM = ""; 547 547 GENERATE_INFOPLIST_FILE = YES; 548 548 MACOSX_DEPLOYMENT_TARGET = 26.1; 549 - MARKETING_VERSION = 0.6.2; 549 + MARKETING_VERSION = 0.6.3; 550 550 PRODUCT_BUNDLE_IDENTIFIER = app.supabit.supacodeTests; 551 551 PRODUCT_NAME = "$(TARGET_NAME)"; 552 552 STRING_CATALOG_GENERATE_SYMBOLS = NO; ··· 563 563 buildSettings = { 564 564 BUNDLE_LOADER = "$(TEST_HOST)"; 565 565 CODE_SIGN_STYLE = Automatic; 566 - CURRENT_PROJECT_VERSION = 107; 566 + CURRENT_PROJECT_VERSION = 108; 567 567 DEAD_CODE_STRIPPING = YES; 568 568 DEVELOPMENT_TEAM = ""; 569 569 GENERATE_INFOPLIST_FILE = YES; 570 570 MACOSX_DEPLOYMENT_TARGET = 26.1; 571 - MARKETING_VERSION = 0.6.2; 571 + MARKETING_VERSION = 0.6.3; 572 572 PRODUCT_BUNDLE_IDENTIFIER = app.supabit.supacodeTests; 573 573 PRODUCT_NAME = "$(TARGET_NAME)"; 574 574 STRING_CATALOG_GENERATE_SYMBOLS = NO;
+4 -1
supacode/Features/App/Reducer/AppFeature.swift
··· 210 210 } 211 211 212 212 case .repositories(.delegate(.repositoriesChanged(let repositories))): 213 - let ids = Set(repositories.flatMap { $0.worktrees.map(\.id) }) 213 + let archivedIDs = state.repositories.archivedWorktreeIDSet 214 + let ids = Set( 215 + repositories.flatMap { $0.worktrees.map(\.id) }.filter { !archivedIDs.contains($0) } 216 + ) 214 217 let recencyIDs = CommandPaletteFeature.recencyRetentionIDs(from: repositories) 215 218 let worktrees = state.repositories.worktreesForInfoWatcher() 216 219 state.runScriptStatusByWorktreeID = state.runScriptStatusByWorktreeID.filter { ids.contains($0.key) }
+56
supacodeTests/AppFeatureArchivedSelectionTests.swift
··· 48 48 await store.finish() 49 49 #expect(saved.value.isEmpty) 50 50 } 51 + 52 + @Test(.dependencies) func repositoriesChangedPrunesArchivedWorktreesFromTerminalAndRunScriptStatus() async { 53 + let rootURL = URL(fileURLWithPath: "/tmp/repo") 54 + let activeWorktree = Worktree( 55 + id: "/tmp/repo/wt-active", 56 + name: "wt-active", 57 + detail: "", 58 + workingDirectory: URL(fileURLWithPath: "/tmp/repo/wt-active"), 59 + repositoryRootURL: rootURL 60 + ) 61 + let archivedWorktree = Worktree( 62 + id: "/tmp/repo/wt-archived", 63 + name: "wt-archived", 64 + detail: "", 65 + workingDirectory: URL(fileURLWithPath: "/tmp/repo/wt-archived"), 66 + repositoryRootURL: rootURL 67 + ) 68 + let repository = Repository( 69 + id: rootURL.path(percentEncoded: false), 70 + rootURL: rootURL, 71 + name: "repo", 72 + worktrees: IdentifiedArray(uniqueElements: [activeWorktree, archivedWorktree]) 73 + ) 74 + var repositoriesState = RepositoriesFeature.State(repositories: [repository]) 75 + repositoriesState.selection = .worktree(activeWorktree.id) 76 + repositoriesState.archivedWorktreeIDs = [archivedWorktree.id] 77 + var appState = AppFeature.State( 78 + repositories: repositoriesState, 79 + settings: SettingsFeature.State() 80 + ) 81 + appState.runScriptStatusByWorktreeID = [ 82 + activeWorktree.id: true, 83 + archivedWorktree.id: true, 84 + ] 85 + let sentCommands = LockIsolated<[TerminalClient.Command]>([]) 86 + let store = TestStore(initialState: appState) { 87 + AppFeature() 88 + } withDependencies: { 89 + $0.terminalClient.send = { command in 90 + sentCommands.withValue { $0.append(command) } 91 + } 92 + $0.worktreeInfoWatcher.send = { _ in } 93 + } 94 + store.exhaustivity = .off 95 + 96 + await store.send(.repositories(.delegate(.repositoriesChanged([repository])))) { 97 + $0.runScriptStatusByWorktreeID = [activeWorktree.id: true] 98 + } 99 + await store.finish() 100 + 101 + #expect( 102 + sentCommands.value == [ 103 + .prune([activeWorktree.id]) 104 + ] 105 + ) 106 + } 51 107 }