From 5bcb4717b6d384e4a2b432771d33656611f61fe5 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 20 May 2026 07:15:47 +0200 Subject: [PATCH] docs(transcription): explain why SEARCH_RESULT_LIMIT lives in the shared module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round-4 polish from Felix (#1): SEARCH_RESULT_LIMIT only has one consumer today (PersonMentionEditor), so it risked masquerading as shared. Add a one-line rationale that the symmetry with MAX_QUERY_LENGTH and SEARCH_DEBOUNCE_MS — keeping all @mention knobs in one file — is the intentional motivation, not a missed inlining. Co-Authored-By: Claude Opus 4.7 --- frontend/src/lib/shared/discussion/mentionConstants.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/lib/shared/discussion/mentionConstants.ts b/frontend/src/lib/shared/discussion/mentionConstants.ts index 3b946345..04721782 100644 --- a/frontend/src/lib/shared/discussion/mentionConstants.ts +++ b/frontend/src/lib/shared/discussion/mentionConstants.ts @@ -3,4 +3,8 @@ * cap and the debounce window consistent across both files. */ export const MAX_QUERY_LENGTH = 100; export const SEARCH_DEBOUNCE_MS = 150; +/** Defensive client-side cap on the result list. Single consumer today + * (PersonMentionEditor), kept here for symmetry with the other limit + * knobs so the @mention configuration lives in one place. Felix #1 on + * PR #629 round 4. */ export const SEARCH_RESULT_LIMIT = 5;