Q149: editing a task can change everything creating it can

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 01:04:26 -04:00
1 parent 766d4ab8cd
commit 7ab46bb2de
14 files changed
+150 -16

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import type { DatabaseSync } from "node:sqlite";
import type { WritingMode } from "../../src/shared/domain";
/** A task's current links, for edits in tests that change other fields and keep these. */
export function currentLinks(db: DatabaseSync, taskId: string) {
const row = db.prepare("select project_id, goal_id, workspace_id, requires_filesystem, writing_mode from tasks where id = ?").get(taskId) as {
project_id: string | null; goal_id: string | null; workspace_id: string | null; requires_filesystem: number; writing_mode: WritingMode;
};
return { projectId: row.project_id, goalId: row.goal_id, workspaceId: row.workspace_id, requiresFilesystem: row.requires_filesystem === 1, writingMode: row.writing_mode };
}