native macOS codings agent orchestrator
6
fork

Configure Feed

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

Merge pull request #145 from onevcat/chore/warning-debt-cleanup

authored by

Wei Wang and committed by
GitHub
38e1430d 5fb1d618

+17 -16
+1
.github/workflows/test.yml
··· 13 13 env: 14 14 MISE_HTTP_TIMEOUT: 120 15 15 MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true 16 17 steps: 17 18 - uses: actions/checkout@v6 18 19 with:
+14 -14
supacodeTests/CLIFocusCommandHandlerTests.swift
··· 28 28 ) 29 29 } 30 30 31 - @Test func successfulFocusReturnsSchemaConformantPayload() async throws { 31 + @Test func successfulFocusReturnsSchemaConformantPayload() throws { 32 32 var focusedTarget: FocusResolvedTarget? 33 33 let handler = FocusCommandHandler( 34 34 resolveProvider: { selector in ··· 50 50 bringToFront: { true } 51 51 ) 52 52 53 - let response = await handler.handle( 53 + let response = handler.handle( 54 54 envelope: CommandEnvelope( 55 55 output: .json, 56 56 command: .focus(FocusInput(selector: .pane(Self.paneID.uuidString))) ··· 74 74 #expect(payload.target.pane.focused == true) 75 75 } 76 76 77 - @Test func currentSelectorUsesNilRequestedValue() async throws { 77 + @Test func currentSelectorUsesNilRequestedValue() throws { 78 78 var resolveNoneCount = 0 79 79 let handler = FocusCommandHandler( 80 80 resolveProvider: { selector in ··· 89 89 bringToFront: { true } 90 90 ) 91 91 92 - let response = await handler.handle( 92 + let response = handler.handle( 93 93 envelope: CommandEnvelope(output: .json, command: .focus(FocusInput(selector: .none))) 94 94 ) 95 95 ··· 101 101 #expect(payload.resolvedVia == .pane) 102 102 } 103 103 104 - @Test func targetNotFoundMapsToContractCode() async { 104 + @Test func targetNotFoundMapsToContractCode() { 105 105 let handler = FocusCommandHandler( 106 106 resolveProvider: { _ in .failure(.notFound("Pane missing")) }, 107 107 focusPerformer: { _ in true }, 108 108 bringToFront: { true } 109 109 ) 110 110 111 - let response = await handler.handle( 111 + let response = handler.handle( 112 112 envelope: CommandEnvelope( 113 113 output: .json, 114 114 command: .focus(FocusInput(selector: .pane("missing"))) ··· 119 119 #expect(response.error?.code == CLIErrorCode.targetNotFound) 120 120 } 121 121 122 - @Test func targetNotUniqueMapsToContractCode() async { 122 + @Test func targetNotUniqueMapsToContractCode() { 123 123 let handler = FocusCommandHandler( 124 124 resolveProvider: { _ in .failure(.notUnique("Ambiguous worktree")) }, 125 125 focusPerformer: { _ in true }, 126 126 bringToFront: { true } 127 127 ) 128 128 129 - let response = await handler.handle( 129 + let response = handler.handle( 130 130 envelope: CommandEnvelope( 131 131 output: .json, 132 132 command: .focus(FocusInput(selector: .worktree("Prowl"))) ··· 137 137 #expect(response.error?.code == CLIErrorCode.targetNotUnique) 138 138 } 139 139 140 - @Test func focusFailureReturnsFocusFailedCode() async { 140 + @Test func focusFailureReturnsFocusFailedCode() { 141 141 let handler = FocusCommandHandler( 142 142 resolveProvider: { _ in .success(Self.makeTarget()) }, 143 143 focusPerformer: { _ in false }, 144 144 bringToFront: { true } 145 145 ) 146 146 147 - let response = await handler.handle( 147 + let response = handler.handle( 148 148 envelope: CommandEnvelope(output: .json, command: .focus(FocusInput(selector: .none))) 149 149 ) 150 150 ··· 152 152 #expect(response.error?.code == CLIErrorCode.focusFailed) 153 153 } 154 154 155 - @Test func bringToFrontFailureReturnsFocusFailedCode() async { 155 + @Test func bringToFrontFailureReturnsFocusFailedCode() { 156 156 let handler = FocusCommandHandler( 157 157 resolveProvider: { _ in .success(Self.makeTarget()) }, 158 158 focusPerformer: { _ in true }, 159 159 bringToFront: { false } 160 160 ) 161 161 162 - let response = await handler.handle( 162 + let response = handler.handle( 163 163 envelope: CommandEnvelope(output: .json, command: .focus(FocusInput(selector: .none))) 164 164 ) 165 165 ··· 167 167 #expect(response.error?.code == CLIErrorCode.focusFailed) 168 168 } 169 169 170 - @Test func finalTargetMustBeActiveOrFocusFails() async { 170 + @Test func finalTargetMustBeActiveOrFocusFails() { 171 171 var resolveNoneCount = 0 172 172 let handler = FocusCommandHandler( 173 173 resolveProvider: { selector in ··· 186 186 bringToFront: { true } 187 187 ) 188 188 189 - let response = await handler.handle( 189 + let response = handler.handle( 190 190 envelope: CommandEnvelope(output: .json, command: .focus(FocusInput(selector: .none))) 191 191 ) 192 192
+1 -1
supacodeTests/RepositoriesFeatureTests.swift
··· 3234 3234 $0.repositoryPersistence.loadRoots = { [repoRootA, repoRootB] } 3235 3235 $0.gitClient.worktrees = { root in 3236 3236 let path = root.path(percentEncoded: false) 3237 - startedRoots.withValue { $0.insert(path) } 3237 + _ = startedRoots.withValue { $0.insert(path) } 3238 3238 if path == repoRootA { 3239 3239 await gate.wait() 3240 3240 return [worktreeA]
+1 -1
supacodeTests/SplitTreeTests.swift
··· 38 38 let tree = try SplitTree(view: first) 39 39 .inserting(view: second, at: first, direction: .right) 40 40 41 - let zoomed = tree.settingZoomed(try #require(tree.find(id: second.id))) 41 + let zoomed = tree.settingZoomed(tree.find(id: second.id)) 42 42 let visibleLeaves = zoomed.visibleLeaves() 43 43 44 44 #expect(visibleLeaves.count == 1)