Git integration: branch picker + worktrees #3
Mergedjuliusmarmingemerged 32 commits into
main fromrefs/pull/3/headmerged by juliusmarminge View on GitHub- apps/desktop/src/main.ts line 333OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -252,0 +313,21 @@313+ .map((line) => line.trim())314+ .filter((line) => line.length > 0)315+ .map((line) => ({316+ name: line.replace(/^[*+]\s+/, ""),317+ current: line.startsWith("* "),318+ }))319+ .sort((a, b) => {320+ if (a.current !== b.current) return a.current ? -1 : 1;321+ const aDefault = defaultBranches.has(a.name);322+ const bDefault = defaultBranches.has(b.name);323+ if (aDefault !== bDefault) return aDefault ? -1 : 1;324+ return a.name.localeCompare(b.name);325+ });326+327+ return { branches, isRepo: true };328+}329+330+async function createGitWorktree(331+ input: GitCreateWorktreeInput,332+): Promise<GitCreateWorktreeResult> {333+ const sanitizedBranch = input.branch.replace(/\//g, "-");apps/desktop/src/main.ts line 359OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -252,0 +339,21 @@339+ const result = await runTerminalCommand({340+ command: `git worktree add '${worktreePath.replace(/'/g, "'\\''")}' '${input.branch.replace(/'/g, "'\\''")}'`,341+ cwd: input.cwd,342+ timeoutMs: 30_000,343+ });344+345+ if (result.code !== 0) {346+ throw new Error(result.stderr.trim() || "git worktree add failed");347+ }348+349+ return {350+ worktree: {351+ path: worktreePath,352+ branch: input.branch,353+ },354+ };355+}356+357+async function removeGitWorktree(input: GitRemoveWorktreeInput): Promise<void> {358+ const result = await runTerminalCommand({359+ command: `git worktree remove '${input.path.replace(/'/g, "'\\''")}'`,
- apps/renderer/src/components/ChatView.tsx line 162OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -154,4 +159,4 @@154159 try {155160 const session = await api.providers.startSession({156161 provider: "codex",157- cwd: activeProject.cwd || undefined,162+ cwd: activeThread.worktreePath ?? activeProject.cwd,
- apps/renderer/src/components/ChatView.tsx lines 437 to 471OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -416,7 +421,8 @@416421417422 const onSend = async (e: FormEvent) => {418423 e.preventDefault();419- if (!api || !activeThread || isSending || isConnecting) return;424+ if (!api || !activeThread || !activeProject || isSending || isConnecting)425+ return;420426 const trimmed = prompt.trim();421427 if (!trimmed) return;422428
- apps/server/src/git.ts line 45Outdated@@ -0,0 +25,21 @@25+ return { branches: [], isRepo: false };26+ }27+ throw new Error(stderr || "git branch failed");28+ }29+30+ // Resolve the real default branch from the remote31+ const defaultRef = await runTerminalCommand({32+ command: "git symbolic-ref refs/remotes/origin/HEAD",33+ cwd: input.cwd,34+ timeoutMs: 5_000,35+ });36+ const defaultBranch =37+ defaultRef.code === 0 ? defaultRef.stdout.trim().replace(/^refs\/remotes\/origin\//, "") : null;38+39+ const branches = result.stdout40+ .split("\n")41+ .map((line) => line.trim())42+ .filter((line) => line.length > 0)43+ .map((line) => ({44+ name: line.replace(/^[*+]\s+/, ""),45+ current: line.startsWith("* "),apps/server/src/git.ts line 45OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +25,21 @@25+ return { branches: [], isRepo: false };26+ }27+ throw new Error(stderr || "git branch failed");28+ }29+30+ // Resolve the real default branch from the remote31+ const defaultRef = await runTerminalCommand({32+ command: "git symbolic-ref refs/remotes/origin/HEAD",33+ cwd: input.cwd,34+ timeoutMs: 5_000,35+ });36+ const defaultBranch =37+ defaultRef.code === 0 ? defaultRef.stdout.trim().replace(/^refs\/remotes\/origin\//, "") : null;38+39+ const branches = result.stdout40+ .split("\n")41+ .map((line) => line.trim())42+ .filter((line) => line.length > 0)43+ .map((line) => ({44+ name: line.replace(/^[*+]\s+/, ""),45+ current: line.startsWith("* "),
- apps/desktop/src/terminal.ts line 37OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +17,21 @@17+ cwd: input.cwd,18+ env: process.env,19+ stdio: ["ignore", "pipe", "pipe"],20+ });21+22+ let stdout = "";23+ let stderr = "";24+ let timedOut = false;25+26+ const timeout = setTimeout(() => {27+ timedOut = true;28+ child.kill("SIGTERM");29+ setTimeout(() => {30+ if (!child.killed) {31+ child.kill("SIGKILL");32+ }33+ }, 1_000).unref();34+ }, input.timeoutMs ?? 30_000);35+36+ child.stdout?.on("data", (chunk: Buffer) => {37+ stdout += chunk.toString();
- apps/renderer/src/components/BranchToolbar.tsx line 150OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +130,21 @@130+ </svg>131+ </button>132+ {isBranchMenuOpen && (133+ <div className="absolute bottom-full right-0 z-20 mb-2 w-[280px] rounded-2xl border border-border bg-popover/95 p-2 shadow-[0_16px_40px_rgba(0,0,0,0.55)] backdrop-blur">134+ <p className="px-2 py-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/50">135+ Branch136+ </p>137+ <div className="max-h-64 overflow-y-auto">138+ {branches.map((b) => {139+ const isSelected = b.name === activeThread.branch;140+ return (141+ <button142+ key={b.name}143+ type="button"144+ className={`mb-0.5 flex w-full items-center justify-between gap-2 rounded-xl px-2 py-1.5 text-left font-mono text-xs transition-colors duration-150 ${145+ isSelected146+ ? "bg-accent text-foreground"147+ : "text-foreground/90 hover:bg-accent/50"148+ }`}149+ onClick={async () => {150+ if (api && activeProject) {
- @@ -0,0 +35,21 @@35+ cwd: input.cwd,36+ env: process.env,37+ stdio: ["ignore", "pipe", "pipe"],38+ });39+40+ let stdout = "";41+ let stderr = "";42+ let timedOut = false;43+44+ const timeout = setTimeout(() => {45+ timedOut = true;46+ child.kill("SIGTERM");47+ setTimeout(() => {48+ if (!child.killed) {49+ child.kill("SIGKILL");50+ }51+ }, 1_000).unref();52+ }, input.timeoutMs ?? 30_000);53+54+ child.stdout?.on("data", (chunk: Buffer) => {55+ stdout += chunk.toString();
- apps/server/src/git.ts line 151OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +131,21 @@131+ const result = await runTerminalCommand({132+ command: `git worktree add -b '${escapeSingleQuotes(input.newBranch)}' '${escapeSingleQuotes(worktreePath)}' '${escapeSingleQuotes(input.branch)}'`,133+ cwd: input.cwd,134+ timeoutMs: 30_000,135+ });136+137+ if (result.code !== 0) {138+ throw new Error(result.stderr.trim() || "git worktree add failed");139+ }140+141+ return {142+ worktree: {143+ path: worktreePath,144+ branch: input.newBranch,145+ },146+ };147+}148+149+export async function removeGitWorktree(input: GitRemoveWorktreeInput): Promise<void> {150+ const result = await runTerminalCommand({151+ command: `git worktree remove '${escapeSingleQuotes(input.path)}'`,
- @@ -18,7 +18,7 @@1818 "outputs": ["dist/**", "dist-electron/**"]1919 },2020 "dev": {21- "dependsOn": ["@t3tools/contracts#build"],21+ "dependsOn": ["^dev"],2222 "cache": false,23- "persistent": true23+ "persistent": false2424 },
- @@ -0,0 +79,21 @@79+**7. Full flow: worktree creation from selected branch**80+81+init → commit → create branch → create worktree → verify worktree dir exists and has correct branch82+83+**8. Full flow: thread switching simulation**84+85+init → commit → create branch-a, branch-b → checkout a → checkout b → checkout a → verify current matches86+87+**9. Full flow: checkout conflict**88+89+init → commit → create branch → modify file (unstaged) → checkout other branch → expect error90+91+## Verification92+93+```bash94+# Run the git integration tests95+cd apps/desktop && bun run test96+97+# Or just the git test file98+npx vitest run apps/desktop/src/git.test.ts99+```@@ -18,8 +18,7 @@1818 },1919 "devDependencies": {2020 "@types/node": "^22.10.2",21- "concurrently": "^9.1.2",2221 "electronmon": "^2.0.2",23- "tsup": "^8.3.5",22+ "tsdown": "^0.20.3",2423 "typescript": "^5.7.3",25- "vitest": "^3.0.0",24+ "vitest": "^4.0.0",apps/server/src/git.ts lines 173 to 221Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +163,21 @@163+ command: `git branch '${escapeSingleQuotes(input.branch)}'`,164+ cwd: input.cwd,165+ timeoutMs: 10_000,166+ });167+168+ if (result.code !== 0) {169+ throw new Error(result.stderr.trim() || "git branch create failed");170+ }171+}172+173+export async function checkoutGitBranch(input: GitCheckoutInput): Promise<void> {174+ const result = await runTerminalCommand({175+ command: `git checkout '${escapeSingleQuotes(input.branch)}'`,176+ cwd: input.cwd,177+ timeoutMs: 10_000,178+ });179+180+ if (result.code !== 0) {181+ throw new Error(result.stderr.trim() || "git checkout failed");182+ }183+}@@ -25,8 +25,8 @@2525 "@tailwindcss/vite": "^4.0.0",2626 "@types/react": "^19.0.0",2727 "@types/react-dom": "^19.0.0",28- "@vitejs/plugin-react": "^4.3.4",28+ "@vitejs/plugin-react": "^5.1.4",2929 "babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",3030 "tailwindcss": "^4.0.0",3131 "typescript": "^5.7.3",32- "vite": "^6.0.5"32+ "vite": "^8.0.0-beta.12"apps/web/src/components/BranchToolbar.tsx lines 61 to 73OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +53,21 @@53+ setIsLoadingBranches(false);54+ }55+ }, [activeThread, api, branchCwd, dispatch]);56+57+ useEffect(() => {58+ void loadBranches();59+ }, [loadBranches]);60+61+ // Keep thread branch synced to git current branch for local threads.62+ useEffect(() => {63+ if (!activeThread || activeThread.worktreePath) return;64+ const current = branches.find((branch) => branch.current);65+ if (!current) return;66+ if (current.name === activeThread.branch) return;67+ dispatch({68+ type: "SET_THREAD_BRANCH",69+ threadId: activeThread.id,70+ branch: current.name,71+ worktreePath: null,72+ });73+ }, [activeThread, branches, dispatch]);
- @@ -1,3 +1,13 @@1+import * as path from "node:path";12 import { defineConfig } from "vitest/config";233-export default defineConfig({});4+export default defineConfig({5+ resolve: {6+ alias: [7+ {8+ find: /^@t3tools\/contracts$/,9+ replacement: path.resolve(import.meta.dirname, "./packages/contracts/src/index.ts"),10+ },11+ ],12+ },13+});
- @@ -0,0 +171,21 @@171+ throw new Error(result.stderr.trim() || "git worktree add failed");172+ }173+174+ return {175+ worktree: {176+ path: worktreePath,177+ branch: input.newBranch,178+ },179+ };180+}181+182+export async function removeGitWorktree(input: GitRemoveWorktreeInput): Promise<void> {183+ const result = await runGit(["worktree", "remove", input.path], input.cwd, 15_000);184+185+ if (result.code !== 0) {186+ throw new Error(result.stderr.trim() || "git worktree remove failed");187+ }188+}189+190+export async function createGitBranch(input: GitCreateBranchInput): Promise<void> {191+ const result = await runGit(["branch", input.branch], input.cwd, 10_000);
- @@ -0,0 +38,21 @@38+39+ const branches = branchesQuery.data?.branches ?? [];40+ const isRepo = branchesQuery.data?.isRepo ?? false;41+42+ // ── Mutations ─────────────────────────────────────────────────────────43+44+ const checkoutMutation = useMutation({45+ mutationFn: (branch: string) => api!.git.checkout({ cwd: branchCwd!, branch }),46+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),47+ onError: (error) =>48+ setThreadError(error instanceof Error ? error.message : "Failed to checkout branch."),49+ });50+51+ const createBranchMutation = useMutation({52+ mutationFn: (branch: string) =>53+ api!.git54+ .createBranch({ cwd: branchCwd!, branch })55+ .then(() => api!.git.checkout({ cwd: branchCwd!, branch })),56+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),57+ onError: (error) =>58+ setThreadError(error instanceof Error ? error.message : "Failed to create branch."),@@ -0,0 +56,21 @@56+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),57+ onError: (error) =>58+ setThreadError(error instanceof Error ? error.message : "Failed to create branch."),59+ });60+61+ const initMutation = useMutation({62+ mutationFn: () => api!.git.init({ cwd: branchCwd! }),63+ onSuccess: () => {64+ setThreadError(null);65+ queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] });66+ },67+ onError: (error) =>68+ setThreadError(error instanceof Error ? error.message : "Failed to initialize git repo."),69+ });70+71+ // ── Effects ───────────────────────────────────────────────────────────72+73+ // Keep thread branch synced to git current branch for local threads.74+ const queryBranches = branchesQuery.data?.branches;75+ useEffect(() => {76+ if (!activeThreadId || activeWorktreePath) return;
- @@ -0,0 +3,21 @@3+ "extends": ["//"],4+ "tasks": {5+ "build": {6+ "dependsOn": ["^build"],7+ "outputs": ["dist-electron/**"],8+ },9+ "dev": {10+ "dependsOn": ["t3#build"],11+ "persistent": true,12+ },13+ "start": {14+ "dependsOn": ["build", "@t3tools/web#build", "t3#build"],15+ "cache": false,16+ "persistent": true,17+ },18+ "smoke-test": {19+ "dependsOn": ["build", "@t3tools/web#build", "t3#build"],20+ "cache": false,21+ "outputs": [],22+ },23+ },@@ -0,0 +1,10 @@1+{2+ "$schema": "https://turbo.build/schema.json",3+ "extends": ["//"],4+ "tasks": {5+ "start": {6+ "dependsOn": ["build"],7+ "cache": false,8+ "persistent": true,9+ },10+ },@@ -0,0 +1,8 @@1+{2+ "$schema": "https://turbo.build/schema.json",3+ "extends": ["//"],4+ "tasks": {5+ "dev": {6+ "persistent": true,7+ },8+ },
- @@ -0,0 +39,21 @@39+ const branches = branchesQuery.data?.branches ?? [];40+ const isRepo = branchesQuery.data?.isRepo ?? false;41+42+ // ── Mutations ─────────────────────────────────────────────────────────43+44+ const checkoutMutation = useMutation({45+ mutationFn: (branch: string) => api!.git.checkout({ cwd: branchCwd!, branch }),46+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),47+ onError: (error) =>48+ setThreadError(error instanceof Error ? error.message : "Failed to checkout branch."),49+ });50+51+ const createBranchMutation = useMutation({52+ mutationFn: (branch: string) =>53+ api!.git54+ .createBranch({ cwd: branchCwd!, branch })55+ .then(() => api!.git.checkout({ cwd: branchCwd!, branch })),56+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),57+ onError: (error) =>58+ setThreadError(error instanceof Error ? error.message : "Failed to create branch."),59+ });@@ -2,3 +2,4 @@22 import react from "@vitejs/plugin-react";33 import { defineConfig } from "vite";445+const port = Number(process.env.PORT ?? 5173);
juliusmarminge merged this16b81f7
juliusmarminge closed this
- @@ -304,3 +312,20 @@304312 return undefined;305313 }306314315+ case WS_METHODS.gitListBranches:316+ return listGitBranches(request.params as never);317+318+ case WS_METHODS.gitCreateWorktree:319+ return createGitWorktree(request.params as never);320+321+ case WS_METHODS.gitRemoveWorktree:322+ return removeGitWorktree(request.params as never);323+324+ case WS_METHODS.gitCreateBranch:325+ return createGitBranch(request.params as never);326+327+ case WS_METHODS.gitCheckout:328+ return checkoutGitBranch(request.params as never);329+330+ case WS_METHODS.gitInit:331+ return initGitRepo(request.params as never);@@ -0,0 +159,21 @@159+ current: line.startsWith("* "),160+ isDefault: name === defaultBranch,161+ worktreePath: worktreeMap.get(name) ?? null,162+ };163+ })164+ .toSorted((a, b) => {165+ if (a.current !== b.current) return a.current ? -1 : 1;166+ if (a.isDefault !== b.isDefault) return a.isDefault ? -1 : 1;167+ return a.name.localeCompare(b.name);168+ });169+170+ return { branches, isRepo: true };171+}172+173+export async function createGitWorktree(174+ input: GitCreateWorktreeInput,175+): Promise<GitCreateWorktreeResult> {176+ const sanitizedBranch = input.newBranch.replace(/\//g, "-");177+ const repoName = path.basename(input.cwd);178+ const worktreePath =179+ input.path ?? path.join(os.homedir(), ".t3", "worktrees", repoName, sanitizedBranch);@@ -0,0 +37,21 @@37+ }, 1_000).unref();38+ }, timeoutMs);39+40+ child.stdout?.on("data", (chunk: Buffer) => {41+ stdout += chunk.toString();42+ });43+ child.stderr?.on("data", (chunk: Buffer) => {44+ stderr += chunk.toString();45+ });46+ child.on("error", (error) => {47+ clearTimeout(timeout);48+ reject(error);49+ });50+ child.on("close", (code, signal) => {51+ clearTimeout(timeout);52+ resolve({ stdout, stderr, code: code ?? null, signal: signal ?? null, timedOut });53+ });54+ });55+}56+57+export async function runTerminalCommand(@@ -0,0 +22,21 @@22+ const branchMenuRef = useRef<HTMLDivElement>(null);23+24+ const activeThread = state.threads.find((thread) => thread.id === state.activeThreadId);25+ const activeProject = state.projects.find((project) => project.id === activeThread?.projectId);26+ const activeThreadId = activeThread?.id;27+ const activeThreadBranch = activeThread?.branch ?? null;28+ const activeWorktreePath = activeThread?.worktreePath ?? null;29+ const branchCwd = activeWorktreePath ?? activeProject?.cwd;30+31+ // ── Queries ───────────────────────────────────────────────────────────32+33+ const branchesQuery = useQuery({34+ queryKey: ["git", "branches", branchCwd],35+ queryFn: () => api!.git.listBranches({ cwd: branchCwd! }),36+ enabled: !!api && !!branchCwd,37+ });38+39+ const branches = branchesQuery.data?.branches ?? [];40+ // Default to true while loading — showing "Initialize git" during a fetch is wrong,41+ // and worktrees are inherently git repos.42+ const isRepo = branchesQuery.data?.isRepo ?? !branchesQuery.isLoading;@@ -0,0 +44,21 @@44+ // ── Mutations ─────────────────────────────────────────────────────────45+46+ const checkoutMutation = useMutation({47+ mutationFn: (branch: string) => api!.git.checkout({ cwd: branchCwd!, branch }),48+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),49+ onError: (error) =>50+ setThreadError(error instanceof Error ? error.message : "Failed to checkout branch."),51+ });52+53+ const createBranchMutation = useMutation({54+ mutationFn: (branch: string) =>55+ api!.git56+ .createBranch({ cwd: branchCwd!, branch })57+ .then(() => api!.git.checkout({ cwd: branchCwd!, branch })),58+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ["git", "branches", branchCwd] }),59+ onError: (error) =>60+ setThreadError(error instanceof Error ? error.message : "Failed to create branch."),61+ });62+63+ const initMutation = useMutation({64+ mutationFn: () => api!.git.init({ cwd: branchCwd! }),@@ -448,0 +450,21 @@450+ const result = await api.git.createWorktree({451+ cwd: activeProject.cwd,452+ branch: activeThread.branch,453+ newBranch,454+ });455+ sessionCwd = result.worktree.path;456+ dispatch({457+ type: "SET_THREAD_BRANCH",458+ threadId: activeThread.id,459+ branch: result.worktree.branch,460+ worktreePath: result.worktree.path,461+ });462+ } catch (err) {463+ dispatch({464+ type: "SET_ERROR",465+ threadId: activeThread.id,466+ error: err instanceof Error ? err.message : "Failed to create worktree",467+ });468+ return;469+ }470+ }@@ -446,3 +435,15 @@446435 if (!api || !activeThread || isSending || isConnecting) return;447436 const trimmed = prompt.trim();448437 if (!trimmed) return;438+ if (!activeProject) return;439+440+ // On first message: lock in branch + create worktree if needed.441+ let sessionCwd: string | undefined;442+ if (443+ activeThread.messages.length === 0 &&444+ activeThread.branch &&445+ envMode === "worktree" &&446+ !activeThread.worktreePath447+ ) {448+ try {449+ const newBranch = `codething/${crypto.randomUUID().slice(0, 8)}`;
Sign in to join this conversation.
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
Walkthrough#
Adds end-to-end Git integration: new contracts and WS API, server & desktop git utilities, renderer IPC and React Query wiring, per-thread branch/worktree state and persistence, BranchToolbar UI, ChatView worktree creation on first message, tests, and build/tooling/script updates.
Changes#
packages/contracts/src/git.ts,packages/contracts/src/ipc.ts,packages/contracts/src/ws.ts,packages/contracts/src/index.tsNativeApi.gitwith listBranches/createWorktree/removeWorktree/createBranch/checkout/init; re-exported git.apps/server/src/git.ts,apps/server/src/wsServer.ts,apps/server/src/git.test.ts,apps/server/src/wsServer.test.tsapps/desktop/src/git.ts,apps/desktop/src/git.test.ts,apps/desktop/src/main.ts,apps/desktop/src/preload.tsapps/web/src/wsNativeApi.ts,apps/desktop/src/preload.tsgit.*methods that route to WS / preload IPC.apps/web/src/components/BranchToolbar.tsx,apps/web/src/components/ChatView.tsx,apps/web/src/components/Sidebar.tsx,apps/web/src/App.tsxapps/web/src/types.ts,apps/web/src/store.ts,apps/web/src/persistenceSchema.ts,apps/web/src/persistenceSchema.test.ts,apps/web/src/store.test.tsThreadwithbranchandworktreePath; addedSET_THREAD_BRANCHaction and reducer handling (clears session when worktreePath changes); persistence schema migrated to include nullable/optional fields; tests updated.apps/web/src/App.tsx,apps/web/package.json@tanstack/react-querydependency, created QueryClient and wrapped app inQueryClientProvider; thread creation payload extended with new fields..plans/*,apps/desktop/src/git.test.ts,apps/server/src/git.test.ts,apps/web/src/git-flows.test.tsapps/*/tsdown.config.ts, removedtsup.config.ts,package.json,apps/*/package.json,*.turbo.jsonc,vitest.config.tsREADME.md,AGENTS.md, variousapps/web/*,apps/server/*,packages/contracts/*Sequence Diagram#
Estimated code review effort#
🎯 4 (Complex) | ⏱️ ~60 minutes
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
#7.✅ Passed checks (3 passed)
#7: threads associated with local Git branches (current, existing, new), Git worktree-based workspaces, and worktree reuse patterns. Multiple-threads-per-worktree and 'best of N' selection noted as out-of-scope.✨ Finishing touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.