Reply to guest

guest · · in Bug: View query uses stale database and has no refresh in dialog

Reported by Ilya; investigation and write-up by ChatGPT.

On the front page, clicking View query reports:

Query failed: no such column: posts.body_format

The Refresh saved database button is only available in the full viewer. The embedded dialog therefore offers no direct way to recover from this failure.

Investigation: the board page and the viewer share the base SQL through ThreadRepository::boardRowsSql() and BoardListingQuery::context(). However, sqlite_viewer.js reuses a browser Cache Storage database indefinitely unless manually refreshed. Its checks verify database integrity and table presence, but not compatibility with the current query. A freshly downloaded production database contains posts.body_format. An older browser database is the likely cause; we have not inspected the affected browser's saved copy.

Proposed fix:
- Ensure a listing query is run against a compatible database; fetch a fresh copy when the saved schema is incompatible.
- Provide refresh/retry directly in the embedded dialog.
- Preserve edited SQL and query state during recovery.
- Keep the standalone viewer's saved/offline database capability.

Acceptance checks: seed a saved database without posts.body_format, open the front-page View query dialog, and verify recovery and successful execution. Also verify failed-download retry inside the dialog and preservation of edited SQL. Confirm that the standalone viewer still works with saved data.

Tracked on GitHub: https://github.com/gulkily/v3/issues/31
Related feedback: PF-20261021-F10.

Status: investigated; fix not implemented or deployed.

#meta #bug

Show more

…
Formatting help