Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: keep worktree setup visible after leaving and reopening the thread #11836

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/11836/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 4 changed files with 106 additions and 11 deletions (loading 1).

x
0 of 4 viewed, 4 left
42 additions and 9 deletionsapps/server/src/server.test.tsModified
View file
@@ -10836,17 +10836,30 @@
- assert.equal(response.sequence, 5);
+ assert.equal(response.sequence, 6);
assert.deepEqual(
dispatchedCommands.map((command) => command.type),
"thread.create",
+ "thread.session.set",
"thread.meta.update",
"thread.activity.append",
"thread.activity.append",
"thread.turn.start",
+ // The checkout can take minutes, so the thread reads as working from
+ // the moment setup starts rather than only once the turn is dispatched.
+ const preparingCommand = dispatchedCommands[1];
+ assertTrue(preparingCommand?.type === "thread.session.set");
+ if (preparingCommand?.type === "thread.session.set") {
+ assert.equal(preparingCommand.session.status, "starting");
+ assert.equal(preparingCommand.session.activeTurnId, null);
+ assert.equal(
+ preparingCommand.session.providerInstanceId,
+ defaultModelSelection.instanceId,
+ );
assert.deepEqual(createWorktree.mock.calls[0]?.[0], {