@devries-cameron20 / t3code Mirror · read-only / commits / 82b76e2138
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 19:00 UTC

fix(server): use a Cursor todo's title when its content is blank (#5073)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Arham Amin committed Aug 4, 2026 at 18:49 UTC 82b76e2138db7fcf8f8c1613184dc94777b2196e
2 files changed +23 -1
apps/server/src/provider/acp/CursorAcpExtension.test.ts
+19
@@ -107,6 +107,25 @@ describe("CursorAcpExtension", () => {
107 });
108 });
109
110 + it("falls back to the title when content is present but blank", () => {
111 + expect(
112 + extractTodosAsPlan({
113 + toolCallId: "todos-2",
114 + todos: [
115 + { id: "1", content: "", title: "Titled step", status: "pending" },
116 + { id: "2", content: " ", title: "Whitespace content", status: "in_progress" },
117 + { id: "3", content: "", title: "", status: "pending" },
118 + ],
119 + merge: true,
120 + }),
121 + ).toEqual({
122 + plan: [
123 + { step: "Titled step", status: "pending" },
124 + { step: "Whitespace content", status: "inProgress" },
125 + ],
126 + });
127 + });
128 +
129 it("decodes Cursor list_available_models responses with per-model config options", () => {
130 const decoded = CursorListAvailableModelsResponse.make({
131 models: [
apps/server/src/provider/acp/CursorAcpExtension.ts
+4 -1
@@ -94,7 +94,10 @@ export function extractTodosAsPlan(params: typeof CursorUpdateTodosRequest.Type)
94 }>;
95 } {
96 const plan = params.todos.flatMap((todo) => {
97 - const step = todo.content?.trim() ?? todo.title?.trim() ?? "";
97 + // Fall back to the title when content is missing OR blank. `??` only
98 + // covers a missing content, so a present-but-empty content ("" or
99 + // whitespace) would shadow a real title and drop the step below.
100 + const step = todo.content?.trim() || todo.title?.trim() || "";
101 if (step === "") {
102 return [];
103 }