Skip to content

Fix menu breaking when Roo is moved between primary and secondary sidebars #4045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

chrarnoldus
Copy link

@chrarnoldus chrarnoldus commented May 27, 2025

Description

Hello Roo Team! We changed this on the Kilo side and thought it might be useful to you!

The menu buttons (Settings etc.) stop working when Roo is moved between the primary and secondary sidebars. This is because ClineProvider is prematurely disposed in that case.

This change prevents the ClineProvider from being disposed when hosted in a sidebar. It should still be disposed when hosted in a tab, because they have their own ClineProvider instance.

Found while investigating Kilo-Org/kilocode#502.

Test Procedure

  • Move the Roo Code window to the secondary sidebar (right click on icon or title -> Move To -> Secondary Sidebar)
  • The buttons on the top menu (Settings etc.) should still work

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.

Important

Fixes menu button functionality by preventing premature disposal of ClineProvider when Roo is moved between sidebars.

  • Behavior:
    • Prevents ClineProvider from being disposed when in sidebar mode in ClineProvider.ts.
    • Ensures ClineProvider is disposed only in tab mode.
  • Testing:
    • Move Roo to secondary sidebar and verify menu buttons work.
  • Misc:
    • Logs disposal actions in ClineProvider.ts.

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

…ebars

Hello Roo Team! We changed this on the Kilo side and thought it might be useful to you!

The menu buttons (Settings etc.) stop working when Roo is moved between the primary and secondary sidebars.
This is because ClineProvider is prematurely disposed in that case
This change prevents the ClineProvider from being disposed when hosted in a sidebar.
It should still be disposed when hosted in a tab, because they have their own ClineProvider instance.

Found while investigating Kilo-Org/kilocode#502.
@chrarnoldus chrarnoldus requested review from mrubens and cte as code owners May 27, 2025 15:19
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label May 27, 2025
@daniel-lxs daniel-lxs added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels May 28, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Preliminary Review] in Roo Code Roadmap May 28, 2025
Copy link
Collaborator

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

This looks good to me, it solves the issue.

I was concerned about ClineProvider never being disposed but according to my tests VSCode never disposes of ClineProvider if the sidebar is closed to keep the extension ready to be used.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 28, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Preliminary Review] to PR [Needs Review] in Roo Code Roadmap May 28, 2025
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.

Thanks!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 28, 2025
@mrubens mrubens merged commit 57038b7 into RooCodeInc:main May 28, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 28, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap May 28, 2025
@chrarnoldus chrarnoldus deleted the christiaan/dont-dispose-singleton-clineprovider-roo branch May 28, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer PR - Needs Review size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants