Skip to content

[LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) - #20266

Open
tonykhaov wants to merge 1 commit into
feat/flow-LIVE-29595-stored-policy-inspectorfrom
feat/desktop-LIVE-29592-analytics-consent-qa
Open

[LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592)#20266
tonykhaov wants to merge 1 commit into
feat/flow-LIVE-29595-stored-policy-inspectorfrom
feat/desktop-LIVE-29592-analytics-consent-qa

Conversation

@tonykhaov

@tonykhaov tonykhaov commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests. View-model tests cover quiet/major/minor/no-consent/reset/flag-off/preview-in-place paths; UI layout not snapshot-tested.
  • Impact of the changes:
    - Developer → Analytics consent QA screen (desktop Settings → Developer)
    - Dialog preview mounts in place on desktop QA screen (no portfolio navigation)
    - Collapses deprecated DANGEROUSLY_* QA settings helpers into setAnalyticsConsentInfo

📝 Description

Upgrade the desktop analytics consent QA debug screen to scenario parity with mobile (scenario groups, inspector fields, verdicts, preview-in-place via forceOffer).

Depends on shared inspector helper in #20330.

❓ 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)

Copilot AI review requested due to automatic review settings July 31, 2026 07:00
@live-github-bot live-github-bot Bot added desktop Has changes in LLD translations Translation files have been touched labels Jul 31, 2026
@tonykhaov tonykhaov changed the title feat(desktop): upgrade analytics consent QA screen (LIVE-29592) [LWM] feat(desktop): upgrade analytics consent QA screen Jul 31, 2026
@live-github-bot live-github-bot Bot changed the title [LWM] feat(desktop): upgrade analytics consent QA screen [LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ✅ Deployed https://web-tools-hcdhqwqx1-ledger-hq-prd.vercel.app
Native Storybook Build ✅ Deployed https://native-ui-storybook-r294wqb4e-ledger-hq-prd.vercel.app
React Storybook Build ✅ Deployed https://react-ui-storybook-b7ovu7ft4-ledger-hq-prd.vercel.app

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

Upgrades the Ledger Live Desktop analytics consent QA/debug screen to align with the shared @features/flow-analytics-consent/debug scenarios and inspection helpers, matching the mobile QA tool behavior while keeping the Lumen Web UI.

Changes:

  • Replaces the legacy desktop QA screen logic with a dedicated MVVM-style view-model backed by shared consent-debug helpers (scenarios, verdicts, baselines, reasons).
  • Reworks the desktop QA screen UI to add scenario presets, an Inspect tab (stored state + remote config + user prefs), feature-flag override, and reset.
  • Removes the now-unused analyticsConsentOptInQa i18n keys from all desktop locales and drops deprecated QA-only settings actions.

Reviewed changes

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

Show a summary per file
File Description
apps/ledger-live-desktop/static/i18n/zh/app.json Removes analyticsConsentOptInQa locale strings (hardcoded English copy now used).
apps/ledger-live-desktop/static/i18n/tr/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/th/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/ru/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/pt-BR/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/ko/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/ja/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/fr/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/es/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/en/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/static/i18n/de/app.json Removes analyticsConsentOptInQa locale strings.
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/useAnalyticsConsentOptInQaViewModel.ts New shared-scenarios view-model (verdict/phase, baseline handling, overrides, reset, inspect fields).
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/index.tsx Updates the developer settings row to hardcoded copy and uses a Link to open the QA screen.
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/AnalyticsConsentOptInDevScreen.tsx Rebuilds the QA screen UI (scenario cards + inspect tab + reset + portfolio preview navigation).
apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/tests/useAnalyticsConsentOptInQaViewModel.test.ts Adds view-model tests covering key scenario/reset/flag-off behaviors.
apps/ledger-live-desktop/src/renderer/actions/settings.ts Removes deprecated QA-only analytics consent mutation helpers in favor of normal actions.
.changeset/calm-clouds-debug.md Adds a patch changeset for the desktop package.

Comment on lines +75 to +77
export function scenarioConfirmMessage(scenario: QaScenario): string {
return `Applies this preset.\n\n${scenario.summary}\n\nExpected: ${VERDICT_META[scenario.expected].title}.`;
}
@live-github-bot

live-github-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Desktop Bundle Checks

Comparing 0e28ccf against 36683be.

✅ Previous issues have all been fixed.

Mobile Bundle Checks

Comparing ecf4d17 against 5b20025.

✅ 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.7 MB -
desktop-webviewDappPreloader 36.9 KB -
desktop-webviewPreloader 200.0 B -
desktop-workers 36.8 KB -
mobile 261.5 MB -
📋 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.7 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 - -

📁 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 - -

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

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

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

Generated by Rsdoctor GitHub Action

Copilot AI review requested due to automatic review settings July 31, 2026 09:23
@tonykhaov
tonykhaov force-pushed the feat/desktop-LIVE-29592-analytics-consent-qa branch from 0c7a38e to 77b6694 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 17 out of 17 changed files in this pull request and generated no new comments.

Suppressed comments (10)

apps/ledger-live-desktop/static/i18n/de/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "Designumschalter",
        "desc" : "Zeigt ein schwebendes Overlay an, mit dem du schnell zwischen Designs umschalten kannst."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/es/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "Conmutador de tema",
        "desc" : "Muestra una superposición flotante con la que cambiar de tema rápidamente."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ko/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "테마 토글",
        "desc" : "테마를 빠르게 전환할 수 있도록 플로팅 오버레이를 표시합니다."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/pt-BR/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "Alternar tema",
        "desc" : "Exibir botão flutuante para alternar temas rapidamente."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/th/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "ปุ่มสลับธีม",
        "desc" : "แสดงโอเวอร์เลย์แบบลอยตัวเพื่อเปลี่ยนธีมได้อย่างรวดเร็ว"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/fr/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "Sélecteur de thème",
        "desc" : "Affichez une fenêtre flottante pour changer de thème rapidement."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ja/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "テーマ切り替え",
        "desc" : "テーマを素早く切り替えるためのフローティングオーバーレイを表示します。"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ru/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "Переключение темы",
        "desc" : "Отображать плавающий тумблер для быстрого переключения тем."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/tr/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "Tema Butonu",
        "desc" : "Temalar arasında hızlıca geçiş yapmak için bir küçük pencere gösterin."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/zh/app.json:5072

  • Per repo translation workflow guidelines, avoid editing non-English locale files (only apps/ledger-live-desktop/static/i18n/en/app.json should be changed). Please revert this locale change and let the localization sync handle key removals.
      "themeConsole" : {
        "title" : "主题切换",
        "desc" : "显示可快速切换主题的浮动覆盖。"
      },
      "devTools" : {

Copilot AI review requested due to automatic review settings July 31, 2026 09:35
@tonykhaov
tonykhaov force-pushed the feat/desktop-LIVE-29592-analytics-consent-qa branch from 77b6694 to 1dcc85e 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 17 out of 17 changed files in this pull request and generated no new comments.

Suppressed comments (10)

apps/ledger-live-desktop/static/i18n/zh/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "主题切换",
        "desc" : "显示可快速切换主题的浮动覆盖。"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/tr/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "Tema Butonu",
        "desc" : "Temalar arasında hızlıca geçiş yapmak için bir küçük pencere gösterin."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/th/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "ปุ่มสลับธีม",
        "desc" : "แสดงโอเวอร์เลย์แบบลอยตัวเพื่อเปลี่ยนธีมได้อย่างรวดเร็ว"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ru/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "Переключение темы",
        "desc" : "Отображать плавающий тумблер для быстрого переключения тем."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/pt-BR/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "Alternar tema",
        "desc" : "Exibir botão flutuante para alternar temas rapidamente."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ko/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "테마 토글",
        "desc" : "테마를 빠르게 전환할 수 있도록 플로팅 오버레이를 표시합니다."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ja/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "テーマ切り替え",
        "desc" : "テーマを素早く切り替えるためのフローティングオーバーレイを表示します。"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/fr/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "Sélecteur de thème",
        "desc" : "Affichez une fenêtre flottante pour changer de thème rapidement."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/es/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "Conmutador de tema",
        "desc" : "Muestra una superposición flotante con la que cambiar de tema rápidamente."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/de/app.json:5072

  • This PR edits a non-English locale file. Repo review guidance says desktop translations should only be edited in apps/ledger-live-desktop/static/i18n/en/app.json (see .agents/agents/code-reviewer.md:43), with other locales handled by the localization workflow. Please revert this change (restore the removed key) and keep the functional change in code/hardcoded strings.
      "themeConsole" : {
        "title" : "Designumschalter",
        "desc" : "Zeigt ein schwebendes Overlay an, mit dem du schnell zwischen Designs umschalten kannst."
      },
      "devTools" : {

Copilot AI review requested due to automatic review settings July 31, 2026 09:42
@tonykhaov
tonykhaov force-pushed the feat/desktop-LIVE-29592-analytics-consent-qa branch from 1dcc85e to 9058265 Compare July 31, 2026 09: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

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

Suppressed comments (4)

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/useAnalyticsConsentOptInQaViewModel.ts:94

  • formatBareValue currently returns the string "null" for both null and undefined, which makes the inspector output ambiguous (and can hide when a remote param is actually missing). Consider rendering undefined distinctly and falling back when JSON.stringify returns undefined.
export function formatBareValue(value: unknown): string {
  if (value === null || value === undefined) return "null";
  return JSON.stringify(value);
}

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/AnalyticsConsentOptInDevScreen.tsx:25

  • TONE_TEXT is typed as Record<string, string>, which weakens type-safety (any key becomes allowed). Since the keys are meant to match the existing tone union, tighten this to Record<InspectorField["status"]["tone"], string> so missing/extra tones are caught by TypeScript.
const TONE_TEXT: Record<string, string> = {
  error: "text-error",
  warning: "text-warning",
  success: "text-success",
  gray: "text-muted",
};

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/useAnalyticsConsentOptInQaViewModel.ts:4

  • New Desktop feature code is being added under src/renderer/... (e.g. this new ViewModel hook). Our MVVM architecture guidance states that new code for ledger-live-desktop should go under src/mvvm/ (see .agents/skills/mvvm-architecture/SKILL.md:10-13). Consider moving this QA tool to an MVVM feature folder (or documenting why this is an exception).

This issue also appears on line 91 of the same file.

import { useEffect, useState } from "react";
import { useNavigate } from "react-router";
import { useFeature } from "@features/platform-feature-flags";
import { featureFlagsOverridesSelector, setOverride } from "@shared/feature-flags";

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/index.tsx:3

  • This row switches to Link from react-router, but internal navigation in Settings developer rows is typically handled via useNavigate/onClick (and there are no other Link imports from react-router in the desktop app). To keep navigation patterns consistent (and avoid coupling this row to a specific router component API), consider reverting to an onClick + navigate handler.
import React from "react";
import { Link } from "react-router";
import { Button } from "@ledgerhq/lumen-ui-react";

@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
@live-github-bot live-github-bot Bot added the mobile Has changes in LLM label Aug 3, 2026
@live-github-bot live-github-bot Bot changed the title [LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) [LWDM] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) Aug 3, 2026
@tonykhaov tonykhaov changed the title [LWDM] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) [LWM + LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) Aug 3, 2026

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 24 out of 25 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 09:37
@tonykhaov
tonykhaov force-pushed the feat/desktop-LIVE-29592-analytics-consent-qa branch from a19e53e to bf71676 Compare August 3, 2026 09:38
@github-actions

github-actions Bot commented Aug 3, 2026

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: feat/desktop-LIVE-29592-analytics-consent-qa
  • Device: nanoSP or stax

📱 Mobile

-> Run Mobile E2E

  • Select "Run workflow"
  • Branch: feat/desktop-LIVE-29592-analytics-consent-qa
  • Device: nanoX

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 24 out of 25 changed files in this pull request and generated no new comments.

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

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/useAnalyticsConsentOptInQaViewModel.ts:78

  • The confirmation dialog copy is grammatically odd for a button/action ("Applies this preset"). Using the imperative form reads more naturally.
export function scenarioConfirmMessage(scenario: QaScenario): string {
  return `Applies this preset.\n\n${scenario.summary}\n\nExpected: ${VERDICT_META[scenario.expected].title}.`;
}

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/index.tsx:14

  • This settings row switched from i18n keys to hardcoded English strings, which is inconsistent with the rest of the Desktop Settings → Developer section (most rows use react-i18next, e.g. .../Developer/FeatureFlagsSettings/index.tsx:28-30). This will show English text even when the app locale is not English.
import React from "react";
import { Link } from "react-router";
import { Button } from "@ledgerhq/lumen-ui-react";
import { SettingsSectionRow } from "~/renderer/screens/settings/SettingsSection";

export default function AnalyticsConsentOptInDevTool() {
  return (
    <SettingsSectionRow
      title="Analytics consent QA"
      desc="Policy bumps, consent state, drawer preview"
    >
      <Button asChild size="sm" appearance="accent">
        <Link to="/settings/developer/analytics-consent-opt-in-qa">Open</Link>
      </Button>

Copilot AI review requested due to automatic review settings August 3, 2026 10:05
@tonykhaov
tonykhaov force-pushed the feat/desktop-LIVE-29592-analytics-consent-qa branch from bf71676 to b454ef9 Compare August 3, 2026 10:05
@tonykhaov
tonykhaov changed the base branch from chore/analytics-consent-LIVE-29592-remove-consent-validity-days to feat/flow-LIVE-29595-stored-policy-inspector August 3, 2026 10:05
@live-github-bot live-github-bot Bot removed the mobile Has changes in LLM label Aug 3, 2026
@live-github-bot live-github-bot Bot changed the title [LWM + LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) [LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) Aug 3, 2026

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 20 out of 21 changed files in this pull request and generated no new comments.

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

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/index.tsx:14

  • This settings row switched from i18n keys to hardcoded English strings (and the corresponding translation keys were removed from the locale JSONs). Other Developer settings rows use react-i18next (e.g. OpenDevToolsRow.tsx:17-22), so this breaks localization consistency for user-visible UI.

Recommendation: restore i18n usage here (and reintroduce the translation keys, or add new ones) instead of hardcoding the title/description/button label.

    <SettingsSectionRow
      title="Analytics consent QA"
      desc="Policy bumps, consent state, drawer preview"
    >
      <Button asChild size="sm" appearance="accent">
        <Link to="/settings/developer/analytics-consent-opt-in-qa">Open</Link>
      </Button>

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/AnalyticsConsentOptInDevScreen.tsx:99

  • This QA screen introduces many user-visible strings as hardcoded English (e.g. the Back button label and screen title). The desktop app generally uses react-i18next for UI copy (including in other Developer settings screens), so this makes the UI partially non-localizable.

Recommendation: move these strings to translation keys (at least reuse existing keys like common.back where possible).

          <Button size="sm" appearance="no-background" onClick={vm.onBack} icon={ArrowLeft}>
            Back
          </Button>
        </div>
        <span className="heading-2-semi-bold max-w-[min(100vw-8rem,28rem)] text-center text-base">
          Analytics consent QA
        </span>

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

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 19 out of 20 changed files in this pull request and generated no new comments.

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

apps/ledger-live-desktop/static/i18n/fr/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "Sélecteur de thème",
        "desc" : "Affichez une fenêtre flottante pour changer de thème rapidement."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/de/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "Designumschalter",
        "desc" : "Zeigt ein schwebendes Overlay an, mit dem du schnell zwischen Designs umschalten kannst."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/es/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "Conmutador de tema",
        "desc" : "Muestra una superposición flotante con la que cambiar de tema rápidamente."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ja/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "テーマ切り替え",
        "desc" : "テーマを素早く切り替えるためのフローティングオーバーレイを表示します。"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ko/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "테마 토글",
        "desc" : "테마를 빠르게 전환할 수 있도록 플로팅 오버레이를 표시합니다."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/pt-BR/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "Alternar tema",
        "desc" : "Exibir botão flutuante para alternar temas rapidamente."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/ru/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "Переключение темы",
        "desc" : "Отображать плавающий тумблер для быстрого переключения тем."
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/th/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "ปุ่มสลับธีม",
        "desc" : "แสดงโอเวอร์เลย์แบบลอยตัวเพื่อเปลี่ยนธีมได้อย่างรวดเร็ว"
      },
      "devTools" : {

apps/ledger-live-desktop/static/i18n/tr/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "Tema Butonu",
        "desc" : "Temalar arasında hızlıca geçiş yapmak için bir küçük pencere gösterin."
      },
      "devTools" : {

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/index.tsx:14

  • This row was previously localized via react-i18next, but is now hardcoded English (title/desc/button). That breaks localization consistency for Settings rows (e.g. OpenDevToolsRow uses t("settings.developer.*")). Consider restoring translation keys for this row (and only updating en/app.json per repo convention).
    <SettingsSectionRow
      title="Analytics consent QA"
      desc="Policy bumps, consent state, drawer preview"
    >
      <Button asChild size="sm" appearance="accent">
        <Link to="/settings/developer/analytics-consent-opt-in-qa">Open</Link>
      </Button>

apps/ledger-live-desktop/static/i18n/zh/app.json:5072

  • Per repo translation convention, non-English locale files shouldn’t be edited directly (see .agents/agents/code-reviewer.md:42-43). Please revert this deletion so translations remain managed via the usual pipeline.
      "themeConsole" : {
        "title" : "主题切换",
        "desc" : "显示可快速切换主题的浮动覆盖。"
      },
      "devTools" : {

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
69.2% Coverage on New Code (required ≥ 80%)
8 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tonykhaov
tonykhaov requested review from a team as code owners August 3, 2026 12:36
Copilot AI review requested due to automatic review settings August 3, 2026 12:36
@tonykhaov
tonykhaov force-pushed the feat/desktop-LIVE-29592-analytics-consent-qa branch from 8185884 to 0ca37d4 Compare August 3, 2026 12:36
@tonykhaov
tonykhaov removed request for a team August 3, 2026 12: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 19 out of 20 changed files in this pull request and generated no new comments.

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

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/useAnalyticsConsentOptInQaViewModel.ts:95

  • formatBareValue currently returns "null" for both null and undefined, and can also return undefined when JSON.stringify yields undefined (e.g. functions). This makes the inspector output ambiguous and breaks the function’s declared string return type.
export function formatBareValue(value: unknown): string {
  if (value === null || value === undefined) return "null";
  return JSON.stringify(value);
}

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/useAnalyticsConsentOptInQaViewModel.ts:260

  • consentInfo.consentDate is checked using a truthy condition, so an empty string (""), which is a plausible invalid stored value, would be displayed as consentDate: null in the raw inspector output. Using an explicit null check preserves the actual stored value for debugging.
      raw: consentInfo.consentDate
        ? `consentDate: ${formatBareValue(consentInfo.consentDate)}`
        : "consentDate: null",
      status:

apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/AnalyticsConsentOptInDevTool/AnalyticsConsentOptInDevScreen.tsx:26

  • TONE_TEXT is typed as Record<string, string>, which makes it easy to accidentally use unsupported tones without a type error. Since this mapping is meant to cover FieldTone, type it accordingly so missing/extra keys are caught at compile time.
const TONE_TEXT: Record<string, string> = {
  error: "text-error",
  warning: "text-warning",
  success: "text-success",
  gray: "text-muted",
};

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

Labels

desktop Has changes in LLD translations Translation files have been touched

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants