Skip to content

feat(contacts): drive add-address confirmation via DiE (LIVE-36766) - #21440

Draft
claudiiafg wants to merge 1 commit into
developfrom
chore/LIVE-36766_cleanup-mocked
Draft

feat(contacts): drive add-address confirmation via DiE (LIVE-36766)#21440
claudiiafg wants to merge 1 commit into
developfrom
chore/LIVE-36766_cleanup-mocked

Conversation

@claudiiafg

@claudiiafg claudiiafg commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Remove the mocked Contacts add-address confirmation screens (placeholder Continue / completion UI) and drive confirmation through the real Device Intent Executor on Desktop and Mobile.

Previously, MAD add-address could show a Continue placeholder instead of device confirmation, Mobile auto-advanced via a mock confirmation path, and some prefill / Send entry points used createMockContactDeviceIntentsPort. Users no longer see that placeholder: naming or review continue starts registerExternalAddress and mounts DIE. Mock device intents stay test-only (@features/platform-contacts/test). Unit and integration tests assert the real confirmation handoff, not a mock Continue button.

🔗 Context

@claudiiafg claudiiafg self-assigned this Sep 2, 2026
Copilot AI lite review requested due to automatic review settings September 2, 2026 10:20
@live-github-bot live-github-bot Bot added desktop Has changes in LLD mobile Has changes in LLM labels Sep 2, 2026
@live-github-bot live-github-bot Bot changed the title feat(contacts): drive add-address confirmation via DiE (LIVE-36766) [LWDM] feat(contacts): drive add-address confirmation via DiE (LIVE-36766) Sep 2, 2026
@ledger-wiz-cspm-secret-detection

ledger-wiz-cspm-secret-detection Bot commented Sep 2, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Medium
Software Management Finding Software Management Findings -
Total 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Web Tools Build Status

Build Status Deployment
Web Tools Build ⏭️ Skipped

@claudiiafg claudiiafg changed the title [LWDM] feat(contacts): drive add-address confirmation via DiE (LIVE-36766) feat(contacts): drive add-address confirmation via DiE (LIVE-36766) Sep 2, 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.

🟡 Changes recommended

Desktop Contacts add-address now renders an empty dialog while awaiting currency analytics before starting the device intent, delaying DIE mounting and causing a user-visible blank state.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR removes the web “Continue/success” placeholder confirmation UI for Contacts add-address and switches Desktop + Mobile flows (including Send/prefill entry points) to hand off confirmation to the real Device Intent Executor (DIE). It also moves Contacts device-intents mocks into a dedicated test export so production code paths no longer rely on mocked device results.

Changes:

  • Remove the web completion/placeholder screens and make add-address confirmation/review steps render via DIE instead of in-flow buttons.
  • Require explicit deviceIntents injection for Contacts ports and relocate mock device intents into @features/platform-contacts/test.
  • Update Desktop/Mobile MVVM flows + integration tests to assert DIE handoff and the post-confirmation behavior.
