GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): empty MCP status filters no longer hide threads · pingdotgg/t3code@270b898

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/mcp
    • OrchestratorMcpService.ts
    • toolkits
      • core.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: apps/server/src/mcp/OrchestratorMcpService.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2691,7 +2691,11 @@ const make = Effect.gen(function* () {
26912691
),
26922692
);
26932693
const nowMs = yield* Clock.currentTimeMillis;
2694-
const statuses = input.statuses === undefined ? null : new Set(input.statuses);
2694+
// An empty list is no filter: clients that fill every optional field send `[]`.
2695+
const statuses =
2696+
input.statuses === undefined || input.statuses.length === 0
2697+
? null
2698+
: new Set(input.statuses);
26952699
const titleContains = input.titleContains?.toLocaleLowerCase();
26962700
const filtered = projectThreads
26972701
.filter(
Collapse file

‎apps/server/src/mcp/toolkits/core.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/mcp/toolkits/core.test.ts
+49Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,3 +888,52 @@ it.effect("only the caller that prepared a pending upload can discard it", () =>
888888
),
889889
),
890890
);
891+
892+
it.effect(
893+
"t3_thread_list settled:false with an empty statuses list lists the unsettled threads",
894+
() => {
895+
const unsettled = McpToolAccessTestkit.liveThreadShell(ThreadId.make("unsettled-thread"));
896+
const settled = {
897+
...McpToolAccessTestkit.liveThreadShell(ThreadId.make("settled-thread")),
898+
settledOverride: "settled",
899+
} as const;
900+
return Effect.gen(function* () {
901+
const server = yield* McpServer.McpServer;
902+
const result = yield* server
903+
.callTool({
904+
name: "t3_thread_list",
905+
arguments: { projectId: unsettled.projectId, settled: false, statuses: [] },
906+
})
907+
.pipe(
908+
Effect.provideService(
909+
McpInvocationContext.McpInvocationContext,
910+
clientScope("full-access"),
911+
),
912+
Effect.provideService(McpSchema.McpServerClient, client),
913+
);
914+
expect(result.isError).toBe(false);
915+
expect(result.structuredContent).toMatchObject({
916+
threads: [{ threadId: unsettled.id, settled: false }],
917+
total: 1,
918+
});
919+
}).pipe(
920+
Effect.provide(
921+
layerOrchestratorToolkit.pipe(
922+
Layer.provideMerge(McpServer.McpServer.layer),
923+
Layer.provide(NodeCrypto.layer),
924+
Layer.provide(
925+
Layer.mock(ThreadManagement.ThreadManagementService)({
926+
listProjectThreads: () => Effect.succeed([unsettled, settled]),
927+
}),
928+
),
929+
Layer.provide(ServerSettings.layerTest()),
930+
Layer.provide(Layer.mock(ProviderRegistry.ProviderRegistry)({})),
931+
Layer.provide(Layer.mock(ProviderAdapterRegistry.ProviderAdapterRegistryV2)({})),
932+
Layer.provide(Layer.mock(ScheduledTaskService.ScheduledTaskService)({})),
933+
Layer.provide(Layer.mock(ProjectService.ProjectService)({})),
934+
Layer.provide(Layer.mock(SecretRequests.SecretRequests)({})),
935+
),
936+
),
937+
);
938+
},
939+
);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.