Skip to content

Commit 5afe24e

Browse files
committed
test(server): address review comments on title mirror tests
1 parent 7e4413f commit 5afe24e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import { OrchestrationProjectionSnapshotQueryLive } from "./ProjectionSnapshotQu
4848
import * as ThreadBackgroundLiveness from "../ThreadBackgroundLiveness.ts";
4949
import * as ThreadPlanProgress from "../ThreadPlanProgress.ts";
5050
import { ProviderRuntimeIngestionLive } from "./ProviderRuntimeIngestion.ts";
51+
import { DEFAULT_THREAD_TITLE } from "../threadTitles.ts";
5152
import { OrchestrationEngineService } from "../Services/OrchestrationEngine.ts";
5253
import { ProviderRuntimeIngestionService } from "../Services/ProviderRuntimeIngestion.ts";
5354
import { ProjectionSnapshotQuery } from "../Services/ProjectionSnapshotQuery.ts";
@@ -2975,7 +2976,7 @@ describe("ProviderRuntimeIngestion", () => {
29752976
});
29762977

29772978
it("mirrors a provider title only while the thread still has the default title", async () => {
2978-
const harness = await createHarness({ threadTitle: "New thread" });
2979+
const harness = await createHarness({ threadTitle: DEFAULT_THREAD_TITLE });
29792980
const now = "2026-01-01T00:00:00.000Z";
29802981

29812982
harness.emit({

‎apps/server/src/provider/Layers/OpenCodeAdapter.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ function openCodeEventSessionTitle(event: OpenCodeSubscribedEvent): string | und
205205
// OpenCode mints a placeholder title at session.create when no title was
206206
// provided, and re-emits it on every `session.updated`. Mirroring it would
207207
// overwrite the thread's real title (openCodeEventSessionTitle feeds the
208-
// `thread.metadata.updated` mirror). Ignore it: a thread whose title is
209-
// still the default is titled by T3 Code instead.
208+
// `thread.metadata.updated` mirror). Ignore OpenCode's auto-generated
209+
// placeholders so the thread isn't locked onto them.
210210
if (!title || isOpenCodeDefaultTitle(title)) {
211211
return undefined;
212212
}

0 commit comments

Comments
 (0)