Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): auto-reconcile external agent sessions on project open #10386

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

Showing 3 changed files with 170 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
170 additions and 0 deletionsapps/web/src/hooks/useAgentSessionAutoReconcile.test.tsAdded
View file
@@ -0,0 +1,170 @@
+import { describe, expect, it } from "vite-plus/test";
+import type { EnvironmentId, ProjectId } from "@t3tools/contracts";
+import type { EnvironmentProject } from "@t3tools/client-runtime/state/models";
+import * as Cause from "effect/Cause";
+import { AsyncResult } from "effect/unstable/reactivity";
+import { RpcClientError } from "effect/unstable/rpc";
+​
+import {
+ classifyImportFailure,
+ isDefinitiveOutcome,
+ projectReconcileKey,
+ selectUnreconciledProjects,
+} from "./useAgentSessionAutoReconcile";
+​
+function makeProject(
+ environmentId: string,
+ projectId: string,
+ workspaceRoot = `/home/user/${projectId}`,
+): EnvironmentProject {
+ return {
+ environmentId: environmentId as EnvironmentId,
+ id: projectId as ProjectId,
+ title: projectId,
+ workspaceRoot,
+ defaultModelSelection: null,
+ scripts: [],
+ createdAt: "2026-01-01T00:00:00.000Z",
+ updatedAt: "2026-01-01T00:00:00.000Z",
+ } as EnvironmentProject;
+}