File summaries
File Description
features/platform/contacts/src/contactEdit/createContactEditPort.web.test.ts Updates port construction to pass required deviceIntents.
features/platform/contacts/src/contactEdit/createContactEditPort.ts Makes deviceIntents dependency mandatory (no default mock).
features/platform/contacts/src/contactDeviceIntentsPort.ts Removes in-module mock factory; keeps port + errors/types.
features/platform/contacts/src/contactDeviceIntentsPort.test.ts Points tests at the new dedicated mock module.
features/platform/contacts/src/contactDeviceIntentsPort.mock.ts Adds deterministic mock device-intents implementation for tests.
features/platform/contacts/src/contactAddressEdit/createContactAddressEditPort.web.test.ts Uses new mock module import for tests.
features/platform/contacts/README.md Documents test-only device intents export.
features/platform/contacts/package.json Exposes ./test export for test-only mocks.
features/flow/flow-contacts-add-address/src/web.ts Removes web completion screen export.
features/flow/flow-contacts-add-address/src/usePrefillAddAddressFlow.web.test.ts Uses @features/platform-contacts/test mock export.
features/flow/flow-contacts-add-address/src/state/useAddAddressFlowViewModel.web.test.ts Renames mock-completion API usage in tests.
features/flow/flow-contacts-add-address/src/state/useAddAddressFlowViewModel.ts Renames completeMockConfirmationcompleteConfirmation.
features/flow/flow-contacts-add-address/src/state/types.ts Updates VM type + removes completion/placeholder view prop types.
features/flow/flow-contacts-add-address/src/screens/Flow/ContactsAddAddressFlowContent.web.tsx Stops rendering confirmation/review/success placeholders on web (returns null).
features/flow/flow-contacts-add-address/src/screens/Flow/ContactsAddAddressFlowContent.web.test.tsx Adjusts expectations to “no button rendered” for placeholder steps.
features/flow/flow-contacts-add-address/src/screens/Completion/ContactsAddAddressCompletion.web.tsx Deletes the web placeholder completion component.
features/flow/flow-contacts-add-address/README.md Updates structure docs to reflect removal of Completion screen.
apps/ledger-live-mobile/src/mvvm/features/Contacts/screens/ContactDetail/useContactDetailScreenViewModel.ts Routes add-address confirmation through DIE and updates completion logic.
apps/ledger-live-mobile/src/mvvm/features/Contacts/screens/ContactDetail/hooks/useContactDetailEditDeleteAdapter.test.tsx Imports mocks from @features/platform-contacts/test.
apps/ledger-live-mobile/src/mvvm/features/Contacts/hooks/useContactAddressDetailActionsAdapter.test.tsx Imports mocks from @features/platform-contacts/test.
apps/ledger-live-mobile/src/mvvm/features/Contacts/hooks/prefillAddAddress/PrefillAddAddressFlowRoot.tsx Uses contacts intents orchestrator + mounts DeviceIntentExecutorLWM when active.
apps/ledger-live-mobile/src/mvvm/features/Contacts/integrations/Contacts.integration.test.tsx Renames test scenario to device confirmation expectations.
apps/ledger-live-mobile/mocks/@features/platform-contacts/device.ts Updates mock to source test mock export.
apps/ledger-live-desktop/src/mvvm/features/Send/screens/AddToExistingContact/hooks/tests/useAddToExistingContactViewModel.test.tsx Mocks contacts device orchestrator instead of mock port export.
apps/ledger-live-desktop/src/mvvm/features/Send/screens/AddNewContact/hooks/tests/useAddNewContactViewModel.test.tsx Mocks contacts device orchestrator instead of mock port export.
apps/ledger-live-desktop/src/mvvm/features/Send/screens/AddNewContact/AddNewContactAddressView.tsx Mounts DeviceIntentExecutorLWD when DIE is active.
apps/ledger-live-desktop/src/mvvm/features/Send/hooks/useSendPrefillAddAddressFlow.ts Uses contacts intents orchestrator + threads dieProps through phase state.
apps/ledger-live-desktop/src/mvvm/features/Send/mocks/sendFlowTestUtils.tsx Adds module mock for @features/platform-contacts/device.
apps/ledger-live-desktop/src/mvvm/features/Contacts/screens/Contacts/useContactsViewModel.ts Drives add-address saving/confirmation with DIE and updated flow actions.
apps/ledger-live-desktop/src/mvvm/features/Contacts/screens/Contacts/components/ContactsAddAddressFlowDialog/types.ts Removes completion/placeholder callbacks/labels from dialog props.
apps/ledger-live-desktop/src/mvvm/features/Contacts/screens/Contacts/components/ContactsAddAddressFlowDialog/ContactsAddAddressFlowDialog.tsx Stops passing removed completion/placeholder props into flow content.
apps/ledger-live-desktop/src/mvvm/features/Contacts/hooks/prefillAddAddress/PrefillAddAddressFlowRoot.tsx Uses contacts intents orchestrator + mounts DeviceIntentExecutorLWD when active.
apps/ledger-live-desktop/src/mvvm/features/Contacts/integrations/Contacts.integration.test.tsx Updates integration expectations to dialog dismissal instead of placeholder screens.
apps/ledger-live-desktop/src/mvvm/features/Contacts/integrations/Contacts.deviceIntents.integration.test.tsx Updates integration assertions to reflect DIE takeover.
apps/ledger-live-desktop/mocks/@features/platform-contacts/device.ts Updates mock to source test mock export.
.changeset/calm-contacts-confirm.md Adds changeset documenting the user-facing behavior change.
Review details
  • Files reviewed: 36/36 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +129 to +133
