#2953·datasette

Hot run mode for the table filter form

Author: JosephTNWCreated Sep 22, 2026Updated Sep 22, 2026

When exploring a small table I often tweak a filter (column, comparator, value) several times in a row. Each tweak needs a click on "Apply filters" and a full page load, which slows down quick exploration.

Proposal

Add a "hot run" checkbox to the filter form, immediately before the "Apply filters" button. When it is checked:

  • "Apply filters" is disabled.
  • Editing a filter's value (or the sort / search options) re-runs the query 2 seconds after the last edit, so fast typing doesn't send a request per keystroke.
  • Choosing a column or comparator for a row with no value doesn't re-run anything (the server would ignore that row), except for comparators like "is null" that take no value.
  • The results area is updated in place with HTML re-rendered by the server: row count and filter description, facets, table, pagination and the "View and edit SQL" link. The filter form itself is left alone, so what you're typing isn't lost.
  • While a request is running the results show "Loading...", similar to the existing "count all" button.
  • If the query fails (for example array contains against a column that isn't JSON), the server's error message ("malformed JSON") is shown in place of the results.
  • Hot run state is stored in the URL as ?_hot_run=1, along with the current filters, so a reload keeps both.

The checkbox is off by default, so nothing changes unless you opt in.

Preview

https://github.com/user-attachments/assets/14cab8d6-55c1-4ced-80ba-092df6ca7ad5

Implementation notes

I have a working branch with this, including tests: server-side HTML tests in tests/test_table_html.py and Playwright tests in tests/test_playwright.py, plus a short docs addition to docs/pages.rst. A few details that may be worth discussing:

  • Column menus (the cog icons), the "count all" button and the mobile column actions button are re-attached after each in-place update.
  • _hot_run is left out of the form's hidden arguments, so turning hot run off and clicking "Apply filters" actually turns it off.
  • Editing a filter while a request is still in flight cancels the older request, so the results always match the latest input.
  • The server's error page gets a small error-message class on its message element so the JavaScript can pull out the text.

Would you be interested in a PR for this? I'm happy to adjust the naming ("hot run", _hot_run), the 2 second delay, or the approach first.