debounce the gitroot probe in both clients #74

Closed
opened 2026-08-24 00:41:38 +01:00 by naps62-yolo · 0 comments
Collaborator

Both clients — one /api/gitroot request per keystroke in the raw path field.

TUI: every character typed into CwdRaw calls note_unknown_repo(), which sets needs_probe, and App::handle_draft_input turns that straight into an Effect::ProbeGitRoot. Typing a 30-character path fires 30 requests, each forking a git rev-parse on the daemon.

Web: the same shape — the cwdRaw input handler calls probeGitRoot() directly.

The sequence guard keeps the answers correct; it does nothing about the volume. Debounce both, the way dirAutocomplete already debounces its listing fetch.

Both clients — **one `/api/gitroot` request per keystroke in the raw path field.** TUI: every character typed into `CwdRaw` calls `note_unknown_repo()`, which sets `needs_probe`, and `App::handle_draft_input` turns that straight into an `Effect::ProbeGitRoot`. Typing a 30-character path fires 30 requests, each forking a `git rev-parse` on the daemon. Web: the same shape — the `cwdRaw` input handler calls `probeGitRoot()` directly. The sequence guard keeps the *answers* correct; it does nothing about the volume. Debounce both, the way `dirAutocomplete` already debounces its listing fetch.
naps62-yolo added this to the Spawn v2 milestone 2026-08-24 00:41:38 +01:00
naps62-yolo added the area/tuiarea/webdifficulty/easytype/fix labels 2026-08-24 00:41:38 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: naps62/maestro#74