[LWD] feat(desktop): upgrade analytics consent QA screen (LIVE-29592) - #20266
Conversation
Web Tools Build Status
|
There was a problem hiding this comment.
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
analyticsConsentOptInQai18n 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. |
| export function scenarioConfirmMessage(scenario: QaScenario): string { | ||
| return `Applies this preset.\n\n${scenario.summary}\n\nExpected: ${VERDICT_META[scenario.expected].title}.`; | ||
| } |
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:
📁 desktop-workersPath:
📁 mobilePath:
Generated by Rsdoctor GitHub Action |
0c7a38e to
77b6694
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 |
There was a problem hiding this comment.
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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould 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.jsonshould be changed). Please revert this locale change and let the localization sync handle key removals.
"themeConsole" : {
"title" : "主题切换",
"desc" : "显示可快速切换主题的浮动覆盖。"
},
"devTools" : {
77b6694 to
1dcc85e
Compare
There was a problem hiding this comment.
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" : {
1dcc85e to
9058265
Compare
There was a problem hiding this comment.
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
formatBareValuecurrently returns the string "null" for bothnullandundefined, which makes the inspector output ambiguous (and can hide when a remote param is actually missing). Consider renderingundefineddistinctly and falling back whenJSON.stringifyreturnsundefined.
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_TEXTis typed asRecord<string, string>, which weakens type-safety (any key becomes allowed). Since the keys are meant to match the existing tone union, tighten this toRecord<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 forledger-live-desktopshould go undersrc/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
Linkfromreact-router, but internal navigation in Settings developer rows is typically handled viauseNavigate/onClick(and there are no otherLinkimports fromreact-routerin the desktop app). To keep navigation patterns consistent (and avoid coupling this row to a specific router component API), consider reverting to anonClick+navigatehandler.
import React from "react";
import { Link } from "react-router";
import { Button } from "@ledgerhq/lumen-ui-react";
|
Closing — desktop/prune work deferred; stack ends at #20212 for now. |
a19e53e to
bf71676
Compare
|
There was a problem hiding this comment.
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>
bf71676 to
b454ef9
Compare
There was a problem hiding this comment.
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-i18nextfor 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>
There was a problem hiding this comment.
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" : {
|
8185884 to
0ca37d4
Compare
There was a problem hiding this comment.
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
formatBareValuecurrently returns "null" for bothnullandundefined, and can also returnundefinedwhenJSON.stringifyyieldsundefined(e.g. functions). This makes the inspector output ambiguous and breaks the function’s declaredstringreturn 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.consentDateis checked using a truthy condition, so an empty string (""), which is a plausible invalid stored value, would be displayed asconsentDate: nullin 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_TEXTis typed asRecord<string, string>, which makes it easy to accidentally use unsupported tones without a type error. Since this mapping is meant to coverFieldTone, 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",
};




✅ Checklist
npx changesetwas attached.- 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 intosetAnalyticsConsentInfo📝 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