Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): stop crashing the native React Compiler on ChatView #20340

Mergedjuliusmarmingemerged 1 commit intochatview-split/send-phases fromrefs/pull/20340/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 53 additions and 20 deletions.

x
0 of 3 viewed, 3 left
27 additions and 0 deletionsapps/web/src/components/ChatView.logic.test.tsModified
View file
@@ -1,5 +1,6 @@
import {
findRecordedWorktreeSetup,
+ isThreadWokeUnseen,
mergeDirectPreviewAnnotation,
resolveVisibleWorktreeSetup,
} from "./ChatView.logic";
@@ -2234,3 +2235,29 @@
expect(result.previewAnnotations).toBe(existing);
+​
+describe("isThreadWokeUnseen", () => {
+ const base = {
+ wokeAt: "2026-10-16T10:00:00.000Z",
+ settled: false,
+ lastVisitedAt: null,
+ latestRunCompletedAt: null,
+ };
+​
+ it("shows a wake the user has not seen", () => {
+ expect(isThreadWokeUnseen({ ...base, lastVisitedAt: "2026-10-16T09:00:00.000Z" })).toBe(true);
+ expect(isThreadWokeUnseen(base)).toBe(true);
+ });
+​
+ it("hides a wake seen by a later visit or a later completed run", () => {
+ expect(isThreadWokeUnseen({ ...base, lastVisitedAt: "2026-10-16T11:00:00.000Z" })).toBe(false);
+ expect(isThreadWokeUnseen({ ...base, latestRunCompletedAt: "2026-10-16T11:00:00.000Z" })).toBe(
+ false,
+ );