Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): stop reading a thread's whole activity timeline per event #6613

Closedpatroza(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/6613/headopened View on GitHub

Showing 5 changed files with 139 additions and 1 deletion (loading 3).

x
0 of 5 viewed, 5 left
119 additions and 0 deletionsapps/server/src/orchestration/Layers/ProjectionPipeline.test.tsModified
View file
@@ -2086,6 +2086,125 @@
+ it.effect("counts an unresolved user-input request on the thread shell", () =>
+ Effect.gen(function* () {
+ const projectionPipeline = yield* OrchestrationProjectionPipeline;
+ const eventStore = yield* OrchestrationEventStore;
+ const sql = yield* SqlClient.SqlClient;
+ const appendAndProject = (event: Parameters<typeof eventStore.append>[0]) =>
+ eventStore
+ .append(event)
+ .pipe(Effect.flatMap((savedEvent) => projectionPipeline.projectEvent(savedEvent)));
+​
+ yield* appendAndProject({
+ type: "project.created",
+ eventId: EventId.make("evt-open-user-input-1"),
+ aggregateKind: "project",
+ aggregateId: ProjectId.make("project-open-user-input"),
+ occurredAt: "2026-02-26T13:00:00.000Z",
+ commandId: CommandId.make("cmd-open-user-input-1"),
+ causationEventId: null,
+ correlationId: CorrelationId.make("cmd-open-user-input-1"),
+ metadata: {},
+ payload: {
+ projectId: ProjectId.make("project-open-user-input"),
+ title: "Project Open User Input",
+ workspaceRoot: "/tmp/project-open-user-input",
+ defaultModelSelection: null,
+ scripts: [],