fix(search): keep a trailing space when the trimmed q echo lands after the debounce

The #1432 guard only held while a debounce was still pending. Once it
fired, the router echo of our own trimmed q (replaceUrl navigation)
reset the one-way-bound search box to the trimmed term, deleting the
just-typed trailing space — typing "Bein Sports" collapsed into
"BeinSports".

Applied terms are now always trimmed at the apply choke point (URL sync
and portal stores only ever act on the trimmed form anyway), so the
echoed q compares directly, and the echo guard no longer requires a
pending debounce. Back/forward stays authoritative via the untouched
imperative-trigger check.

Residual part of #1338.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-08-23 09:00:52 +02:00
1 parent 72727a5dfa
commit 2af67f5dae
4 files changed
+65 -7

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
---
type: fix
area: search
issues: [1338]
---
Typing a space in the portal search box and pausing briefly no longer deletes
the space — continuing to type "Bein Sports" no longer collapses into
"BeinSports".