Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): visiting a thread no longer copies the whole thread into the event log #31849

Closedbowd(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/31849/headopened View on GitHub

Showing 7 changed files with 51 additions and 7 deletions (loading 4).

x
0 of 7 viewed, 7 left
5 additions and 5 deletionsapps/server/src/orchestration-v2/Orchestrator.tsModified
View file
@@ -3160,19 +3160,19 @@
command.searchQuery,
: null;
- // Viewing a thread changes read state only. Loading its transcript (or
- // bumping updatedAt) makes a routine read receipt scale with its history.
+ // Viewing a thread changes read state only. Loading its transcript, bumping
+ // updatedAt, or copying the whole thread into the event (its linked pull
+ // requests included) makes a routine read receipt scale with its history.
yield* emit(
events,
command,
- type: "thread.visited",
+ type: "thread.visit-recorded",
threadId: command.threadId,
providerInstanceId: thread.providerInstanceId,
occurredAt,
payload: {
- ...thread,
- ...(movesForward ? { lastVisitedAt: visitedAt.value } : {}),
+ lastVisitedAt: movesForward ? visitedAt.value : thread.lastVisitedAt,
...(opens ? { opens } : {}),
16 additions and 1 deletionapps/server/src/orchestration-v2/ProjectionStore.tsModified
View file
@@ -1,5 +1,5 @@
import type { ProjectThreadAwarenessV2Input } from "@t3tools/shared/agentAwareness";