Sync latest TrueGrowth updates
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled

This commit is contained in:
jiam
2026-07-08 02:03:18 +08:00
parent 52636c91ae
commit 5119ac0ef8
102 changed files with 20985 additions and 1760 deletions

View File

@@ -0,0 +1,26 @@
# Tasks: Unified local persistence
## 1. Specification
- [x] 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
- [x] 2.1 Resolve canonical desktop data and runtime paths for Electron and standalone Local API runs.
- [x] 2.2 Initialize `truegrowth.sqlite` with tables for tasks, assets, project records, settings, workflow state, social publishing, and migration records.
- [x] 2.3 Persist runtime tasks, cleared task IDs, runtime assets, workflow state, social publishing state, AIGCPanel state, and runtime settings to the ledger.
- [x] 2.4 Preserve JSON shadow files for compatibility while preferring ledger reads.
- [x] 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
- [x] 3.1 Add storage diagnostics, migrate, export, and import endpoints.
- [x] 3.2 Import legacy `.truegrowth-runtime` metadata without moving large files.
- [x] 3.3 Report split roots, SQLite availability, and canonical path status.
## 4. Client And Verification
- [x] 4.1 Add frontend Local API client helpers and types for the storage endpoints.
- [x] 4.2 Run Node syntax checks, TypeScript checks, and targeted Local API verifier coverage.
- [x] 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.