mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
A single-query image result (e.g. `FORMAT PNG`) streams as a blob that `postImpl` renders directly, leaving `reply` empty, so `postSingle` persisted the snapshot as `data: ''`. On restore, `materializeResult` treated the empty string as a non-null, non-table payload and fell into the raw branch, reopening the tab as an empty raw text result with the `Copy` button enabled instead of as an image result (after reload, `Back`/`Forward`, or first activation from `IndexedDB`). Store `data: null` for image results, exactly like an oversized result and like the per-statement multi-query path in `postMulti`. The existing `data == null` guard in `materializeResult` then reopens the tab idle instead of rendering empty raw text, and the run stays reproducible from the `run=1` URL (images are already grouped with oversized results as "not snapshotted" in `buildHistoryParams`). Fixes an AI-review finding on the current head.