Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): No project threads no longer offer Initialize Git, and linked PRs show without git #27645

Closedjuliusmarmingewants to merge 7 commits intomain fromrefs/pull/27645/headopened View on GitHub

Showing 5 changed files with 195 additions and 0 deletions (loading 4).

x
0 of 5 viewed, 5 left
195 additions and 0 deletionsapps/web/src/components/chat/ThreadDetailsPanel.browser.test.tsxAdded
View file
@@ -0,0 +1,195 @@
+import {
+ EnvironmentId,
+ ProjectId,
+ ThreadId,
+ type ScopedThreadRef,
+ type ThreadPullRequestLink,
+} from "@t3tools/contracts";
+import { AsyncResult, Atom } from "effect/reactivity";
+import { expect, it, vi } from "vite-plus/test";
+import { page } from "vite-plus/test/browser";
+​
+const SCRATCH_ROOT = "/home/user/.t3/scratch";
+​
+const state = vi.hoisted(() => ({
+ workspaceRoot: "",
+ folder: "",
+ pullRequests: [] as unknown[],
+}));
+​
+vi.mock(import("~/state/entities"), async (importOriginal) => ({
+ ...(await importOriginal()),
+ useProject: ((ref: unknown) =>
+ ref === null
+ ? null
+ : {
+ id: "project",
+ environmentId: "environment",
+ title: state.workspaceRoot === SCRATCH_ROOT ? "No project" : "plain",
+ workspaceRoot: state.workspaceRoot,
+ scripts: [],