Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): report scheduled worktree preparation failures #19774

Closedrealhasanshoaib(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/19774/headopened View on GitHub

Showing 6 changed files with 92 additions and 8 deletions (loading 3).

x
0 of 6 viewed, 6 left
36 additions and 0 deletionsapps/server/src/mcp/toolkits/project/handlers.test.tsModified
View file
@@ -504,3 +504,39 @@
expect(launched).toHaveLength(1);
}),
+​
+it.effect("a non-Git worktree refusal points the caller to the project folder", () =>
+ Effect.gen(function* () {
+ const launched: Array<ThreadLaunch.ThreadLaunchInput> = [];
+ const { projectId, dependencies } = clientLaunchHarness({
+ runtimeModeCeiling: "auto",
+ launched,
+ checkWorktreeBase: ({ projectId }) =>
+ Effect.fail(
+ new ThreadLaunch.ThreadLaunchNotRepositoryError({
+ projectId,
+ projectTitle: "Plain folder",
+ workspaceRoot: "/plain",
+ }),
+ ),
+ });
+ const toolkit = yield* ProjectToolkit.pipe(
+ Effect.provide(
+ McpToolAccess.HandlersLayer.layer(ProjectHandlers.layer).pipe(Layer.provide(dependencies)),
+ ),
+ );
+ const replies = yield* toolkit
+ .handle("t3_thread_launch", {
+ title: "Fix",
+ projectId,
+ workspaceStrategy: { type: "worktree", baseRef: "main" },