Files
filebrowser/backend/internal/database/sql
Graham SteffaniakandDevin 5f3049ebc6 Debounce quick search and add an FTS5 trigram index
Quick search sent a request on every keystroke and each one ran an
unindexed lower(name) GLOB scan, so searches piled up and the last one
finished last. This:

- debounces the search input by 250ms, aborts the superseded request, and
  ignores late responses so the UI cannot show stale results;
- passes the request context into the query (15s timeout) so an abandoned
  search is interrupted instead of holding the index DB connection;
- removes the session-cancellation map, which could not interrupt the scan;
- adds one global FTS5 trigram index over (name, source:path) so substring
  searches use an index. It is derived data: a schema or health mismatch
  deletes and rebuilds the index DB, and it falls back to the old query
  when FTS5 is unavailable.

Also fixes GLOB escaping: SQLite GLOB has no backslash escape, so literal
* ? [ in a search term and in the scope prefix now use bracket classes.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-13 16:51:35 -05:00
..
2026-10-09 19:18:51 -05:00
2026-08-07 16:24:38 -05:00
2026-08-07 16:24:38 -05:00