Skip to content

Commit 10254dc

Browse files
author
Marvin Zhang
committed
fix: Update timestamps in MCP API Adapter test entry and improve note handling in WorkspaceDevlogManager
1 parent 84ff725 commit 10254dc

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.devlog/entries/271-fix-mcp-api-adapter-test-failures-11-failing-tests.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"status": "done",
88
"priority": "high",
99
"createdAt": "2025-07-24T09:37:37.634Z",
10-
"updatedAt": "2025-07-24T09:45:48.068Z",
10+
"updatedAt": "2025-07-24T09:54:53.090Z",
1111
"notes": [
1212
{
1313
"id": "1017bbc0-e67e-4482-83dc-b6d23d1738a9",
@@ -47,5 +47,5 @@
4747
"lastAIUpdate": "2025-07-24T09:37:37.634Z",
4848
"contextVersion": 1
4949
},
50-
"closedAt": "2025-07-24T09:45:48.068Z"
50+
"closedAt": "2025-07-24T09:54:53.090Z"
5151
}

packages/core/src/managers/devlog/workspace-devlog-manager.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -629,18 +629,25 @@ export class WorkspaceDevlogManager {
629629
throw new Error(`Devlog ${id} not found`);
630630
}
631631

632+
// Add completion note first if summary is provided
633+
if (summary) {
634+
await this.addNote(id, `Completed: ${summary}`, 'progress');
635+
}
636+
637+
// Get the updated entry (with note if added) and mark as completed
638+
const entryWithNote = await this.getDevlog(id);
639+
if (!entryWithNote) {
640+
throw new Error(`Devlog ${id} not found after adding note`);
641+
}
642+
632643
const now = new Date().toISOString();
633644
const updated: DevlogEntry = {
634-
...existing,
645+
...entryWithNote,
635646
status: 'done',
636647
updatedAt: now,
637648
closedAt: now,
638649
};
639650

640-
if (summary) {
641-
await this.addNote(id, `Completed: ${summary}`, 'progress');
642-
}
643-
644651
const provider = await this.getCurrentStorageProvider();
645652
await provider.save(updated);
646653

packages/mcp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ async function main() {
232232
adapterInstance.setCurrentWorkspaceId(defaultWorkspace);
233233
}
234234

235-
// Assign the adapter instance directly (not Object.assign which doesn't copy methods)
235+
// Assign the adapter instance directly
236236
adapter = adapterInstance;
237237

238238
const transport = new StdioServerTransport();

0 commit comments

Comments
 (0)