Files
TrueGrowth/openspec/changes/unify-local-data-persistence/tasks.md
jiam 5119ac0ef8
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled
Sync latest TrueGrowth updates
2026-07-08 02:03:18 +08:00

1.8 KiB

Tasks: Unified local persistence

1. Specification

  • 1.1 Create OpenSpec proposal, design, task list, and delta spec.
  • 1.2 Validate with openspec validate unify-local-data-persistence --strict once the OpenSpec CLI is available in this checkout.

2. Local API Storage

  • 2.1 Resolve canonical desktop data and runtime paths for Electron and standalone Local API runs.
  • 2.2 Initialize truegrowth.sqlite with tables for tasks, assets, project records, settings, workflow state, social publishing, and migration records.
  • 2.3 Persist runtime tasks, cleared task IDs, runtime assets, workflow state, social publishing state, AIGCPanel state, and runtime settings to the ledger.
  • 2.4 Preserve JSON shadow files for compatibility while preferring ledger reads.
  • 2.5 Persist Drawnix workspace folders, boards, and workspace state through the Local API ledger while keeping IndexedDB as a shadow/offline fallback.

3. Migration And Diagnostics

  • 3.1 Add storage diagnostics, migrate, export, and import endpoints.
  • 3.2 Import legacy .truegrowth-runtime metadata without moving large files.
  • 3.3 Report split roots, SQLite availability, and canonical path status.

4. Client And Verification

  • 4.1 Add frontend Local API client helpers and types for the storage endpoints.
  • 4.2 Run Node syntax checks, TypeScript checks, and targeted Local API verifier coverage.
  • 4.3 Document remaining browser IndexedDB transition limits.

Notes

  • OpenSpec strict validation is still pending because the local openspec CLI is not available in this checkout (pnpm exec openspec ... reports command not found).
  • Browser IndexedDB remains as an offline/shadow cache for Drawnix workspace and UI-only preferences; Local API/SQLite is now authoritative when the desktop Local API is reachable.