feat: extend title-only search to attachments

The titleOnly flag now matches attachment file names via the
separator-normalized trigram expression, and the toggle chip stays
available in attachment mode as File name only.
This commit is contained in:
Philipinho
2026-08-24 22:19:04 +01:00
parent bbc7ff39c0
commit 528329f50c
3 changed files with 7 additions and 4 deletions
@@ -255,7 +255,7 @@ export function SearchSpotlightFilters({
</Menu.Dropdown>
</Menu>
{contentType !== "attachment" && !isAiMode && (
{!isAiMode && (
<Button
variant={titleOnly ? "light" : "subtle"}
color={titleOnly ? "blue" : "gray"}
@@ -270,7 +270,9 @@ export function SearchSpotlightFilters({
aria-pressed={titleOnly}
onClick={() => setTitleOnly(!titleOnly)}
>
{t("Title only")}
{contentType === "attachment"
? t("File name only")
: t("Title only")}
</Button>
)}