Skip to content

Search: bump debounce from 200ms to 400ms across every site#35

Open
sysread wants to merge 1 commit into
mainfrom
claude/add-search-loading-feedback-4YUPk
Open

Search: bump debounce from 200ms to 400ms across every site#35
sysread wants to merge 1 commit into
mainfrom
claude/add-search-loading-feedback-4YUPk

Conversation

@sysread
Copy link
Copy Markdown
Owner

@sysread sysread commented May 12, 2026

SYNOPSIS

Bump SEARCH_DEBOUNCE_MS from 200ms to 400ms across
every search site so a typing burst fires one Venice embed
instead of one-per-character.

PURPOSE

200ms sits inside a typical inter-keystroke interval (~150-250ms
for a moderate typist), so the previous debounce window was firing
mid-burst and queueing one Venice /embeddings call per
character. Bad because it generates pointless embedding load and
flashes the Scanner repeatedly while the user is still typing.

DESCRIPTION

Six sites, all with the same constant SEARCH_DEBOUNCE_MS = 200:

All bump to 400ms and the comments now spell out the
typing-cadence reasoning ("moderate typist ~200ms inter-keystroke
interval") rather than just citing the prior value, so the next
session can adjust without re-deriving it.

400ms is the conventional "wait for typing to settle" window -
long enough to skip mid-burst, short enough that an intentional
pause still feels responsive.

Notes:

  • did not centralise the constant into a shared module - six
    literals isn't worth the indirection, and the comments make the
    shared intent explicit
  • the in-modal MemoryList comment used to claim "Same window
    the old in-modal search used" - that history is no longer the
    relevant constraint, replaced with the typing-cadence rationale
  • gate passes: 62 files / 1069 tests, svelte-check clean, build OK

Test plan

  • type a short query in each drawer search; confirm only one
    Scanner cycle / one Venice embed call per burst rather than one
    per character
  • confirm a paused / deliberate single-word query still feels
    responsive (~400ms to first scan)
  • mise run check green

Generated by Claude Code

200ms is right on the edge of a typical inter-keystroke interval
(~150-250ms for a moderate typist), so the old window was firing
mid-burst and queueing one Venice embed per character. 400ms is
the conventional "wait for typing to settle" window - long enough
to skip mid-burst, short enough that an intentional pause still
feels responsive.

Updated the six matching constants together (Chat, WikiList,
JournalList, RecipeList, MemoryList, Memories) so the four drawer
searches plus the memory-relation picker all share the same
window. Updated the comments to spell out the typing-cadence
reasoning rather than just "matches the old value" so the next
session can adjust without re-deriving it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants