Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): mark unvisited thread completions unread #15607

Mergedmaria-rcksmerged 9 commits intomain fromrefs/pull/15607/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 84 additions and 0 deletions (loading 1).

x
0 of 4 viewed, 4 left
1 addition and 0 deletionsapps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.test.tsModified
View file
@@ -316,6 +316,7 @@
});
const projection = yield* projections.getThreadProjection(threadId);
assert.equal(projection.thread.title, "Renamed after shell import");
+ assert.isNull(projection.thread.lastVisitedAt);
assert.equal(projection.thread.runtimeMode, "approval-required");
assert.equal(projection.thread.interactionMode, "plan");
assert.deepEqual(projection.thread.archivedAt, renamedAt);
62 additions and 0 deletionsapps/server/src/orchestration-v2/Orchestrator.control-reads.test.tsModified
View file
@@ -54,6 +54,68 @@
),
);
​
+it.effect("marks a never-visited thread's first completion unread", () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ const projections = yield* ProjectionStore.ProjectionStoreV2;
+ const threadId = ThreadId.make("thread:completion-watermark");
+ yield* orchestrator.dispatch({
+ type: "thread.create",
+ commandId: CommandId.make("create-completion-watermark"),
+ threadId,
+ projectId: ProjectId.make("project:completion-watermark"),
+ title: "Background task",
+ modelSelection,
+ runtimeMode: "full-access",
+ interactionMode: "default",