Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jun 11, 2025

Fixes #4429

Description

This PR adds an indexing status badge to the chat view, providing users with real-time feedback on the status of codebase indexing. The badge indicates whether indexing is in progress, completed, or has failed, and includes a tooltip with more detailed information.

Changes Made

  • webview-ui/src/components/chat/IndexingStatusBadge.tsx: Created a new component to display the indexing status. It includes a status dot, a progress ring for in-progress states, and a tooltip for detailed status messages.
  • webview-ui/src/components/chat/ChatView.tsx: Integrated the IndexingStatusBadge into the chat text area.
  • webview-ui/src/components/chat/ChatTextArea.tsx: Added the IndexingStatusDot component next to the other action buttons in the text area.
  • webview-ui/src/App.tsx: Implemented the onNavigateToSettings handler to allow users to click the badge and be taken to the relevant experimental settings section.

Testing

  • Manually tested the indexing status badge in the following states:
    • not_started
    • in_progress
    • done
    • failed
  • Verified that the tooltip displays the correct information for each status.
  • Confirmed that clicking the badge navigates to the 'Experimental' settings tab.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated (if needed)
  • No breaking changes
indexing.notification.mp4

Important

Add indexing status badge to chat view with localization and testing support.

  • UI Components:
    • Add IndexingStatusBadge.tsx to display indexing status with a dot, progress ring, and tooltip.
    • Integrate IndexingStatusBadge into ChatView.tsx and ChatTextArea.tsx.
  • Functionality:
    • Implement onNavigateToSettings in App.tsx to navigate to settings on badge click.
    • Add IndexingStatus and IndexingStatusUpdateMessage interfaces in ExtensionMessage.ts.
  • Testing:
    • Add tests for IndexingStatusBadge in IndexingStatusBadge.test.tsx.
    • Update ChatTextArea.test.tsx to clear mock calls related to IndexingStatusBadge.
  • Localization:
    • Update chat.json in 20 language files to include indexing status translations.
  • Misc:
    • Add useTooltip hook in useTooltip.ts for tooltip management.

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

@hannesrudolph hannesrudolph requested review from cte, jr and mrubens as code owners June 11, 2025 00:19
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jun 11, 2025
@daniel-lxs
Copy link
Member

Looking at the changes in App.tsx, the onNavigateToSettings prop name suggests it could navigate to any settings section, but the implementation is hardcoded to navigate to the 'experimental' section. Consider either:

  1. Renaming it to be more specific (e.g., onNavigateToExperimentalSettings), or
  2. Making it more generic by accepting a section parameter: onNavigateToSettings={(section) => { switchTab('settings'); setCurrentSection(section); }}

This would make the component more reusable if other features need to navigate to different settings sections.

hannesrudolph added a commit that referenced this pull request Jun 11, 2025
- Fixed useEffect dependency array by removing tooltipTimeout
- Internationalized all user-facing strings with translation keys
- Moved IndexingStatus types to shared/ExtensionMessage.ts
- Created reusable useTooltip hook for tooltip management
- Memoized progress calculation with useMemo
- Added comprehensive test suite with 10 tests

All review comments from PR #4532 have been addressed.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 11, 2025
@hannesrudolph
Copy link
Collaborator Author

All review feedback addressed. Tests passing.

@hannesrudolph
Copy link
Collaborator Author

Fixed failing CI checks:

  • Added missing translations for all locales (placeholder English values)
  • All tests passing
  • Translation check now passes

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 11, 2025
@hannesrudolph
Copy link
Collaborator Author

@daniel-lxs I think we've got it!?

@daniel-lxs daniel-lxs moved this from Triage to Issue [Unassigned] in Roo Code Roadmap Jun 11, 2025
@daniel-lxs daniel-lxs moved this from Issue [Unassigned] to PR [Needs Prelim Review] in Roo Code Roadmap Jun 11, 2025
@dosubot dosubot bot removed the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jun 12, 2025
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 12, 2025
daniel-lxs and others added 3 commits June 12, 2025 12:56
- Fixed useEffect dependency array by removing tooltipTimeout
- Internationalized all user-facing strings with translation keys
- Moved IndexingStatus types to shared/ExtensionMessage.ts
- Created reusable useTooltip hook for tooltip management
- Memoized progress calculation with useMemo
- Added comprehensive test suite with 10 tests

All review comments from PR #4532 have been addressed.
Added placeholder translations for all locales to fix CI checks.
These will need to be properly translated by native speakers.
hannesrudolph and others added 4 commits June 12, 2025 12:58
- Clear postMessage mock calls in ChatTextArea test before checking for no calls
- This prevents IndexingStatusBadge's requestIndexingStatus call from affecting the test
- All tests now passing locally
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jun 12, 2025
@mrubens
Copy link
Collaborator

mrubens commented Jun 12, 2025

Hmm, it's very visually prominent in indexing mode and doesn't look that much like the rest of the UI. Think we can at least get rid of the yellow ring?

@daniel-lxs
Copy link
Member

@mrubens
I removed the ring and the color:
image

Now the color of the status only appears on hover:
image

Let me know what you think

@hannesrudolph
Copy link
Collaborator Author

@daniel-lxs is not indexed does it show the color (without having to hover) while its indexing and the progress ring? How about when there is an error, does it show the color red without having to hover?

@daniel-lxs
Copy link
Member

@hannesrudolph
It won't show any color if it's not hovered to make it less prominent.

But we could also pick less saturated colors.

What do you think?

@hannesrudolph
Copy link
Collaborator Author

Sure less saturated would work. I think its important that the user knows if indexing is working, not working, or in progress is all..

@daniel-lxs
Copy link
Member

@hannesrudolph
Not hovered:
image

On hover:
image

@hannesrudolph
Copy link
Collaborator Author

I like that! and is there still a progress ring for when its yellow (indexing)?

@daniel-lxs
Copy link
Member

@hannesrudolph

No ring at all, just a slightly pulsating yellow dot when it's indexing

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mrubens mrubens merged commit bde7a7b into main Jun 13, 2025
9 checks passed
@mrubens mrubens deleted the 4429-claude-code branch June 13, 2025 01:56
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 13, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 13, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 13, 2025
cte pushed a commit that referenced this pull request Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add Indexing Status Badge to Chat View

4 participants