FTS5 speeds up substring searches but costs roughly 40% more indexing
time and 15% more index file size, so it now defaults to off.
- Add indexSqlConfig.fts5 (default false). When off, search uses the
existing unindexed query and no FTS table or triggers are created.
- When enabled, the index is built from existing rows on startup (no
rescan); disabling it drops the table and triggers.
- Regenerate config.yaml and swagger docs.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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>
Review follow-up on #3108.
- There is no integrations.wopi block any more: integrations.office gains
product (onlyoffice, the default, or collabora) and tokenExpirationHours.
secret stays required for OnlyOffice and becomes optional for Collabora.
Existing OnlyOffice configs are unchanged. With product collabora, the
OnlyOffice-specific paths (document keys, previews via /converter, CSP
script origins, onlyOfficeUrl) stand down.
- The SPA receives officeProduct and officeExtensions instead of the wopi*
globals. WOPI stays the name of the protocol code and routes.
- Discovery is refreshed in the background until shutdown: every 30s while
it has never loaded (the editor often starts after FileBrowser), then every
10 minutes. Before, a failed first fetch left Collabora disabled until
restart.
- WopiEditor shows its close button when the session request fails, instead
of leaving the user on a blank view.
- Fix the router import broken by the upstream switch to a named export.
FileBrowser gains a WOPI host, so office documents can open in Collabora
Online (or any WOPI editor, OnlyOffice Docs included) next to the existing
OnlyOffice integration. Refs #641.
- integrations.wopi: url, internalUrl, secret, product, tokenExpirationHours,
viewOnly. Discovery is fetched from the editor and cached; extensions it
declares open in the editor, except formats FileBrowser already views
itself (images, plain text).
- GET /api/wopi/session returns the editor URL and a signed access token
bound to one file, one user and a mode. The token has its own audience and
a key derived from the auth key (or integrations.wopi.secret), so it never
doubles as a session token.
- /wopi/files/{id}[/contents]: CheckFileInfo, GetFile, PutFile and the lock
operations. Permissions are re-checked on every call, so revoking access
takes effect mid-session. PutFile receives the whole body before writing,
and answers Collabora's COOLStatusCode 1010 when the file changed in
storage since it was loaded, letting the user overwrite or reload.
- access_token is redacted from request logs.
- WopiEditor.vue form-posts the token into an iframe and handles UI_Close.
Public shares keep using OnlyOffice for now.