Skip to content

Commit 82a0874

Browse files
test(server): keep only the regressions for small thread-read defaults
AI-assisted; verified with the tests and tools listed above.
1 parent f378b2a commit 82a0874

2 files changed

Lines changed: 0 additions & 51 deletions

File tree

‎apps/server/src/mcp/OrchestratorMcpService.activity.test.ts‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -370,33 +370,7 @@ it("readThread pages cut-off text without splitting an emoji across pages", asyn
370370
nextTextOffset: 500,
371371
});
372372
expect(first.items).toHaveLength(10);
373-
const rest = yield* service.readThread(makeScope(), {
374-
threadId: parentThreadId,
375-
view: "activity",
376-
itemId: first.items[1]!.itemId,
377-
textOffset: first.items[1]!.nextTextOffset!,
378-
});
379-
expect(rest.items[0]).toMatchObject({
380-
text: "x".repeat(100),
381-
textTruncated: false,
382-
nextTextOffset: null,
383-
});
384373
expect(first).toMatchObject({ nextPosition: 9, hasMore: true });
385-
const next = yield* service.readThread(makeScope(), {
386-
threadId: parentThreadId,
387-
view: "activity",
388-
afterPosition: first.nextPosition!,
389-
});
390-
expect(next.items.map((item) => item.position)).toEqual([10, 11]);
391-
expect(next.hasMore).toBe(false);
392-
const expanded = yield* service.readThread(makeScope(), {
393-
threadId: parentThreadId,
394-
view: "activity",
395-
limit: 12,
396-
maxCharsPerItem: 600,
397-
});
398-
expect(expanded.items).toHaveLength(12);
399-
expect(expanded.items[1]).toMatchObject({ text: "x".repeat(600), textTruncated: false });
400374
}).pipe(Effect.provide(layer), Effect.runPromise);
401375
});
402376

‎apps/server/src/mcp/OrchestratorMcpService.test.ts‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,7 +3958,6 @@ describe("OrchestratorMcpService thread list", () => {
39583958
shell("thread:a-snoozed", "project:a", true),
39593959
shell("thread:a-awake", "project:a", false),
39603960
shell("thread:b-snoozed", "project:b", true),
3961-
...Array.from({ length: 12 }, (_, index) => shell(`thread:c-${index}`, "project:c", false)),
39623961
{
39633962
...shell("thread:a-awaiting-command", "project:a", false),
39643963
activityRunStatus: null,
@@ -4062,30 +4061,6 @@ describe("OrchestratorMcpService thread list", () => {
40624061
assert.include(error.message, "allProjects");
40634062
}).pipe(Effect.provide(service)),
40644063
);
4065-
it.effect("pages thread lists by default and honors an explicit larger limit", () =>
4066-
Effect.gen(function* () {
4067-
const mcp = yield* OrchestratorMcpService.OrchestratorMcpService;
4068-
const first = yield* mcp.listThreads(client, { projectId: ProjectId.make("project:c") });
4069-
assert.equal(first.threads.length, 10);
4070-
assert.equal(first.nextCursor, 10);
4071-
assert.equal(first.total, 12);
4072-
const next = yield* mcp.listThreads(client, {
4073-
projectId: ProjectId.make("project:c"),
4074-
cursor: first.nextCursor!,
4075-
});
4076-
assert.deepStrictEqual(
4077-
next.threads.map((thread) => thread.threadId),
4078-
["thread:c-10", "thread:c-11"],
4079-
);
4080-
assert.equal(next.nextCursor, null);
4081-
const expanded = yield* mcp.listThreads(client, {
4082-
projectId: ProjectId.make("project:c"),
4083-
limit: 12,
4084-
});
4085-
assert.equal(expanded.threads.length, 12);
4086-
assert.equal(expanded.nextCursor, null);
4087-
}).pipe(Effect.provide(service)),
4088-
);
40894064
});
40904065

40914066
describe("OrchestratorMcpService thread stop", () => {

0 commit comments

Comments
 (0)