Skip to content

fix(search): prevent discovery restarts and stream results efficiently - #2883

Merged
bajrangCoder merged 2 commits into
mainfrom
fix-project-search-restarts
Sep 12, 2026
Merged

fix(search): prevent discovery restarts and stream results efficiently#2883
bajrangCoder merged 2 commits into
mainfrom
fix-project-search-restarts

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with both previous review findings resolved and no actionable new defects identified.

Summary

  • Bounds project-discovery waiting at five seconds and preserves the resulting snapshot.
  • Adds worker acknowledgements and processing watchdogs for result backpressure and timeout handling.
  • Streams native and fallback results in bounded per-file batches.
  • Correctly associates repeated, interleaved result groups with their file metadata.
  • Adds coverage for discovery timing, streaming, Unicode empty matches, native cancellation, and regex deadlines.

Diagram

sequenceDiagram
    participant UI as Search UI
    participant Discovery as File discovery
    participant Worker as Search worker
    participant View as Result view

    UI->>Discovery: waitForFileList()
    alt ready within five seconds
        Discovery-->>UI: ready
    else still scanning
        UI->>UI: take current snapshot
        UI->>UI: warn results may be incomplete
    end
    UI->>Worker: search snapshot
    loop Each bounded result batch
        Worker-->>UI: search-result
        UI->>View: append matches and file metadata
        UI-->>Worker: result-ack
    end
    Worker-->>UI: done-searching
Loading

Reviews (2) · Last reviewed commit: "fix"

Comment thread src/sidebarApps/searchInFiles/index.js Outdated
Comment thread src/sidebarApps/searchInFiles/index.js
@bajrangCoder

This comment was marked as outdated.

@bajrangCoder
bajrangCoder added this pull request to the merge queue Sep 12, 2026
Merged via the queue into main with commit 77b0b54 Sep 12, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Sep 12, 2026
@bajrangCoder
bajrangCoder deleted the fix-project-search-restarts branch September 12, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant