Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Sep 14, 2025

After logging out we're not able to fetch the roomote control settings and we were short-circuiting the disconnect logic in the case that the setting fetch failed.


Important

Disable remote control on logout by updating BridgeOrchestrator and ClineProvider logic and adding tests.

  • Behavior:
    • BridgeOrchestrator.isEnabled() now returns false if user is null or remoteControlEnabled is false.
    • ClineProvider.remoteControlEnabled() disconnects BridgeOrchestrator if enabled is false or userInfo is null.
    • extension.ts calls provider.remoteControlEnabled(false) on logout.
  • Tests:
    • Added extension.spec.ts to test authStateChangedHandler calls BridgeOrchestrator.disconnect() on logout.
  • Misc:
    • Updated logging messages in extension.ts for clarity.

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

@cte cte requested review from jr and mrubens as code owners September 14, 2025 16:51
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 14, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and found that they correctly implement the feature to disable remote control on logout. The code is clear with good comments. I have a few suggestions for improvement, particularly around type safety.

public static async connectOrDisconnect(
userInfo: CloudUserInfo | null,
remoteControlEnabled: boolean | undefined,
userInfo: CloudUserInfo,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional? The connectOrDisconnect() method now requires a non-null userInfo parameter, but it's being called from ClineProvider.remoteControlEnabled() where userInfo could be null. This type mismatch could lead to runtime errors.

Consider either:

  1. Making userInfo nullable here: userInfo: CloudUserInfo | null
  2. Or ensuring all callers check for null before calling this method

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are no type mismatches; the build would fail otherwise.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 14, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 14, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 14, 2025
@cte cte merged commit b309a6a into main Sep 14, 2025
10 of 12 checks passed
@cte cte deleted the cte/disable-roomote-control-on-logout branch September 14, 2025 17:47
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 14, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Sep 14, 2025
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. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.