[LWDM] chore(analytics-consent): remove consentValidityDays and live-common - #20265
Conversation
There was a problem hiding this comment.
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
consentValidityDaysfrom theanalyticsOptInfeature-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. |
Web Tools Build Status
|
Rsdoctor Bundle Diff AnalysisFound 7 projects in monorepo, 7 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 desktop-mainPath:
📁 desktop-preloaderPath:
📁 desktop-rendererPath:
📁 desktop-webviewDappPreloaderPath:
📁 desktop-webviewPreloaderPath:
📁 mobilePath:
📁 desktop-workersPath:
Generated by Rsdoctor GitHub Action |
95dfa06 to
ccae87c
Compare
❌ Action Required: Monitored Files ChangedThe following files in monitored folders have been modified:
Action Required: Please rebase your branch against git rebase origin/develop |
|
ccae87c to
7821700
Compare
|
|
Closing — desktop/prune work deferred; stack ends at #20212 for now. |
|
Reopened — keeping as orphan (unstacked). Active stack tip is #20212; desktop/prune work deferred from the stack but PRs stay open. |
ba6c8ba to
915ec9e
Compare
915ec9e to
95820ef
Compare
95820ef to
a171069
Compare
a171069 to
5f4bdb2
Compare
5f4bdb2 to
2db8ead
Compare
There was a problem hiding this comment.
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.yamlcontains 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
consentValidityDayswere removed, but there is still at least one usage ine2e/desktop/tests/specs/send.tx.spec.ts(line ~603) whereanalyticsOptIn.paramsincludesconsentValidityDays. 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



✅ Checklist
npx changesetwas attached.consentValidityDaysare ignored (Zod strips unknown params)📝 Description
Stack layer 8 — prune after desktop migration (#20263).
Desktop and mobile already decide renewal from
policyVersionvia@features/flow-analytics-consent. This layer deletes the parallel timer-expiry path.Removed
consentValidityDaysfromanalyticsOptInFF schema/defaultslibs/ledger-live-common/src/analyticsConsent/(needsConsentRenewal, LLCresolveAnalyticsOptInParams, phase helpers)Kept on purpose
consentValidityDaysparam is ignoredanalyticsOptInParams(just FFpolicyVersionoverrides)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
Made with Cursor