Skip to content

[LWDM] chore(analytics-consent): remove consentValidityDays and live-common - #20265

Open
tonykhaov wants to merge 1 commit into
feat/desktop-LIVE-29592-analytics-consent-renewalfrom
chore/analytics-consent-LIVE-29592-remove-consent-validity-days
Open

[LWDM] chore(analytics-consent): remove consentValidityDays and live-common#20265
tonykhaov wants to merge 1 commit into
feat/desktop-LIVE-29592-analytics-consent-renewalfrom
chore/analytics-consent-LIVE-29592-remove-consent-validity-days

Conversation

@tonykhaov

@tonykhaov tonykhaov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • No user-facing behavior change if desktop ([LWD] feat(desktop): renew analytics consent from policyVersion #20263) and mobile already use the shared flow decision
    • Remote configs that still send consentValidityDays are ignored (Zod strips unknown params)
    • Confirm Developer QA screen no longer shows consent validity days
    • Confirm "Old consent" QA scenario stays Quiet (no timer expiry)

📝 Description

Stack layer 8 — prune after desktop migration (#20263).

Desktop and mobile already decide renewal from policyVersion via @features/flow-analytics-consent. This layer deletes the parallel timer-expiry path.

Removed

  1. consentValidityDays from analyticsOptIn FF schema/defaults
  2. Entire libs/ledger-live-common/src/analyticsConsent/ (needsConsentRenewal, LLC resolveAnalyticsOptInParams, phase helpers)
  3. App/test/e2e/QA references to validity days
  4. Stale flow README/package copy about rolling expiry / LLC desktop window

Kept on purpose

  • Flow test that proves a legacy consentValidityDays param is ignored
  • QA "Old consent" scenario (expects Quiet — documents no timer expiry)
  • Mobile test helper option name analyticsOptInParams (just FF policyVersion overrides)

Ticket note: No dedicated prune ticket found; tagged LIVE-29592. Original ticket still mentioned timer renewal — this PR is the intentional follow-up prune once apps share the version-only flow.

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Made with Cursor

Copilot AI review requested due to automatic review settings July 31, 2026 06:41
@live-github-bot live-github-bot Bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common labels Jul 31, 2026
@live-github-bot live-github-bot Bot changed the title chore(analytics-consent): remove consentValidityDays and LLC expiry path (LIVE-29592) [LWDM] chore(analytics-consent): remove consentValidityDays and LLC expiry path (LIVE-29592) Jul 31, 2026
@tonykhaov tonykhaov changed the title [LWDM] chore(analytics-consent): remove consentValidityDays and LLC expiry path (LIVE-29592) [LWDM] chore(analytics-consent): remove consentValidityDays and live-common Jul 31, 2026
@tonykhaov
tonykhaov marked this pull request as ready for review July 31, 2026 06:42
@tonykhaov
tonykhaov requested review from a team as code owners July 31, 2026 06:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR prunes the legacy “timer-based” analytics consent renewal path (consentValidityDays) now that desktop and mobile both rely on the shared @features/flow-analytics-consent decision based on policyVersion only.

Changes:

  • Removes consentValidityDays from the analyticsOptIn feature-flag schema/defaults and cleans up app/e2e/test usages.
  • Deletes the libs/ledger-live-common/src/analyticsConsent/ helpers (and their unit tests) that implemented rolling expiry / param resolution.
  • Updates documentation and copy to reflect version-driven consent renewal only, and keeps a regression test ensuring legacy params are ignored.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
shared/feature-flags/src/flags/team-engagement/analyticsOptIn.ts Drops consentValidityDays from the analytics opt-in FF params schema and defaults.
libs/ledger-live-common/src/analyticsConsent/index.ts Removes barrel exports for the deleted analytics consent helpers.
libs/ledger-live-common/src/analyticsConsent/analyticsOptInParams.ts Deletes the live-common remote-param merge/coercion helper (now handled in shared flow).
libs/ledger-live-common/src/analyticsConsent/analyticsOptInParams.test.ts Removes tests for the deleted live-common params resolver.
libs/ledger-live-common/src/analyticsConsent/analyticsConsentUtils.ts Deletes rolling-expiry + phase helpers that are no longer used.
libs/ledger-live-common/src/analyticsConsent/analyticsConsentUtils.test.ts Removes tests for the deleted expiry/phase helpers.
libs/ledger-live-common/.unimportedrc.json Removes the analyticsConsent entrypoint from unimported config after deletion.
features/flow/analytics-consent/src/utils/resolveAnalyticsOptInParams.test.ts Renames/clarifies the test asserting legacy/unknown params are ignored.
features/flow/analytics-consent/README.md Updates README to remove mention of the old rolling expiry path.
features/flow/analytics-consent/package.json Updates package description to remove “rolling consent expiry”.
e2e/desktop/tests/specs/send.tx.spec.ts Updates desktop E2E FF setup to stop passing consentValidityDays.
CODEOWNERS Removes ownership entry for the deleted live-common analyticsConsent folder.
apps/ledger-live-mobile/src/mvvm/features/AnalyticsConsentDrawer/tests/useAnalyticsConsentDrawerViewModel.test.ts Updates comment to remove outdated reference to needsConsentRenewal.
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/AnalyticsConsentOptInDevScreen.tsx Removes “consent validity days” display and associated parsing from the QA/dev screen.
apps/ledger-live-desktop/src/renderer/reducers/settings.test.ts Updates tracking selector tests to stop providing consentValidityDays.
apps/ledger-live-desktop/src/mvvm/features/AnalyticsConsentDialog/tests/useAnalyticsConsentDialogViewModel.test.ts Removes now-unused consentValidityDays setup in unit tests.
apps/ledger-live-desktop/src/mvvm/features/AnalyticsConsentDialog/integrations/AnalyticsConsentDialog.portfolio.integration.test.tsx Removes now-unused consentValidityDays setup in integration tests.
.changeset/swift-badgers-clear.md Adds a changeset for the removal/prune across affected packages/apps.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ❌ Failed
Native Storybook Build ✅ Deployed https://native-ui-storybook-qp4uhqti2-ledger-hq-prd.vercel.app
React Storybook Build ✅ Deployed https://react-ui-storybook-97i30pnvf-ledger-hq-prd.vercel.app

@live-github-bot

live-github-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Desktop Bundle Checks

Comparing 98ca8db against 5e31ac5.

✅ Previous issues have all been fixed.

Mobile Bundle Checks

Comparing 98ca8db against 078967a.

✅ Previous issues have all been fixed.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 7 projects in monorepo, 7 projects with changes.

📊 Quick Summary
Project Total Size Change
desktop-main 2.3 MB -
desktop-preloader 7.1 KB -
desktop-renderer 80.6 MB -
desktop-webviewDappPreloader 36.9 KB -
desktop-webviewPreloader 200.0 B -
mobile 261.4 MB -
desktop-workers 36.8 KB -
📋 Detailed Reports (Click to expand)

📁 desktop-main

Path: rsdoctor/desktop-main/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.3 MB - -
📄 JavaScript 2.2 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 135.3 KB - -

📁 desktop-preloader

Path: rsdoctor/desktop-preloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 7.1 KB - -
📄 JavaScript 5.3 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 1.8 KB - -

📁 desktop-renderer

Path: rsdoctor/desktop-renderer/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 80.6 MB - -
📄 JavaScript 29.3 MB - -
🎨 CSS 183.1 KB - -
🌐 HTML 1.8 KB - -
📁 Other Assets 51.2 MB - -

📁 desktop-webviewDappPreloader

Path: rsdoctor/desktop-webviewDappPreloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 36.9 KB - -
📄 JavaScript 36.9 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 desktop-webviewPreloader

Path: rsdoctor/desktop-webviewPreloader/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 200.0 B - -
📄 JavaScript 200.0 B - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 261.4 MB - -
📄 JavaScript 110.4 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 151.0 MB - -

📁 desktop-workers

Path: rsdoctor/desktop-workers/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 36.8 KB - -
📄 JavaScript 36.8 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

ysitbon
ysitbon previously approved these changes Jul 31, 2026
Copilot AI review requested due to automatic review settings July 31, 2026 09:23
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from 95dfa06 to ccae87c Compare July 31, 2026 09:24
@github-actions

Copy link
Copy Markdown
Contributor

❌ Action Required: Monitored Files Changed

The following files in monitored folders have been modified:

  • .github/workflows/test-mobile-e2e-reusable.yml

Action Required: Please rebase your branch against develop to ensure consistency:

git rebase origin/develop

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ E2E tests are required

Changes detected require e2e testing before merge (even before asking for any review).

🖥️ Desktop

-> Run Desktop E2E

  • Select "Run workflow"
  • Branch: chore/analytics-consent-LIVE-29592-remove-consent-validity-days
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: chore/analytics-consent-LIVE-29592-remove-consent-validity-days
  • Device: nanoX

Copilot AI review requested due to automatic review settings July 31, 2026 09:35
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from ccae87c to 7821700 Compare July 31, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

@sonarqubecloud

Copy link
Copy Markdown

@tonykhaov

Copy link
Copy Markdown
Contributor Author

Closing — desktop/prune work deferred; stack ends at #20212 for now.

@tonykhaov tonykhaov closed this Aug 3, 2026
@tonykhaov tonykhaov reopened this Aug 3, 2026
@tonykhaov

Copy link
Copy Markdown
Contributor Author

Reopened — keeping as orphan (unstacked). Active stack tip is #20212; desktop/prune work deferred from the stack but PRs stay open.

Copilot AI review requested due to automatic review settings August 3, 2026 08:24
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from ba6c8ba to 915ec9e Compare August 3, 2026 08:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 3, 2026 08:39
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from 915ec9e to 95820ef Compare August 3, 2026 08:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 3, 2026 12:32
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from 95820ef to a171069 Compare August 3, 2026 12:32
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from a171069 to 5f4bdb2 Compare August 3, 2026 12:33
@tonykhaov
tonykhaov removed the request for review from a team August 3, 2026 12:34
@tonykhaov
tonykhaov force-pushed the chore/analytics-consent-LIVE-29592-remove-consent-validity-days branch from 5f4bdb2 to 2db8ead Compare August 3, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Copilot AI review requested due to automatic review settings August 3, 2026 12:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (2)

pnpm-lock.yaml:41445

  • pnpm-lock.yaml contains a duplicated snapshot entry for @babel/plugin-transform-private-methods@7.27.1 (same key repeated twice). This makes the lockfile ambiguous and can lead to unstable installs or parser issues; it should appear only once.
    .changeset/swift-badgers-clear.md:9
  • The PR description says app/test/e2e references to consentValidityDays were removed, but there is still at least one usage in e2e/desktop/tests/specs/send.tx.spec.ts (line ~603) where analyticsOptIn.params includes consentValidityDays. Consider removing that field there as well to keep the codebase and PR description consistent.

Remove analytics consentValidityDays and the unused live-common consent expiry helpers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants