Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 16, 2025

Fixes #5763

Problem

The index scanning feature was showing instantly green without actually performing the scan, particularly in Unity projects with hundreds of script files where the scan should take 10-15 minutes.

Root Cause

The issue was in the code indexing orchestrator where:

  1. No proper progress reporting during file discovery phase
  2. Missing validation of actual scanning work performed
  3. Instant completion when all files were cached (no visual feedback)
  4. State transitions to "Indexed" without confirming actual work was done

Solution

  • Enhanced Progress Reporting: Added detailed progress messages during file discovery, filtering, and processing phases
  • Work Validation: Added validation to ensure actual scanning work was performed before transitioning to "Indexed" state
  • Meaningful Completion Messages: Provide specific feedback based on scan results (e.g., "All files were cached", "Processed X files and indexed Y blocks")
  • Edge Case Handling: Proper handling when no files need processing or no supported files are found
  • Interface Enhancement: Added progress callback to scanner interface for better user feedback

Changes

  • src/services/code-index/orchestrator.ts: Enhanced progress reporting and work validation
  • src/services/code-index/processors/scanner.ts: Added progress reporting during file discovery
  • src/services/code-index/interfaces/file-processor.ts: Added progress callback to interface

Testing

  • All existing tests pass
  • Scanner tests: ✅ 7 passed
  • Config manager tests: ✅ 72 passed
  • Type checking: ✅ All packages pass
  • Linting: ✅ All packages pass

The fix ensures users see proper progress feedback during scanning and prevents the misleading instant green status.


Important

Enhances index scanning by validating work, improving progress reporting, and handling edge cases to prevent misleading green status.

  • Behavior:
    • Prevents instant green status during index scanning by ensuring actual work is validated before marking as "Indexed".
    • Provides detailed progress messages during file discovery, filtering, and processing phases in orchestrator.ts and scanner.ts.
    • Adds meaningful completion messages based on scan results in orchestrator.ts.
  • Interfaces:
    • Adds onProgressUpdate callback to IDirectoryScanner in file-processor.ts for progress reporting.
  • Edge Cases:
    • Handles cases where no files need processing or no supported files are found in orchestrator.ts and scanner.ts.

This description was created by Ellipsis for e49f7d0. You can customize this summary. It will automatically update as commits are pushed.

- Add proper progress reporting during file discovery phase
- Validate that actual scanning work was performed before transitioning to "Indexed" state
- Provide meaningful completion messages based on scan results
- Handle edge cases where no files need processing (all cached)
- Add progress callback to scanner interface for better user feedback

Fixes #5763
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 16, 2025 01:00
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jul 16, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 16, 2025
@daniel-lxs daniel-lxs moved this from Triage to Roomote/renovate BOT in Roo Code Roadmap Jul 16, 2025
@daniel-lxs daniel-lxs closed this Sep 16, 2025
@github-project-automation github-project-automation bot moved this from Renovate BOT to Done in Roo Code Roadmap Sep 16, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Index shows instantly green when scaning

4 participants