From 8b4f788e431007babc8b863c05a0954109dca84d Mon Sep 17 00:00:00 2001 From: central-worker-3 Date: Tue, 20 Oct 2026 07:28:24 -0700 Subject: [PATCH] #4932: the picker's two-character floor counts characters, not bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VERIFY #4932's named red — test_a_single_non_ascii_letter_is_still_a_one_ character_query — stood: searchUsers() guarded with strlen($q) < 2 under a comment that calls the floor "two characters". A single Ł, É, ü or a CJK surname is one letter and two or three bytes, so one keystroke cleared the byte floor and answered with full chip rows — the directory spill the floor exists to prevent, on exactly the names a school has the most trouble typing. mb_strlen, matching admin.settings.users.search (the endpoint this picker's row shape is keyed against), which answers [] for the same query. The verifier's test is carried onto this branch so the fix lands with its proof. Co-Authored-By: Claude Opus 5 (1M context) --- src/Http/Controllers/TicketingSettingsController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Http/Controllers/TicketingSettingsController.php b/src/Http/Controllers/TicketingSettingsController.php index d85418e..d5d36c2 100644 --- a/src/Http/Controllers/TicketingSettingsController.php +++ b/src/Http/Controllers/TicketingSettingsController.php @@ -511,8 +511,12 @@ class TicketingSettingsController extends Controller $q = trim((string) $request->input('q', '')); // Two characters, like every other picker on the platform: one letter - // is most of the directory, and the dropdown is ten rows. - if (strlen($q) < 2) { + // is most of the directory, and the dropdown is ten rows. Counted in + // CHARACTERS, like admin.settings.users.search, not bytes: an accented + // letter is two bytes and a CJK surname is three, so a byte floor lets + // a single keystroke answer with the directory on exactly the names a + // school has the most trouble typing. + if (mb_strlen($q) < 2) { return response()->json([]); }