singularity-forge/packages/pi-tui
Flux Labs 3bfa444809 fix: debounce @ file autocomplete to prevent TUI freeze on large codebases (#448) (#452)
The synchronous fuzzyFind() native call blocks the event loop during
@ file autocomplete. On large codebases (e.g. Java projects with deep
directory trees), each call can take seconds. Since updateAutocomplete()
was called on every keystroke while autocomplete was active, rapid typing
would cascade into dozens of blocking searches — freezing the TUI for
minutes. This made it appear that arrow keys caused the freeze, when
the actual cause was accumulated backlog from processing buffered input.

Debounce all @ file reference autocomplete paths (character input,
backspace, forward delete, and re-trigger after cancellation) with a
150ms delay so only the final keystroke triggers the expensive search.
Slash command autocomplete remains synchronous since it's cheap.

Co-authored-by: TÂCHES <afromanguy@me.com>
2026-03-14 23:45:05 -06:00
..
src fix: debounce @ file autocomplete to prevent TUI freeze on large codebases (#448) (#452) 2026-03-14 23:45:05 -06:00
package.json fix: broken npm install — remove bundleDependencies, use postinstall symlinks (#369) 2026-03-14 10:04:12 -06:00
tsconfig.json feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00