Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(client): yield history validation and reuse prepended rows #21549

Closedjuliusmarmingewants to merge 4 commits intomain fromtakeover/history-frame-decodeopened View on GitHub

Showing 6 changed files with 187 additions and 20 deletions (loading 3).

x
0 of 6 viewed, 6 left
131 additions and 0 deletionsapps/web/src/session-logic.test.tsModified
View file
@@ -17,6 +17,7 @@
type OrchestrationV2RunAttempt,
type OrchestrationV2TurnItem,
} from "@t3tools/contracts";
+import { mergeOlderHistoryIntoProjection } from "@t3tools/client-runtime/state/threads";
import type { ThreadRuntimeSummary } from "@t3tools/client-runtime/state/shell";
import { deriveMessagesTimelineRows } from "./components/chat/MessagesTimeline.logic";
import * as DateTime from "effect/DateTime";
@@ -1405,6 +1406,136 @@
describe("incremental v2 timeline entries", () => {
+ it("reuses history presentation after a prepend while refreshing sources and previews", () => {
+ const fixture = makeStreamingTimelineFixture("Partial");
+ const attempt: OrchestrationV2RunAttempt = {
+ id: RunAttemptId.make("live-attempt"),
+ runId: fixture.runId,
+ attemptOrdinal: 1,
+ rootNodeId: NodeId.make("live-root"),
+ providerInstanceId: ProviderInstanceId.make("codex"),
+ providerThreadId: ProviderThreadId.make("live-provider-thread"),
+ providerTurnId: null,
+ reason: "initial",
+ status: "running",
+ startedAt: DateTime.makeUnsafe(fixture.time(5)),
+ completedAt: null,
+ };
+ const attachment = {
+ type: "image" as const,