Skip to content

Commit 568c9bc

Browse files
chore: clear Effect language service suggestions (pingdotgg#13536)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 3e2370f commit 568c9bc

174 files changed

Lines changed: 1152 additions & 1311 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/src/app/DesktopAppIdentity.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const makeAssetsLayer = (png: Option.Option<string>) =>
7676
icns: Option.none(),
7777
png,
7878
}),
79-
resolveResourcePath: () => Effect.succeed(Option.none()),
79+
resolveResourcePath: () => Effect.succeedNone,
8080
} satisfies DesktopAssets.DesktopAssets["Service"]);
8181

8282
const makeEnvironmentLayer = (overrides: TestEnvironmentInput = {}) => {

‎apps/desktop/src/app/DesktopConnectionCatalogStore.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function makeSafeStorageLayer(available: boolean, failDecrypt: Ref.Ref<boolean>
4646
return decoded.slice("encrypted:".length);
4747
});
4848
},
49-
selectedStorageBackend: Effect.succeed(Option.none()),
49+
selectedStorageBackend: Effect.succeedNone,
5050
} satisfies ElectronSafeStorage.ElectronSafeStorage["Service"]);
5151
}
5252

‎apps/desktop/src/app/DesktopConnectionCatalogStore.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const readDocument = (
205205
raw === null
206206
? Effect.succeed(Option.none<EncryptedConnectionCatalogDocument>())
207207
: decodeEncryptedConnectionCatalogDocumentJson(raw).pipe(
208-
Effect.map(Option.some),
208+
Effect.asSome,
209209
Effect.mapError(
210210
(cause) =>
211211
new DesktopConnectionCatalogStoreDocumentDecodeError({

‎apps/desktop/src/backend/DesktopBackendConfiguration.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ const readPersistedBackendObservabilitySettings = Effect.gen(function* () {
199199
const fileSystem = yield* FileSystem.FileSystem;
200200
const environment = yield* DesktopEnvironment.DesktopEnvironment;
201201
const raw = yield* fileSystem.readFileString(environment.serverSettingsPath).pipe(
202-
Effect.map(Option.some),
202+
Effect.asSome,
203203
Effect.catchTags({
204204
PlatformError: (cause) =>
205205
cause.reason._tag === "NotFound"
206-
? Effect.succeed(Option.none())
206+
? Effect.succeedNone
207207
: logBackendObservabilitySettingsReadFailure(environment.serverSettingsPath, cause).pipe(
208208
Effect.as(Option.none()),
209209
),

‎apps/desktop/src/backend/DesktopBackendManager.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function makeTestInstance(input: MakeInstanceInput) {
162162
forInstance: () => Effect.succeed(stubLog),
163163
} satisfies DesktopObservability.DesktopBackendOutputLogFactory["Service"]),
164164
Layer.succeed(DesktopTelemetryPublisher.DesktopTelemetryPublisher, {
165-
latest: Effect.succeed(Option.none()),
165+
latest: Effect.succeedNone,
166166
changes: Stream.empty,
167167
encoded: input.desktopTelemetryStream ?? Stream.empty,
168168
handleControlForSource: () => Effect.void,
@@ -1545,7 +1545,7 @@ describe("DesktopBackendManager", () => {
15451545

15461546
const mockPool = Layer.succeed(DesktopBackendPool.DesktopBackendPool, {
15471547
list: Effect.succeed([instance1, instance2]),
1548-
get: () => Effect.succeed(Option.none()),
1548+
get: () => Effect.succeedNone,
15491549
primary: Effect.die(new Error("primary not implemented")),
15501550
register: () => Effect.die(new Error("register not implemented")),
15511551
unregister: () => Effect.die(new Error("unregister not implemented")),

‎apps/desktop/src/backend/DesktopBackendPool.test.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function makePoolLayer(
6767
} satisfies DesktopObservability.DesktopBackendOutputLogShape),
6868
} satisfies DesktopObservability.DesktopBackendOutputLogFactory["Service"]),
6969
Layer.succeed(DesktopTelemetryPublisher.DesktopTelemetryPublisher, {
70-
latest: Effect.succeed(Option.none()),
70+
latest: Effect.succeedNone,
7171
changes: Stream.empty,
7272
encoded: Stream.empty,
7373
handleControlForSource: () => Effect.void,
@@ -135,9 +135,7 @@ describe("DesktopBackendPool", () => {
135135

136136
it.effect("layerTest dies when no instances are supplied", () =>
137137
Effect.exit(
138-
Effect.gen(function* () {
139-
yield* DesktopBackendPool.DesktopBackendPool;
140-
}).pipe(Effect.provide(DesktopBackendPool.layerTest([]))),
138+
DesktopBackendPool.DesktopBackendPool.pipe(Effect.provide(DesktopBackendPool.layerTest([]))),
141139
).pipe(Effect.map((exit) => assert.equal(exit._tag, "Failure"))),
142140
);
143141

‎apps/desktop/src/backend/DesktopLocalEnvironmentAuth.test.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { assert, describe, it } from "@effect/vitest";
22
import * as Effect from "effect/Effect";
33
import * as Layer from "effect/Layer";
4-
import * as Option from "effect/Option";
54
import * as Ref from "effect/Ref";
65
import * as HttpClient from "effect/unstable/http/HttpClient";
76
import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
@@ -60,7 +59,7 @@ describe("DesktopLocalEnvironmentAuth", () => {
6059
{
6160
id: PRIMARY_LOCAL_ENVIRONMENT_ID,
6261
label: Effect.succeed("Windows"),
63-
currentConfig: Effect.succeed(Option.some(config)),
62+
currentConfig: Effect.succeedSome(config),
6463
},
6564
]),
6665
} as unknown as DesktopBackendPool.DesktopBackendPool["Service"]);

‎apps/desktop/src/electron/ElectronMenu.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export const make = Effect.gen(function* () {
226226
Effect.callback<Option.Option<string>>((resume) => {
227227
const normalizedItems = normalizeContextMenuItems(input.items);
228228
if (normalizedItems.length === 0) {
229-
resume(Effect.succeed(Option.none()));
229+
resume(Effect.succeedNone);
230230
return;
231231
}
232232

‎apps/desktop/src/ipc/methods/snapShot.test.ts‎

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe("window capture IPC", () => {
5151
Effect.provide(
5252
Layer.mergeAll(
5353
Layer.succeed(ElectronWindow.ElectronWindow, {
54-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
54+
main: Effect.succeedSome({ webContents: { id: 7 } }),
5555
} as ElectronWindow.ElectronWindow["Service"]),
5656
Layer.succeed(DesktopSnapShot.DesktopSnapShot, {
5757
previewConfig: () =>
@@ -87,7 +87,7 @@ describe("window capture IPC", () => {
8787
Effect.provide(
8888
Layer.mergeAll(
8989
Layer.succeed(ElectronWindow.ElectronWindow, {
90-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
90+
main: Effect.succeedSome({ webContents: { id: 7 } }),
9191
} as ElectronWindow.ElectronWindow["Service"]),
9292
Layer.succeed(DesktopSnapShot.DesktopSnapShot, {
9393
state: Effect.succeed({
@@ -120,7 +120,7 @@ describe("window capture IPC", () => {
120120
Effect.provide(
121121
Layer.mergeAll(
122122
Layer.succeed(ElectronWindow.ElectronWindow, {
123-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
123+
main: Effect.succeedSome({ webContents: { id: 7 } }),
124124
} as ElectronWindow.ElectronWindow["Service"]),
125125
Layer.succeed(DesktopSnapShot.DesktopSnapShot, {
126126
state: Effect.succeed({ linuxBackend: "niri" }),
@@ -156,13 +156,11 @@ describe("window capture IPC", () => {
156156
Layer.succeed(
157157
ElectronWindow.ElectronWindow,
158158
ElectronWindow.ElectronWindow.of({
159-
main: Effect.succeed(
160-
Option.some({
161-
getBounds: () => ({ x: 100, y: 80, width: 1_000, height: 700 }),
162-
getContentBounds: () => ({ x: 100, y: 118, width: 1_000, height: 662 }),
163-
webContents,
164-
}),
165-
),
159+
main: Effect.succeedSome({
160+
getBounds: () => ({ x: 100, y: 80, width: 1_000, height: 700 }),
161+
getContentBounds: () => ({ x: 100, y: 118, width: 1_000, height: 662 }),
162+
webContents,
163+
}),
166164
} as ElectronWindow.ElectronWindow["Service"]),
167165
),
168166
Layer.succeed(
@@ -220,7 +218,7 @@ describe("window capture IPC", () => {
220218
Layer.succeed(
221219
ElectronWindow.ElectronWindow,
222220
ElectronWindow.ElectronWindow.of({
223-
main: Effect.succeed(Option.some({ webContents })),
221+
main: Effect.succeedSome({ webContents }),
224222
} as ElectronWindow.ElectronWindow["Service"]),
225223
),
226224
Layer.succeed(
@@ -256,7 +254,7 @@ describe("window capture IPC", () => {
256254
Effect.provideService(
257255
ElectronWindow.ElectronWindow,
258256
ElectronWindow.ElectronWindow.of({
259-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
257+
main: Effect.succeedSome({ webContents: { id: 7 } }),
260258
} as ElectronWindow.ElectronWindow["Service"]),
261259
),
262260
Effect.provideService(DesktopSnapShot.DesktopSnapShot, null as never),
@@ -277,7 +275,7 @@ describe("window capture IPC", () => {
277275
Effect.provide(
278276
Layer.mergeAll(
279277
Layer.succeed(ElectronWindow.ElectronWindow, {
280-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
278+
main: Effect.succeedSome({ webContents: { id: 7 } }),
281279
} as ElectronWindow.ElectronWindow["Service"]),
282280
Layer.succeed(DesktopSnapShot.DesktopSnapShot, {
283281
setup: (action: string) =>
@@ -295,7 +293,7 @@ describe("window capture IPC", () => {
295293
Layer.succeed(
296294
ElectronWindow.ElectronWindow,
297295
ElectronWindow.ElectronWindow.of({
298-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
296+
main: Effect.succeedSome({ webContents: { id: 7 } }),
299297
} as ElectronWindow.ElectronWindow["Service"]),
300298
),
301299
Layer.succeed(
@@ -320,7 +318,7 @@ describe("window capture IPC", () => {
320318
Layer.succeed(
321319
ElectronWindow.ElectronWindow,
322320
ElectronWindow.ElectronWindow.of({
323-
main: Effect.succeed(Option.some({ webContents: { id: 7 } })),
321+
main: Effect.succeedSome({ webContents: { id: 7 } }),
324322
} as ElectronWindow.ElectronWindow["Service"]),
325323
),
326324
Layer.succeed(

‎apps/desktop/src/ipc/methods/sshEnvironment.ts‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,11 @@ export const ensureSshEnvironment = DesktopIpc.makeIpcMethod({
137137
}) {
138138
const sshEnvironment = yield* DesktopSshEnvironment.DesktopSshEnvironment;
139139
return yield* sshEnvironment.ensureEnvironment(target, options).pipe(
140-
Effect.catch((error) =>
141-
DesktopSshEnvironment.isDesktopSshPasswordPromptCancellation(error)
142-
? Effect.succeed({
143-
type: DesktopSshPasswordPromptCancelledType,
144-
message: error.message,
145-
})
146-
: Effect.fail(error),
140+
Effect.catchIf(DesktopSshEnvironment.isDesktopSshPasswordPromptCancellation, (error) =>
141+
Effect.succeed({
142+
type: DesktopSshPasswordPromptCancelledType,
143+
message: error.message,
144+
}),
147145
),
148146
);
149147
}),

0 commit comments

Comments
 (0)