Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: stabilize messages timeline virtualization #1664

Mergedjuliusmarmingemerged 11 commits intomain fromrefs/pull/1664/headmerged by juliusmarminge View on GitHub

Showing 9 changed files with 148 additions and 34 deletions (loading 7).

x
0 of 9 viewed, 9 left
116 additions and 0 deletionsapps/web/src/components/chat/ChangedFilesTree.test.tsxAdded
View file
@@ -0,0 +1,116 @@
+import { TurnId } from "@t3tools/contracts";
+import { renderToStaticMarkup } from "react-dom/server";
+import { describe, expect, it } from "vitest";
+​
+import { ChangedFilesTree } from "./ChangedFilesTree";
+​
+describe("ChangedFilesTree", () => {
+ it.each([
+ {
+ name: "a compacted single-chain directory",
+ files: [
+ { path: "apps/web/src/index.ts", additions: 2, deletions: 1 },
+ { path: "apps/web/src/main.ts", additions: 3, deletions: 0 },
+ ],
+ visibleLabels: ["apps/web/src"],
+ hiddenLabels: ["index.ts", "main.ts"],
+ },
+ {
+ name: "a branch point after a compacted prefix",
+ files: [
+ { path: "apps/server/src/git/Layers/GitCore.ts", additions: 4, deletions: 3 },
+ { path: "apps/server/src/provider/Layers/CodexAdapter.ts", additions: 7, deletions: 2 },
+ ],
+ visibleLabels: ["apps/server/src"],
+ hiddenLabels: ["git", "provider", "GitCore.ts", "CodexAdapter.ts"],
+ },
+ {
+ name: "mixed root files and nested compacted directories",
+ files: [
+ { path: "README.md", additions: 1, deletions: 0 },