Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): browse clone destinations on another machine #45266

OpenImBIOS(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/45266/headopened View on GitHub

Showing 13 changed files with 50 additions and 0 deletions (loading 12).

x
0 of 13 viewed, 13 left
50 additions and 0 deletionsapps/web/src/components/AddProjectToMachineDialog.browser.test.tsxModified
View file
@@ -78,6 +78,28 @@
projectEnvironment: { ...actual.projectEnvironment, listIgnoredFiles: () => listing },
};
});
+vi.mock(import("../state/filesystem"), async (original) => {
+ const { AsyncResult, Atom } = await import("effect/reactivity");
+ const actual = await original();
+ const home = Atom.make(
+ AsyncResult.success({
+ parentPath: "/remote/home",
+ entries: [{ name: "Work", fullPath: "/remote/home/Work" }],
+ }),
+ );
+ const work = Atom.make(AsyncResult.success({ parentPath: "/remote/home/Work", entries: [] }));
+ return {
+ ...actual,
+ useFilesystemReadAccess: () => ({ canReadFiles: true, isPending: false, error: null }),
+ filesystemEnvironment: {
+ ...actual.filesystemEnvironment,
+ browse: ({ environmentId, input }) => {
+ if (environmentId !== "environment-2") throw new Error("Expected the target environment");
+ return input.partialPath === "~/" ? home : work;
+ },
+ },
+ };
+});
vi.mock(import("../hooks/useHandleNewThread"), async (original) => ({
...(await original()),
useNewThreadHandler: (() => () => undefined) as never,