Files
datastore/programs/server
Alexey Milovidov 46fac34f42 Web UI: restore single-query image results without misclassifying them as raw
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.
2026-07-18 05:27:21 +00:00
..
…
…
…
…