Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 12, 2026

Related GitHub Issue

Closes: #10625

Description

This PR attempts to address Issue #10625 by implementing the "Agent is working" activity indicator for the Roo Code sidebar icon.

Based on the feedback from @mdziekon, I investigated VSCode's internal activity interfaces (BaseBadge, IconBadge, ProgressBadge) and discovered that while these are not directly exposed to extensions, VSCode's vscode.window.withProgress API with a view-specific location ({ viewId: "..." }) CAN show a spinning progress indicator on the activity bar icon. This provides much better UX than a numeric badge.

Key implementation details:

  • Created new ActivityIndicator class in src/core/webview/ActivityIndicator.ts that manages the progress indicator state
  • Uses vscode.window.withProgress with location: { viewId } to show progress on the sidebar icon
  • Integrates with ClineProvider task lifecycle events:
    • onTaskActive shows the indicator
    • onTaskIdle, onTaskCompleted, onTaskAborted hide the indicator
  • Uses a promise-based pattern where show() starts an indeterminate progress that continues until hide() resolves the promise
  • Properly handles edge cases like multiple show/hide calls and re-showing after hiding

Test Procedure

  1. Unit tests added: 12 new tests in src/core/webview/__tests__/ActivityIndicator.spec.ts

    • Run with: cd src && npx vitest run core/webview/__tests__/ActivityIndicator.spec.ts
    • All 12 tests pass
  2. Existing tests verified: ClineProvider tests still pass

    • Run with: cd src && npx vitest run core/webview/__tests__/ClineProvider.spec.ts
    • All 89 tests pass
  3. Manual testing: Start a task in Roo Code and observe the spinning progress indicator on the sidebar icon

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This implementation follows the suggestion from @mdziekon to investigate VSCode's activity interfaces. The withProgress API provides a native VSCode experience with the familiar spinning indicator, making it clear to users when the agent is actively working.

Feedback and guidance are welcome!


Important

Adds ActivityIndicator to show a progress indicator on the sidebar icon during task activity, integrated with ClineProvider and tested with new unit tests.

  • Behavior:
    • Adds ActivityIndicator class in ActivityIndicator.ts to manage sidebar icon progress indicator using vscode.window.withProgress.
    • Integrates ActivityIndicator with ClineProvider in ClineProvider.ts to show/hide indicator on task lifecycle events (onTaskActive, onTaskIdle, onTaskCompleted, onTaskAborted).
    • Handles multiple show/hide calls and re-showing after hiding.
  • Testing:
    • Adds 12 unit tests in ActivityIndicator.spec.ts to test show(), hide(), isActive(), and dispose() methods.
    • Verifies ClineProvider tests still pass.

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

This implements the "Agent is working" indicator feature for the
Roo Code sidebar icon using VSCode's withProgress API with a
view-specific location. The indicator shows a spinning progress
icon when a task is actively processing.

Key changes:
- New ActivityIndicator class managing progress indicator state
- Integration with ClineProvider task lifecycle events
- Comprehensive unit tests (12 tests passing)

Closes #10625
@roomote
Copy link
Contributor Author

roomote bot commented Jan 12, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This commit correctly reverts the unsupported tooltip (title: "Roo is working...") from the activity indicator, as VSCode's withProgress API doesn't support tooltips when using view-specific locations. The corresponding test was appropriately removed.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 12, 2026
@mdziekon
Copy link

@roomote

I can confirm that with this branch I can see the progress indicating badge, however it's not well implemented.
I could not see it when I started a task (in Orchestrator or Code mode), and when the task was progressing. However, when I cancelled task's execution and send a user message, now the progress icon has shown up. I think the triggers for the indicator might be incorrectly attached.

@roomote
Copy link
Contributor Author

roomote bot commented Jan 12, 2026

Fixaroo Clock   See task on Roo Cloud

