From 08d29479c42799f2bff26e72498615b6fa5acd3b Mon Sep 17 00:00:00 2001 From: Apoorva Pendse Date: Mon, 18 Nov 2024 19:50:37 +0530 Subject: [PATCH] typeahead: Increase token limit to scan '#'. As per commit 0965d4e893, the logic has been switched from returning "topic_jump" from tokenize_compose_str, which results in closing of the typeahead to returning the sliced token starting from '#'. This change causes some test cases to fail due to increased requirements in processing of the token to search for "#" instead of ">" which caused early exits, ultimately causing no typeaheads to be triggered. Due to this, the limit has been bumped up from 25 to 40 characters to accomodate the typeahead triggers in case of large stream and topic names. --- web/src/composebox_typeahead.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/composebox_typeahead.ts b/web/src/composebox_typeahead.ts index 46b09230bc..d8b530e0a1 100644 --- a/web/src/composebox_typeahead.ts +++ b/web/src/composebox_typeahead.ts @@ -411,7 +411,7 @@ export function tokenize_compose_str(s: string): string { // after the first character. let i = s.length; - let min_i = s.length - 25; + let min_i = s.length - 40; if (min_i < 0) { min_i = 0; }