Skip to content

[FEATURE]: Add a Refresh file index command that forces a search-index rescan #40392

Open

Description

@clx828
  • I have verified this feature I'm about to request hasn't been suggested before.

Summary

The file search index is built once when a project opens; files added afterwards may not be discoverable. Add an explicit Refresh file index command that forces a rescan of the current project and rebuilds the search index, with progress feedback so the user knows it is running.

Related existing issues

Proposed scope

  • Server: add a location-scoped refresh endpoint that triggers a rescan and waits for it to finish before responding (not fire-and-forget — otherwise the user sees a success toast before the index is actually rebuilt).
  • Desktop app: add a Refresh file index command to the command palette; while it runs, show an indeterminate progress indicator (e.g. bottom of the window), then hide it.
  • TUI: add an fs.refresh command with a keybind (e.g. F5).

Implementation notes

  • ripgrep index layer: if refresh just forks a background scan and returns immediately, the user gets a false "done"; it should wait for the scan to complete.
  • fff index layer: waitForScan only waits for an already-started scan — it does not trigger a new one. A real rescan API (e.g. scanFiles) must be called, otherwise refresh is a no-op.

Activity

  1. added
    needs:compliance
    on Aug 4, 2026
  2. changed the title [-]Feature: add a Refresh file index command that forces a search-index rescan[/-] [+][FEATURE]: Add a Refresh file index command that forces a search-index rescan[/+] on Aug 4, 2026
  3. removed
    needs:compliance
    on Aug 4, 2026
  4. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! The title and template are now in order. We appreciate the detailed write-up and the references to related issues.

  5. wshRepo commented on Sep 21, 2026

    @wshRepo

    same request.

  6. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed request, @clx828!

    To restate it: you'd like an explicit Refresh file index action that forces a rescan of the current project. It would come with a server endpoint that only responds once the rescan has finished, a desktop command-palette entry with a progress indicator, and a TUI fs.refresh command with a keybind. Maintainers will consider it.

    For context, in v2 the file search index already refreshes itself: the ripgrep backend rescans in the background (at most every 10 seconds) when you search, and the fff backend relies on its file watcher. There is currently no way to trigger a rescan manually, and a plugin can't do it either, because plugins have no access to the search index.

    Related issues and PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions