Skip to content

Conversation

@jr
Copy link
Collaborator

@jr jr commented May 29, 2025

This is incremental, but slightly reduces the surface area between the core extension and cloud.

  • Remove AuthService callbacks, add user-info event
  • Store userInfo on AuthService and fetch it when sessions go active
  • Simplify CloudService callbacks to just stateChanged
  • Add cloudUserInfo to state and remove authenticatedUser message

Important

Simplifies CloudService callbacks and updates user info handling across components and state management.

  • Behavior:
    • Simplifies CloudService callbacks to only use stateChanged in CloudService.ts.
    • Removes userChanged and settingsChanged callbacks from types.ts.
    • Adds user-info event to AuthServiceEvents in AuthService.ts.
    • Stores userInfo in AuthService and fetches it when sessions activate.
    • Removes authenticatedUser message handling in webviewMessageHandler.ts.
  • State Management:
    • Adds cloudUserInfo to ExtensionState in ExtensionMessage.ts and ExtensionStateContext.tsx.
    • Updates ClineProvider.ts to include cloudUserInfo in state management.
  • UI Components:
    • Updates App.tsx to use cloudUserInfo for AccountView.
    • Removes userInfo state from App.tsx.
  • Tests:
    • Updates tests in CloudService.test.ts and ClineProvider.test.ts to reflect callback changes.
    • Adds tests for cloudUserInfo in ExtensionStateContext.test.tsx.

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

- Remove AuthService callbacks, add user-info event
- Store userInfo on AuthService and fetch it when sessions go active
- Simplify CloudService callbacks to just stateChanged
- Add cloudUserInfo to state and remove authenticatedUser message
@jr jr requested review from cte and mrubens as code owners May 29, 2025 04:03
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels May 29, 2025
Copy link
Collaborator

@cte cte left a comment

Choose a reason for hiding this comment

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

Nice cleanup - looks great!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 29, 2025
@jr jr merged commit d4c00e5 into main May 29, 2025
18 checks passed
@jr jr deleted the jr/roo-code-cloud-userinfo-cleanup branch May 29, 2025 04:15
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap May 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 29, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request Jun 13, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants