Skip to content

Conversation

mabaasit
Copy link
Collaborator

@mabaasit mabaasit commented Oct 2, 2025

Description

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the fix label Oct 2, 2025
@mabaasit mabaasit marked this pull request as ready for review October 2, 2025 13:45
@mabaasit mabaasit requested a review from a team as a code owner October 2, 2025 13:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Clears AttemptStateMap after successful Atlas sign-in and Generative AI opt-in to prevent stale attempt state from persisting, and (possibly unintentionally) makes getAttempt internal by removing its export.

  • Add AttemptStateMap.clear() after successful sign-in flow
  • Add AttemptStateMap.clear() after successful opt-in flow
  • Removed export from getAttempt, changing its visibility (potential API change)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/atlas-service/src/store/atlas-signin-reducer.ts Clear AttemptStateMap post successful sign-in; removed export from getAttempt
packages/compass-generative-ai/src/store/atlas-optin-reducer.ts Clear AttemptStateMap post successful opt-in

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

export let attemptId = 0;

export function getAttempt(id?: number | null): AttemptState {
function getAttempt(id?: number | null): AttemptState {
Copy link
Preview

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

[nitpick] Removing the export from getAttempt changes it from a public to a module-private function, which may break existing imports if it was used elsewhere. If this was intentional, document the change or update callers; if unintentional, restore the export keyword.

Suggested change
function getAttempt(id?: number | null): AttemptState {
export function getAttempt(id?: number | null): AttemptState {

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant