Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Jun 17, 2025

Running into an issue where the initial session refresh is showing up as non-compliant. This fixes it by adding a new state.


Important

Add refreshing-session state to handle session refreshes in AuthService, update CloudService and MdmService for compliance.

  • Behavior:
    • Add refreshing-session state to AuthService in AuthService.ts to handle initial session refreshes.
    • Update CloudService in CloudService.ts to listen for refreshing-session events.
    • Modify MdmService in MdmService.ts to consider refreshing-session as compliant.
  • Functions:
    • Add isRefreshingSession() to AuthService and CloudService.
  • Tests:
    • Add tests for refreshing-session state in AuthService.test.ts.
    • Update CloudService.test.ts to test isRefreshingSession() delegation.
    • Update MdmService.spec.ts to test compliance with refreshing-session.

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

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 17, 2025
this.fetchUserInfo()
} catch (error) {
this.log("[auth] Failed to refresh session", error)
throw error
Copy link
Contributor

Choose a reason for hiding this comment

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

In the refreshSession method, consider resetting the state (e.g. to 'inactive-session') in the catch block so that a failed refresh doesn't leave the state stuck in 'refreshing-session'. Also, instead of hardcoding 'refreshing-session' as the previous state when emitting 'active-session', use the original previousState for better context.

@dosubot dosubot bot added lgtm This PR has been approved by a maintainer bug Something isn't working labels Jun 17, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 17, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Jun 18, 2025
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 18, 2025
@mrubens mrubens closed this Jun 23, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 23, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Draft / In Progress 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.

4 participants