Skip to content

components C5: workspace search dialogs + ripgrep drain fix - #297

Merged
ericleepi314 merged 1 commit into
mainfrom
components/c5-search-dialogs
Jun 11, 2026
Merged

components C5: workspace search dialogs + ripgrep drain fix#297
ericleepi314 merged 1 commit into
mainfrom
components/c5-search-dialogs

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

Summary

  • /search + /open dialogs (TS GlobalSearch/QuickOpen, degraded scope) inserting TS-verbatim @file#Lline / @path mentions — now functional downstream (expand_at_mentions strips the #L fragment and attaches the file)
  • Shared-engine fix: the ripgrep runner deadlocked on >64KB output (pipes never drained during the abort-poll loop) and strict decoding could silently truncate Grep/Glob results — drained concurrently + errors="replace"
  • UI-neutral workspace_search/fuzzy_match services (TS-cited caps/flags, Windows-safe parse, POSIX insertions); screens on the house DialogScreen+SelectList idiom with the stale-result race closed in depth

Test plan

  • 14 tests: >64KB no-stall regression, stale-enter pilot, case-insensitivity, truncation flags, functional-mention pin, dispatch seeding
  • 636 TUI/REPL + 56 grep/glob/ripgrep engine tests green; full suite BASELINE-IDENTICAL
  • Impl-critic: REQUEST CHANGES (stale race, Windows parse, decode truncation, inert mentions, keyboard model) → all fixed → APPROVE

🤖 Generated with Claude Code

/search and /open dialogs (TS GlobalSearchDialog / QuickOpenDialog,
degraded: no preview pane, command-launched instead of ctrl+shift
chords), inserting TS-verbatim @file#Lline / @path mentions into the
composer — and the #L fragment now ATTACHES the file downstream
(expand_at_mentions strips it; range slicing is a noted follow-up).

- shared-engine bugfix: the ripgrep abort-poll runner never drained
  its pipes, so >64KB of output deadlocked rg until the 20s timeout
  (rg --files tripped it first; big content searches had the same
  latent stall); now drained via concurrent daemon threads, with
  errors="replace" so one non-UTF8 matched line can't kill the drain
  and silently truncate Grep/Glob results
- UI-neutral services: workspace_search (TS-cited caps 10/500, -i -F,
  the TS Windows-safe ^(.*?):(\d+):(.*)$ parse, POSIX-relative
  insertions, truncation flags) and fuzzy_match (fuzzy_score moved
  verbatim out of the Textual history module, which re-exports it)
- screens on the house DialogScreen+SelectList idiom: Input keeps
  focus, arrows route to the list, Enter selects; stale-result race
  closed in depth (immediate clear + query guard + per-search abort
  tripped on supersede/close + is_attached); honest counts incl.
  truncation labels; aborted workers never report

14 tests incl. the >64KB no-stall regression, the stale-enter pilot,
case-insensitivity, truncation flags, and the functional-mention pin.
Suite baseline-identical. Critic-approved after one round; known
pattern-level wart shared with HistorySearch (mouse-focused list
swallows enter/esc) noted for the shared-idiom follow-up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ericleepi314
ericleepi314 merged commit 5e4cad7 into main Jun 11, 2026
singlaamitesh pushed a commit to singlaamitesh/clawcodex that referenced this pull request Jul 7, 2026
…-search-dialogs

components C5: workspace search dialogs + ripgrep drain fix
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.

1 participant