Fixed the activity indicator triggers. The issue was that TaskActive is only emitted when transitioning from idle back to active, not when a task first starts. Added activityIndicator.show() to the TaskStarted event handler so the indicator shows immediately when a task begins.

View commit | Revert commit

The activity indicator was only showing when transitioning from an idle
state back to active (TaskActive event), but TaskActive was not emitted
when a task first started - it was only emitted after the user responded
to an ask after the task went idle.

This fix shows the activity indicator when TaskStarted fires, which
happens when the task loop begins. This ensures the indicator shows
immediately when the user starts a task or the agent begins processing.
@mdziekon
Copy link

@roomote

I've tested again and can confirm that indeed starting a task now triggers the progress icon, fantastic.

Scenarios testes

  • Start a task in Orchestrator mode, simple task with some subtasks.
    • Check if starting the main task shows the indicator (pass)
    • Wait for a subtask to be delegated and started, check if indicator is still visible (pass)
    • Wait for a subtask to finish, check if indicator is still visible (pass)
    • Interrupt another subtask, check if indicator disappears (pass)
    • Resume the task without user messages, check if indicator is brought back (pass)
    • Interrupt another subtask, send a user message, see if indicator is brought back (pass)
    • Wait for all subtasks to finish, check if indicator disappears as soon as the parent task is done (pass)
  • Start a new task - a simple code change in Code mode, no subtasks created
    • Check if starting the task shows the indicator (pass)
    • Wait for task to be finished, check if indicator disappears (pass)

Found problems

I've noticed two small potential issues (however, I'd consider them to be "non-blockers"):

  • The progress icon does not have any accessible tooltip text attached to it. I know that other ActivityBar badges sometimes have some additional info in the tooltip, but I'm not sure if it's possible to attach any tooltip text using the vscode.window.withProgress API. Please investigate, and if possible, add previously suggested tooltip like "Roo is working...".
  • I've noticed that when orchestrator task transitions from main parent task into a newly created subtask, the indicating icon disappears for a moment and reappears when the subtask starts actual work (an API request is in progress). Same thing happen when subtask finishes its job and it transitions back to the parent task. While this is a non-issue for me, it's just for a brief moment, maybe there's a better way and the indicator can be maintained continously?

@roomote
Copy link
Contributor Author

roomote bot commented Jan 12, 2026

Fixaroo Clock   See task on Roo Cloud

Added tooltip text "Roo is working..." to the activity indicator. All local checks passed.

Regarding the transition flicker during orchestrator subtask transitions: this would require changes to the task lifecycle management to prevent hiding the indicator during delegation. Since it's described as a non-blocker and only visible briefly, the change is deferred.

View commit | Revert commit

Adds "Roo is working..." tooltip text to the progress indicator on the
sidebar icon. This provides accessible context when hovering over the
progress indicator.

Also adds a test to verify the tooltip text is included in the
progress options.
@mdziekon
Copy link

@roomote

Right, I've tested the tooltip change, and it does not work - no tooltip is present. Looking at the extensions API, I suspect this is unfortunately not supported, therefore should be reverted.

@roomote
Copy link
Contributor Author

roomote bot commented Jan 12, 2026

Fixaroo Clock   See task on Roo Cloud

Reverted the unsupported tooltip feature. All local checks passed.

View commit | Revert commit

The VSCode extensions API does not support tooltips for withProgress
view indicators. Confirmed by manual testing that the title property
has no visible effect.
@mdziekon
Copy link

@roomote

Ok, the PR still works as previously tested. I'm happy with the results, so now I'll wait for the maintainers response on this.

@roomote
Copy link
Contributor Author

roomote bot commented Jan 12, 2026

Fixaroo Clock   See task on Roo Cloud

Thanks for the confirmation! No issues were identified that need fixing. The PR reviewer also confirmed "Review complete. No issues found."

The PR is ready for maintainer review.

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

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add "Agent is working" indicator to the RooCode icon in the sidebar

4 participants