Persist JSON array imports through recovery v14 and the canvas file picker

This commit is contained in:
2026-11-09 17:57:23 +08:00
parent c4dfaf50a5
commit 78dfbbf4d7
12 changed files with 52 additions and 30 deletions
+9 -2
View File
@@ -180,7 +180,7 @@ Whole-source completion preserves pending/stored resources and history. Default
image sizing and display handles reuse the existing decoder/cache lifecycle.
Undo/redo, source failure, quota retry and late chunks do not re-upload bytes or
restore deleted incarnations. Earlier loading/recovery versions retain their old
restrictions; future format 13 is rejected. Generation, cross-project durable depot
restrictions; current recovery compatibility is described below. Generation, cross-project durable depot
sharing and broader lifecycle/acceptance work remain separate unfinished goals.
The package now exposes `/bindings` for pure projection, renderer descriptors,
@@ -333,7 +333,14 @@ claim of constant-time full-frame updates or complete region-based drawing.
array, with byte cursors, bounded record payloads, structural depth limits and
abort/yield checks. It uses parserVersion 3 and can feed a host-managed generic
ImportRunner. It does not yet interpret the exported document envelope, and
ProjectEngine's persisted imports/UI still accept their existing formats only.
ProjectEngine now accepts native record arrays through `imports.startJsonArray(bytes, canvasId)`; the file picker routes `.json` to it. Exported document envelopes are still unsupported.
A malformed structural tail ends with an explicit failure; previously emitted
records remain available. Empty source bytes reject, while `[]` is a valid empty
array. Array record errors are distinct from document schema/reference failures.
JSON array jobs preserve the original Blob and integrity digest, parserVersion 3,
byte cursor, stable IDs, pending dependencies and failures using the same ImportJob
and commit boundary as NDJSON. Such roots use recovery envelope 14; readers accept
1–14 and reject 15. Downgrading an array-bearing image to 13 rejects. This changes
neither IndexedDB schema v4 nor the server wire protocol. Native array items have
the same `{kind,key,record}` schema as NDJSON; `$target` denotes the chosen canvas.