Skip to content

Conversation

@grvgoel81
Copy link
Contributor

@grvgoel81 grvgoel81 commented Sep 2, 2025

Description

  1. Remove metametrics: https://consensyssoftware.atlassian.net/browse/SL-128
  2. Update change password screen: https://consensyssoftware.atlassian.net/browse/SL-128

Changelog

CHANGELOG entry: 1) Remove metametrics: https://consensyssoftware.atlassian.net/browse/SL-128
2) Update change password screen: https://consensyssoftware.atlassian.net/browse/SL-128

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

old_flow.mp4

After

New_flow.mp4
Screen.Recording.2025-09-03.at.3.45.30.PM.mov

password

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2025

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@grvgoel81 grvgoel81 self-assigned this Sep 2, 2025
@github-actions github-actions bot added the size-M label Sep 2, 2025
@grvgoel81 grvgoel81 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Sep 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: e167680
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ce85953e-c095-4e0b-bda4-e54aebb18cf0

Note

  • You can rerun any failed steps by opening the Bitrise build, tapping Rebuild on the upper right then Rebuild unsuccessful Workflows
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@github-actions github-actions bot added size-L and removed size-M labels Sep 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 81e5d5f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ac99ba87-c7f9-452f-97c1-7d5a3cdc4118

Note

  • You can rerun any failed steps by opening the Bitrise build, tapping Rebuild on the upper right then Rebuild unsuccessful Workflows
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

"createDataDeletionTask": [MockFunction],
"createEventBuilder": [MockFunction],
"enable": [MockFunction],
"enableSocialLogin": undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

why its not a mockFunction like rest ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved

* @returns Boolean indicating if MetaMetrics is enabled or disabled
*/
isEnabled = () => this.enabled;
isEnabled = () => this.isSocialLoginEnabled || this.enabled;
Copy link

Choose a reason for hiding this comment

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

Bug: Metrics Enablement Inconsistency

The isEnabled() method now returns true if any metrics (social login or general) are enabled. This change could inadvertently enable all metrics tracking, potentially violating user privacy if a user opted out of general metrics. It also creates an inconsistency where isEnabled() might report metrics are active, but actual event tracking (which still checks only this.enabled) won't occur if only social login metrics are enabled.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We always reset isSocialLoginEnabled to false when user start general (srp) login flow, so it wont create any issues.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add that to the description?

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Metrics Reporting Inconsistency

The isEnabled() method now combines isSocialLoginEnabled and enabled with an OR operator. This conflates two distinct metrics states, causing isEnabled() to report metrics as active even when regular metrics are disabled. This creates an inconsistency with trackEvent(), which relies solely on this.enabled, resulting in isEnabled() reporting active metrics while no events are actually tracked.

app/core/Analytics/MetaMetrics.ts#L659-L660

*/
isEnabled = () => this.isSocialLoginEnabled || this.enabled;

app/core/Analytics/MetaMetrics.ts#L725-L729

* .addSensitiveProperties({ sensitiveProp: 'value' })
* .build());
*
* @param event - Analytics event built with {@link MetricsEventBuilder}
* @param saveDataRecording - param to skip saving the data recording flag (optional)

Fix in Cursor Fix in Web


const { loading, isSelected, password, confirmPassword } = this.state;
const passwordsMatch = password !== '' && password === confirmPassword;
const canSubmit = passwordsMatch && isSelected;
const canSubmit = passwordsMatch;
Copy link

Choose a reason for hiding this comment

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

Bug: Inconsistent Form Validation and User Experience

The canSubmit logic was simplified, removing the isSelected checkbox requirement from form submission for all users. This creates an inconsistent user experience for SRP users, who see a password recovery warning checkbox that appears required but isn't enforced on submission. Further, onPressCreate's canSubmit check omits the MIN_PASSWORD_LENGTH validation present in renderContent, potentially enabling the submit button when the password is too short.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Code outdated

canSubmit = passwordsMatch;
} else {
canSubmit = passwordsMatch && isSelected;
}
Copy link

Choose a reason for hiding this comment

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

Bug: OAuth Password Validation Mismatch

The ChoosePassword component has inconsistent password validation for OAuth users. The onPressCreate method's canSubmit check only verifies matching passwords, while the renderContent method's canSubmit for the UI button also requires the minimum password length. This creates a confusing user experience where the button state doesn't accurately reflect submission requirements.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The button activates only after minimum password length condition meets.

@sonarqubecloud
Copy link

Copy link
Contributor

@himanshuchawla009 himanshuchawla009 left a comment

Choose a reason for hiding this comment

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

lgtm, some tests are duplicate and needs better description. We can improve it in upcoming PR.

@grvgoel81 grvgoel81 requested a review from tommasini September 12, 2025 15:17
@grvgoel81 grvgoel81 added this pull request to the merge queue Sep 13, 2025
Merged via the queue into main with commit 3433826 Sep 13, 2025
86 of 87 checks passed
@grvgoel81 grvgoel81 deleted the feat-SL-128_remove_metametrics_screen branch September 13, 2025 07:53
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.56.0 Issue or pull request that will be included in release 7.56.0 size-XL team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants