-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: log out from cloud when resetting extension state #8312
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
When users click the Reset button in settings, they are now automatically logged out from Roo Code Cloud to ensure a complete reset of the extension state. This prevents any lingering cloud authentication after reset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review initiated: evaluating my own code like a mirror debugging a mirror, and somehow still finding nits.
src/core/webview/ClineProvider.ts
Outdated
| } | ||
|
|
||
| // Log out from cloud if authenticated | ||
| if (CloudService.hasInstance() && CloudService.instance.isAuthenticated()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] Consider using hasActiveSession() instead of isAuthenticated() to decide whether to logout. This better reflects the condition that a session exists and avoids coupling to auth semantics that may require initialization states.
| if (CloudService.hasInstance() && CloudService.instance.isAuthenticated()) { | |
| if (CloudService.hasInstance() && CloudService.instance.hasActiveSession()) { |
src/core/webview/ClineProvider.ts
Outdated
| } | ||
|
|
||
| // Log out from cloud if authenticated | ||
| if (CloudService.hasInstance() && CloudService.instance.isAuthenticated()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (CloudService.hasInstance() && CloudService.instance.isAuthenticated()) { | |
| if (CloudService.hasInstance()) { |
Summary
When users click the Reset button in the extension settings, they are now automatically logged out from Roo Code Cloud to ensure a complete reset of the extension state.
Changes
resetState()method inClineProvider.tsTesting
Context
This change was requested via Slack to ensure users are completely logged out of cloud when they reset their extension settings, preventing any lingering cloud authentication after reset.
Implementation Details
The implementation:
Future Improvements
As suggested by the code review:
Important
Adds cloud logout to
resetState()inClineProvider.ts, ensuring users are logged out when resetting extension state, with error handling to continue reset if logout fails.resetState()inClineProvider.tsto ensure users are logged out when resetting extension state.This description was created by
for 4aa549a. You can customize this summary. It will automatically update as commits are pushed.