Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): update fff to stop runaway watcher rescans #14543

Mergedrealhasanshoaib(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/14543/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 8 changed files with 89 additions and 1 deletion (loading 4).

x
0 of 8 viewed, 8 left
36 additions and 0 deletionsapps/server/src/workspace/WorkspaceEntries.test.tsModified
View file
@@ -192,6 +192,42 @@
60_000,
​
+ it.effect("includes images and other binary files in non-git workspace indexes", () =>
+ Effect.gen(function* () {
+ const cwd = yield* makeTempDir();
+ const imagePaths = ["photo.png", "photo.jpg", "photo.jpeg"];
+ const binaryPaths = [...imagePaths, "document.pdf", "archive.zip", "data.bin"];
+ for (const filePath of binaryPaths) {
+ yield* writeTextFile(cwd, filePath, "\0binary contents\n");
+ }
+ yield* writeTextFile(cwd, "notes.txt", "plain text\n");
+​
+ const workspaceEntries = yield* WorkspaceEntries.WorkspaceEntries;
+ const expectedPaths = [...binaryPaths, "notes.txt"].toSorted();
+ const listed = yield* workspaceEntries.list({ cwd });
+ expect(listed.entries.map((entry) => entry.path).toSorted()).toEqual(expectedPaths);
+ expect(listed.truncated).toBe(false);
+​
+ const searched = yield* workspaceEntries.search({
+ cwd,
+ query: "",
+ limit: 100,
+ kind: "file",
+ });
+ expect(searched.entries.map((entry) => entry.path).toSorted()).toEqual(expectedPaths);
+ expect(searched.truncated).toBe(false);
+​
+ const images = yield* workspaceEntries.search({