The mutateDeleteFiles Apollo cache update evicted the plural list
queries (findScenes/findImages/findGalleries) but not the singular
detail queries, so the "File Info" counter on a scene/image/gallery
detail page stayed stale until a manual refresh.
Co-authored-by: dev-null-life <264850222+dev-null-life@users.noreply.github.com>
The x86_64 and CUDA backend stages still used golang:1.24.3 while go.mod requires Go 1.25, which broke make docker-build under GOTOOLCHAIN=local. Bump both images to golang:1.25.9 to match docker/compiler/Dockerfile and PR #6869.
Verified with: make docker-build
Fixes https://github.com/stashapp/stash/issues/6887
Co-authored-by: KennyG <kennyg@kennyg.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The preceding commit added lru.Cache for the compiled-regexp cache to
match the style in pkg/sqlite/regex.go. That file's use case is
different: a small bounded cache serving a read-dominated workload. The
auto-tag regexp cache is job-scoped (so eviction buys us nothing) and
hit by every worker on every candidate (so the LRU's per-Get mutex
becomes contention, measurable under the parallel worker pool).
sync.Map's read-optimised path avoids the contention without changing
any observable behavior. Kept as a separate commit so it can be
reverted independently if upstream prefers the LRU approach — the
first commit stands on its own either way.
Replaces the per-file SQL QueryForAutoTag prefilter with an in-memory
2-rune prefix index over performers/studios/tags, preloaded once at job
start. Also:
- runs file processing through job.TaskQueue so scenes/images/
galleries tag in parallel instead of one file at a time
- keyset-paginates the query loop so batch N+1 doesn't pay the
O(offset) scan past large tables
- bulk-loads studio/tag aliases via a new optional AllAliasLoader
interface, avoiding N+1 GetAliases calls during preload
- caches compiled name regexps (same candidate names repeat across
thousands of files)
- hoists strings.ToLower(path) and allASCII(path) out of the per-
candidate match loop
- opens a fresh write txn per applied match instead of holding one
for every tagger phase
Tagger gains *AtPath methods that own the cache + txn manager, letting
the task code stay slim.
* Fix WebSocket UTF-8 error for non-UTF-8 file paths in subscriptions
Sanitize log messages and job fields (description, subtasks, error)
before sending over WebSocket. File paths with non-UTF-8 characters
caused the browser to close the connection with "Could not decode a
text frame as UTF-8." Invalid bytes are replaced with U+FFFD.
Only the API response layer is affected — underlying stored data is
unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Replace direct ToValidUTF8 calls to new sanitiseWebsocketString function
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Let the stash ID pill shrink in tagger
On very narrow viewports (e.g. mobile), the stash ID pill will
overflow its container. With this PR, it will instead limit itself
to the width of the container and display with an ellipsis if
necessary.
Fixes#6786
* update postmigration to handle deduplicate folders.
* Split post-migration to perform some tasks before the schema migration
* Reparent files and delete duplicate folder if possible
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>