const { network, asset } = await resolveContactsCurrencyAnalytics(
flowState.selectedCurrencyId,
{
findTokenById: currencyId => getCryptoAssetsStore().findTokenById(currencyId),
},
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 7 projects in monorepo, 2 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
desktop-main 2.5 MB - 0 -
desktop-preloader 7.1 KB - 0 -
desktop-renderer 82.4 MB - -1.3 KB (-0.0%) -
desktop-webviewDappPreloader 36.9 KB - ❓ 0 -
desktop-webviewPreloader 200.0 B - 0 -
desktop-workers 36.8 KB - 0 -
mobile 129.5 MB - -2.5 KB (-0.0%) -
📋 Detailed Reports (Click to expand)

📁 desktop-renderer

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

📌 Baseline Commit: d80a0e0f653302623aa09406ab8ff0358546386b | PR: #21398

Metric Current Baseline Change
📊 Total Size 82.4 MB 82.4 MB -1.3 KB (-0.0%)
🗜️ Gzip Size - - -
📄 JavaScript 30.6 MB 30.6 MB -1.3 KB (-0.0%)
🎨 CSS 188.4 KB 188.4 KB 0
🌐 HTML 1.8 KB 1.8 KB 0
📁 Other Assets 51.7 MB 51.7 MB 0

📦 Download Diff Report: desktop-renderer Bundle Diff

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

📌 Baseline Commit: d80a0e0f653302623aa09406ab8ff0358546386b | PR: #21398

Metric Current Baseline Change
📊 Total Size 129.5 MB 129.5 MB -2.5 KB (-0.0%)
🗜️ Gzip Size - - -
📄 JavaScript 114.0 MB 114.0 MB -2.5 KB (-0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 15.5 MB 15.5 MB 0

📦 Download Diff Report: mobile Bundle Diff

Generated by Rsdoctor GitHub Action

Copilot AI review requested due to automatic review settings September 2, 2026 13:43
@claudiiafg
claudiiafg force-pushed the chore/LIVE-36766_cleanup-mocked branch from 1521a40 to b47ac6a Compare September 2, 2026 13:43

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.

🟡 Changes recommended

The new package export uses a ./test subpath that appears inconsistent with existing ./testing test-entrypoint conventions in the monorepo and should be aligned before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 36/36 changed files
  • Comments generated: 1
  • Review effort level: Lite

"./web": "./src/web.ts",
"./device": "./src/device/index.ts",
"./device/intents": "./src/device/intents/index.ts",
"./test": "./src/contactDeviceIntentsPort.mock.ts",
Copilot AI review requested due to automatic review settings September 2, 2026 19:00
@claudiiafg
claudiiafg force-pushed the chore/LIVE-36766_cleanup-mocked branch from b47ac6a to 3917561 Compare September 2, 2026 19:00

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.

🔵 Needs a closer look

It changes end-to-end confirmation flow behavior across Desktop and Mobile with device-intent orchestration, making it higher-risk to approve without a final human validation pass.

Review details
  • Files reviewed: 33/33 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
72.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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

Labels

desktop Has changes in LLD mobile Has changes in LLM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants