From c515924eaaeb164c23459fe499ffd9da0df55bb1 Mon Sep 17 00:00:00 2001 From: HmonWutt Date: Tue, 14 Jul 2026 23:32:44 +0200 Subject: [PATCH 1/2] fix(quotes): use edited quote length instead of original (@HmonWutt) When a moderator edits a quote before approving it, the length metadata was calculated from the original (unedited) text instead of the edited text. This caused incorrect quote length display in the quote search modal. Issue: #8081 --- backend/src/dal/new-quotes.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/dal/new-quotes.ts b/backend/src/dal/new-quotes.ts index 5741deb1b8cd..43948b52600c 100644 --- a/backend/src/dal/new-quotes.ts +++ b/backend/src/dal/new-quotes.ts @@ -159,10 +159,11 @@ export async function approve( ); } const language = targetQuote.language; + const approvedText = editQuote ?? targetQuote.text; const quote: ApproveQuote = { - text: editQuote ?? targetQuote.text, + text: approvedText, source: editSource ?? targetQuote.source, - length: targetQuote.text.length, + length: approvedText.length, approvedBy: name, id: -1, }; From 6c1c011e7feb417be828c4a78e6a1f987109afa6 Mon Sep 17 00:00:00 2001 From: HmonWutt Date: Wed, 15 Jul 2026 08:47:07 +0200 Subject: [PATCH 2/2] fix(quotes): use quote.group instead of hardcoded length thresholds in QuoteSearchModal --- frontend/src/ts/components/modals/QuoteSearchModal.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/components/modals/QuoteSearchModal.tsx b/frontend/src/ts/components/modals/QuoteSearchModal.tsx index 1e5e587d3074..358e201ffef5 100644 --- a/frontend/src/ts/components/modals/QuoteSearchModal.tsx +++ b/frontend/src/ts/components/modals/QuoteSearchModal.tsx @@ -92,9 +92,10 @@ function exactSearch(quotes: Quote[], captured: RegExp[]): [Quote[], string[]] { } function getLengthDesc(quote: Quote): string { - if (quote.length < 101) return "short"; - if (quote.length < 301) return "medium"; - if (quote.length < 601) return "long"; + if (quote.group === 0) return "short"; + if (quote.group === 1) return "medium"; + if (quote.group === 2) return "long"; + if (quote.group === 3) return "thicc"; return "thicc"; }