Fix Dragging Roo to the sides leaves blank space or makes buttons unresponsive (#3729) #4108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #3729
Description
This PR resolves issues where dragging Roo to the left or right side resulted in blank spaces or unresponsive buttons.
Cause: Dragging Roo triggered an asynchronous
disposeof the old webview's provider while a new webview simultaneously invokedresolveWebviewView.disposemeantresolveWebviewViewcould complete beforeview.disposeexecuted, resulting in blank spaces.disposeimmediately removed the provider fromactiveInstances, leading to unresponsive buttons. These issues could occur concurrently.Solution: Introduced a
ComponentManagerto immediately mark a provider as disposed, even for asyncdisposecalls.resolveWebviewViewnow adds the provider toactiveInstancesand recreates theComponentManagerif it was previously disposed.Test Procedure
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Fixes blank spaces and unresponsive buttons in Roo by introducing
ComponentManagerfor component lifecycle management inClineProvider.ClineProvider.ComponentManagerto manage lifecycle ofWorkspaceTracker,McpHub, andCustomModesManager.ClineProviderto useComponentManagerfor component management.dispose()inClineProviderto handle async disposal correctly.resolveWebviewView()recreatesComponentManagerif disposed.ClineProvider.test.tsto mockComponentManagerand verify component lifecycle management.This description was created by
for aabd0475b3afd44d6c8f927fd4651f3c3bd7c846. You can customize this summary. It will automatically update as commits are pushed.