feat(FN-2456): persist task token usage on task records

- Add schema v44 migration to persist task-level token usage totals and first/last usage timestamps on tasks
- Extend core task types, store create/update flows, and exports to round-trip token usage data
- Add migration and TaskStore regression tests for token usage persistence, null clearing, and reinitialization behavior
- Update dashboard async handling and tests to prevent post-unmount state updates and reduce flaky assertion timing
This commit is contained in:
Fusion
2026-04-24 09:44:44 -07:00
committed by gsxdsm
parent eed6380ae1
commit a4044e2b02
17 changed files with 312 additions and 44 deletions

View File

@@ -51,7 +51,7 @@ describe("TaskStore task documents", () => {
expect(tableNames.has("task_documents")).toBe(true);
expect(tableNames.has("task_document_revisions")).toBe(true);
expect(db.getSchemaVersion()).toBe(43);
expect(db.getSchemaVersion()).toBe(44);
const index = db
.prepare(