46001bbf9d4e1a4ac4517fe8c212c179d081ff85
Markus #3 / Felix B2 — kill the duplicated spec-chain across findIdsForFilter and searchDocuments, and centralise the "name string → Tag (find or create)" loop that updateDocumentTags and applyBulkEditToDocument were each carrying their own copy of. `buildSearchSpec` is the single source of truth for the seven-spec chain (text + date range + sender + receiver + tags + tag-prefix + status). Both callers do their own FTS short-circuit, then delegate. `resolveTags` is the single source of truth for trimming, blank-skipping, and find-or-create through TagService. Both updateDocumentTags (replace semantics) and applyBulkEditToDocument (additive merge) consume it. No behaviour change. All 231 backend tests still green. Refs #225, PR #331 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
Python
73.1%
TypeScript
11.5%
Java
10.9%
Svelte
4.2%
Shell
0.1%