Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): reduce editor scan work and retain partial results #11071

ClosedCodeZeno(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/11071/headopened View on GitHub

Showing 4 changed files with 80 additions and 11 deletions (loading 2).

x
0 of 4 viewed, 4 left
58 additions and 0 deletionsapps/server/src/process/externalLauncher.test.tsModified
View file
@@ -929,6 +929,7 @@
Layer.provide(
Layer.mergeAll(
FileSystem.layerNoop({
+ readDirectory: () => Effect.succeed(["code.CMD"]),
stat: () =>
Effect.sync(() => {
statCalls += 1;
@@ -994,6 +995,7 @@
Layer.provide(
Layer.mergeAll(
FileSystem.layerNoop({
+ readDirectory: () => Effect.succeed(["code.CMD"]),
// The first scan parks inside `stat` so the interrupt lands while
// discovery is in flight, which is what a client disconnecting
// mid-connect does to the shared effect.
@@ -1046,6 +1048,62 @@
+it.effect("returns and caches completed editor probes when a later probe times out", () => {
+ const probes: string[] = [];
+ let stalledProbeStopped = false;
+ const launcherLayer = ExternalLauncher.layer.pipe(
+ Layer.provide(
+ Layer.mergeAll(
+ FileSystem.layerNoop({
+ readDirectory: () => Effect.succeed(["cursor.EXE", "trae.EXE", "explorer.EXE"]),