Live wall filter: preset tags match word starts; keep typed trailing space (#235)

- Storm/Traffic preset tag terms now match at the start of a word, so
  "tree" no longer pulls "street-racing"/"street-fight" into Storm mode.
- FilterBar search compared the trimmed hash q against the untrimmed
  typed text, so pausing after "main " reset the box to "main" and the
  next word ran on ("mainst"). Compare trimmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Logan Cusano
2026-10-05 03:16:01 -04:00
co-authored by Claude Opus 5.5
parent f479578942
commit 2aaf474828
2 changed files with 12 additions and 3 deletions
+3 -1
View File
@@ -53,7 +53,9 @@ export function FilterBar({
const [q, setQ] = useState(filter.q);
const committed = useRef(filter.q);
useEffect(() => {
if (filter.q !== committed.current) { committed.current = filter.q; setQ(filter.q); }
// Compare trimmed: the hash stores q trimmed, so a just-typed trailing
// space ("main ") must not read as an outside change and get eaten.
if (filter.q !== committed.current.trim()) { committed.current = filter.q; setQ(filter.q); }
}, [filter.q]);
const filterRef = useRef(filter);
filterRef.current = filter;