Skip to content

[LWDM] feat(devtools): wire LLD and LWM into devtools WebSocket transport - #20267

Merged
Sebastien-Dav1d merged 2 commits into
developfrom
feat/devtools/transport/wire-apps
Aug 3, 2026
Merged

[LWDM] feat(devtools): wire LLD and LWM into devtools WebSocket transport#20267
Sebastien-Dav1d merged 2 commits into
developfrom
feat/devtools/transport/wire-apps

Conversation

@Sebastien-Dav1d

@Sebastien-Dav1d Sebastien-Dav1d commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Summary

Wires both Ledger Live Desktop and Ledger Live Mobile into the @devtools/wire
WebSocket transport, enabling the Redux store to be relayed to external devtools
clients through a local WebSocket hub.

What changed

Each app gets three additions:

  • sleepingListener.ts — a bare RTK listenerMiddleware instance that the
    copy-store protocol attaches its listeners to at runtime (kept separate so it
    can be passed to both the store and the relay without a circular import).
  • configureStore.ts — appends sleepingListener.middleware to
    the middleware chain.
  • useDevToolsRelay.ts — lazily builds a singleton buildTransport relay
    configured as "host" on ws://127.0.0.1:9090, using buildCopyStoreProtocol
    to broadcast store snapshots/diffs over the wire.

The TransportPanel is rendered in the DevTools footer (via the footer prop),
exposing connection state and the hub URL field.

To create the websocket to make it work, we can use this command : "pnpm --filter @devtools/relay start" or pnpm web-tools dev:remote" to run web-tools and the server at the same time

Screenshot 2026-07-31 at 09 42 48 Screenshot 2026-07-31 at 09 42 52 Screenshot 2026-07-31 at 09 42 55 Screenshot 2026-07-31 at 09 48 47 Screenshot 2026-07-31 at 09 48 55 Screenshot 2026-07-31 at 09 49 00

🔗 Context

Copilot AI review requested due to automatic review settings July 31, 2026 07:49
@live-github-bot live-github-bot Bot added desktop Has changes in LLD mobile Has changes in LLM labels Jul 31, 2026
@live-github-bot live-github-bot Bot changed the title feat(devtools): wire LLD and LWM into devtools WebSocket transport [LWDM] feat(devtools): wire LLD and LWM into devtools WebSocket transport Jul 31, 2026
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from b2f0614 to 506baf1 Compare July 31, 2026 07:51

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 wires Ledger Live Desktop (LLD) and Ledger Live Mobile (LWM) DevTools screens into the @devtools/wire WebSocket transport so each app can relay (and hydrate) Redux store snapshots/actions through a local hub (default ws://127.0.0.1:9090), and exposes connection controls via the TransportPanel in the DevTools footer.

Changes:

  • Add per-app “sleeping” RTK listener middleware instances and append them to each app’s store middleware chain.
  • Wrap each app’s root reducer with withCopyStoreHydration to allow incoming store snapshots to replace state.
  • Add useDevToolsRelay hooks and render TransportPanel in DevTools screen footers to manage the hub URL/connection state.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updates lockfile to reflect newly added devtools workspace dependencies and peer resolution changes.
apps/ledger-live-mobile/src/state-manager/sleepingListener.ts Adds an exported RTK listener middleware instance to be driven by the copy-store protocol.
apps/ledger-live-mobile/src/state-manager/configureStore.ts Wraps reducer with copy-store hydration and appends the sleeping listener middleware.
apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsRelay.ts Adds a relay hook that builds a @devtools/wire transport/protocol stack for LWM.
apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx Renders TransportPanel in the DevTools footer and instantiates the relay.
apps/ledger-live-mobile/package.json Adds @devtools/protocols, @devtools/transport-panel, and @devtools/wire deps.
apps/ledger-live-desktop/src/state-manager/sleepingListener.ts Adds an exported RTK listener middleware instance to be driven by the copy-store protocol.
apps/ledger-live-desktop/src/state-manager/configureStore.ts Wraps reducer with copy-store hydration and appends the sleeping listener middleware.
apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsRelay.ts Adds a relay hook that builds a @devtools/wire transport/protocol stack for LLD.
apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx Renders TransportPanel in the DevTools footer and instantiates the relay.
apps/ledger-live-desktop/package.json Adds @devtools/transport, @devtools/protocols, @devtools/transport-panel, and @devtools/wire deps.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Suppressed comments (1)

apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsRelay.ts:22

  • The relay is created during render (if (!relay) relay = buildRelay(store);). buildTransport connects immediately (devtools/wire/src/wire.ts:44-55), so this performs a WebSocket connection as a render-time side effect. Prefer deferring transport creation/connection to useEffect (and calling transport.disconnect() on cleanup) or changing buildTransport to not auto-connect and calling connect() from an effect.
export function useDevToolsRelay() {
  const store = useStore();
  if (!relay) relay = buildRelay(store);
  const wireState = useSyncExternalStore(relay.subscribe, relay.getState, relay.getState);
  return { wire: relay, wireState };

Comment thread apps/ledger-live-desktop/src/state-manager/sleepingListener.ts
Copilot AI review requested due to automatic review settings July 31, 2026 07:56
@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-ockgff46p-ledger-hq-prd.vercel.app
Native Storybook Build ✅ Deployed https://native-ui-storybook-1e007qgtf-ledger-hq-prd.vercel.app
React Storybook Build ✅ Deployed https://react-ui-storybook-cod0gd96b-ledger-hq-prd.vercel.app

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 7 projects in monorepo, 3 projects with changes.

📊 Quick Summary
Project Total Size Change
desktop-main 2.3 MB 0
desktop-preloader 7.1 KB 0
desktop-renderer 80.7 MB +8.7 KB (0.0%)
desktop-webviewDappPreloader 0 B 📉 -36.9 KB (-100.0%)
desktop-webviewPreloader 200.0 B 0
desktop-workers 36.8 KB 0
mobile 261.5 MB +103.9 KB (0.0%)
📋 Detailed Reports (Click to expand)

📁 desktop-renderer

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

📌 Baseline Commit: 36683be114 | PR: #20232

Metric Current Baseline Change
📊 Total Size 80.7 MB 80.7 MB +8.7 KB (0.0%)
📄 JavaScript 29.3 MB 29.3 MB +8.7 KB (0.0%)
🎨 CSS 183.1 KB 183.1 KB 0
🌐 HTML 1.8 KB 1.8 KB 0
📁 Other Assets 51.2 MB 51.2 MB 0

📦 Download Diff Report: desktop-renderer Bundle Diff

📁 desktop-webviewDappPreloader

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

📌 Baseline Commit: 36683be114 | PR: #20232

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

📦 Download Diff Report: desktop-webviewDappPreloader Bundle Diff

📁 mobile

Path: rsdoctor/mobile/rsdoctor-data.json

📌 Baseline Commit: 36683be114 | PR: #20232

Metric Current Baseline Change
📊 Total Size 261.5 MB 261.4 MB +103.9 KB (0.0%)
📄 JavaScript 110.5 MB 110.4 MB +46.0 KB (0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 151.0 MB 151.0 MB +57.9 KB (0.0%)

📦 Download Diff Report: mobile Bundle Diff

Generated by Rsdoctor GitHub Action

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

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

apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsRelay.ts:22

  • This hook creates and connects the WebSocket relay during render, and keeps it in a module-level singleton. Because desktop tests (and potentially multiple app providers) create a new Redux store per render, the singleton will stay bound to the first store instance and can leak state across tests; it also never disconnects on unmount.
export function useDevToolsRelay() {
  const store = useStore();
  if (!relay) relay = buildRelay(store);
  const wireState = useSyncExternalStore(relay.subscribe, relay.getState, relay.getState);
  return { wire: relay, wireState };

apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsRelay.ts:21

  • buildTransport connects immediately (see @devtools/wire) and this hook creates the relay during render (if (!relay) relay = buildRelay()), which is a React side effect and can also throw when globalThis.WebSocket is unavailable (e.g. some Jest/Node environments). It also never disconnects, so the WebSocket can stay open after the DevTools screen unmounts.
export function useDevToolsRelay() {
  if (!relay) relay = buildRelay();
  const wireState = useSyncExternalStore(relay.subscribe, relay.getState, relay.getState);
  return { wire: relay, wireState };

apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx:10

  • MVVM: this screen view now calls useDevToolsRelay() directly and wires transport concerns in the view layer. Per the repo MVVM rules, index.tsx views under src/mvvm/**/screens/** should only consume the ViewModel output; side-effectful logic (WebSocket transport/store wiring) should live in the ViewModel and be passed down as props (or the footer component should be owned by the ViewModel).
  const { config, screenOptions } = useDevToolsScreenViewModel();
  const { wire, wireState } = useDevToolsRelay();

apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx:10

  • MVVM: the screen view calls useDevToolsRelay() directly and constructs the transport footer in the view layer. In this repo's MVVM pattern, index.tsx views under src/mvvm/**/screens/** should be props-only; side-effectful logic (WebSocket transport/store wiring) should live in the ViewModel and be passed down.
  const { config, onClose } = useDevToolsScreenViewModel();
  const { wire, wireState } = useDevToolsRelay();

pnpm-lock.yaml:2227

  • The lockfile includes unrelated resolution changes for existing React Native deps (e.g. @react-native/babel-preset now resolved as 0.81.6(@babel/core@...) and new standalone Babel snapshot entries). These changes aren’t directly explained by the new @devtools/* workspace deps and make the PR noisier / harder to audit; consider regenerating the lockfile to limit the diff to dependency graph changes caused by the added devtools packages (or call out why the extra Babel entries are expected).

Copilot AI review requested due to automatic review settings July 31, 2026 09:54
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 0f5f517 to 7367878 Compare July 31, 2026 09:55

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 15 out of 16 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/package.json:79

  • @devtools/transport is declared as a direct dependency here but does not appear to be imported anywhere in apps/ledger-live-desktop/src/** (the app imports @devtools/wire / @devtools/transport-panel instead, and those packages already depend on @devtools/transport). Keeping it here makes the dependency graph noisier and increases the chance of unused-dep drift.
    "@devtools/shell": "workspace:^",
    "@devtools/bindings": "workspace:*",
    "@devtools/transport": "workspace:*",
    "@devtools/protocols": "workspace:*",
    "@devtools/transport-panel": "workspace:*",

pnpm-lock.yaml:2226

  • The lockfile includes a large set of resolution changes unrelated to the new DevTools workspace dependencies (e.g. @react-native/babel-preset now being recorded as 0.81.6(@babel/core@7.28.5) plus new snapshot entries / peerDependency metadata). This makes the PR harder to review and can cause avoidable merge conflicts. Please regenerate pnpm-lock.yaml so it only reflects the DevTools dependency additions, or add a note in the PR description explaining why the React Native Babel preset resolution changed as part of this work.

Copilot AI review requested due to automatic review settings July 31, 2026 09:59

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

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

apps/ledger-live-desktop/package.json:80

  • @devtools/transport is declared as a direct dependency here, but this workspace doesn’t import it (only @devtools/wire / @devtools/transport-panel are used). Keeping unused direct deps can trip unused-dependency checks and makes dependency intent unclear.
    "@devtools/bindings": "workspace:*",
    "@devtools/transport": "workspace:*",
    "@devtools/protocols": "workspace:*",
    "@devtools/transport-panel": "workspace:*",
    "@devtools/wire": "workspace:*",

Copilot AI review requested due to automatic review settings July 31, 2026 12:05
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 7367878 to 3f3dcc6 Compare July 31, 2026 12:05

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

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

apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsScreenViewModel.ts:7

  • This ViewModel no longer has an explicit return type. In this codebase, MVVM ViewModel hooks typically expose a named/explicit return type (e.g. apps/ledger-live-desktop/src/mvvm/features/Contacts/screens/Contacts/useContactsViewModel.ts:38) to keep the public surface stable and avoid leaking implementation types through inference. Consider restoring an explicit return type here.
export function useDevToolsScreenViewModel() {

apps/ledger-live-desktop/package.json:80

  • @devtools/transport is declared as a direct dependency but there are no imports of @devtools/transport in the Desktop app (it’s already pulled transitively via @devtools/wire / @devtools/transport-panel). Keeping it here adds maintenance overhead and can mask accidental direct usage. Consider removing it unless the app imports it directly.
    "@devtools/shell": "workspace:^",
    "@devtools/bindings": "workspace:*",
    "@devtools/transport": "workspace:*",
    "@devtools/protocols": "workspace:*",
    "@devtools/transport-panel": "workspace:*",
    "@devtools/wire": "workspace:*",

apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsScreenViewModel.ts:10

  • This ViewModel no longer has an explicit return type, which makes the exported surface depend on inference and can change unintentionally as implementation details evolve. Consider restoring an explicit return type for the ViewModel result (consistent with many MVVM hooks in the repo).
export function useDevToolsScreenViewModel() {

apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx:17

  • This adds the footer TransportPanel wiring to DevToolsScreen, but the existing DevToolsScreen integration test doesn’t assert that footer is passed through to @devtools/shell (and thus the relay panel remains wired). Adding an assertion for footer (and optionally its hubUrl / role props) would better protect this behavior from regressions.
  return (
    <DevTools
      config={config}
      screenOptions={screenOptions}
      footer={
        <TransportPanel transport={transport} hubUrl={hubUrl} setHubUrl={setHubUrl} role={role} />
      }
    />

apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx:20

  • This adds the footer TransportPanel wiring to DevToolsScreen, but the current DevToolsScreen integration tests don’t assert that footer is passed to @devtools/shell (and thus the relay panel remains wired). Adding an assertion for footer would better cover the new behavior.
      <DevTools
        config={config}
        onClose={onClose}
        footer={
          <TransportPanel transport={transport} hubUrl={hubUrl} setHubUrl={setHubUrl} role={role} />
        }
      />

@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 3f3dcc6 to 4a30521 Compare July 31, 2026 12:53
Copilot AI review requested due to automatic review settings July 31, 2026 12:53

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

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

apps/ledger-live-desktop/package.json:80

  • @devtools/transport is added as a direct dependency, but there are no imports/usages of it in apps/ledger-live-desktop (only @devtools/wire / @devtools/transport-panel are used, and both already depend on @devtools/transport). Keeping it here is redundant and increases dependency surface / lockfile churn.
    "@devtools/bindings": "workspace:*",
    "@devtools/transport": "workspace:*",
    "@devtools/protocols": "workspace:*",
    "@devtools/transport-panel": "workspace:*",
    "@devtools/wire": "workspace:*",

Copilot AI review requested due to automatic review settings August 3, 2026 07:33
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 4a30521 to 6ebde5e Compare August 3, 2026 07:33

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 15 out of 16 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-mobile/src/state-manager/configureStore.ts:28

  • sleepingListener is imported here via a relative path (./sleepingListener), while the relay imports it via the ~ alias (~/state-manager/sleepingListener). If the bundler/test resolver treats these as distinct module IDs, you can end up with two different listener instances: the store will register middleware from one instance while the relay attaches listeners to the other, breaking the copy-store protocol.

Prefer using the same import specifier everywhere (e.g. the ~ alias) to guarantee a single shared instance.

import { withCopyStoreHydration } from "@devtools/protocols/copyStore";
import { sleepingListener } from "./sleepingListener";

apps/ledger-live-desktop/src/state-manager/configureStore.ts:24

  • sleepingListener is imported here via a relative path (./sleepingListener), while the relay imports it via the ~ alias (~/state-manager/sleepingListener). If these resolve to separate module IDs, the store can register middleware from one listener instance while the relay drives another, so relayed actions/snapshots won’t flow through the middleware actually mounted in the store.

Use the same import specifier across the app (e.g. the ~ alias) to guarantee a single shared instance.

import { fetchRemoteFlags as defaultFetchRemoteFlags } from "~/firebase/remoteConfig";
import { sleepingListener } from "./sleepingListener";
import { withCopyStoreHydration } from "@devtools/protocols/copyStore";

apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/useDevToolsRelay.ts:7

  • On Android emulators, ws://127.0.0.1:9090 points to the emulator/device itself, not the host machine running the relay server. This makes the default hub URL non-working out-of-the-box on Android (a similar pattern elsewhere uses 10.0.2.2 for Android; e.g. apps/ledger-live-mobile/src/e2e/bridge/client.ts:66-68).

Consider using a platform-aware default (localhost for iOS, 10.0.2.2 for Android) so the TransportPanel starts from a usable value.

const HUB_URL = "ws://127.0.0.1:9090";
const ROLE = "host" as const;

Copilot AI review requested due to automatic review settings August 3, 2026 08:27
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 6ebde5e to 2331a8a Compare August 3, 2026 08:27

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 15 out of 16 changed files in this pull request and generated 2 comments.

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

apps/ledger-live-mobile/src/state-manager/configureStore.ts:108

  • sleepingListener.middleware is appended unconditionally, even though it is only needed when the copy-store relay is active. Consider gating it to dev/debug builds so production doesn’t pay middleware overhead / expose listener wiring when the relay can’t be used.
      .concat(sleepingListener.middleware),

apps/ledger-live-desktop/src/state-manager/configureStore.ts:122

  • sleepingListener.middleware is added for every Desktop store instance, but it’s only required when the WebSocket relay is in use. Gating this to __DEV__ avoids unnecessary middleware work in production builds.
        .concat(sleepingListener.middleware),

apps/ledger-live-mobile/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx:16

  • The footer now wires a TransportPanel (new user-visible behavior for this screen), but the existing integration test doesn’t assert that the footer prop is passed or that the panel receives the expected hubUrl/role/setHubUrl props. Adding a minimal assertion would prevent regressions.
    <DevTools
      config={config}
      screenOptions={screenOptions}
      footer={
        <TransportPanel transport={transport} hubUrl={hubUrl} setHubUrl={setHubUrl} role={role} />
      }

apps/ledger-live-desktop/src/mvvm/features/DevTools/screens/DevToolsScreen/index.tsx:20

  • The footer now renders a TransportPanel, but Desktop’s DevToolsScreen integration tests don’t verify that this footer is provided (or that it receives the expected transport + URL props). Please add a minimal assertion to cover this new behavior.
      <DevTools
        config={config}
        onClose={onClose}
        footer={
          <TransportPanel transport={transport} hubUrl={hubUrl} setHubUrl={setHubUrl} role={role} />
        }
      />

Comment thread apps/ledger-live-mobile/src/state-manager/configureStore.ts Outdated
Comment thread apps/ledger-live-desktop/src/state-manager/configureStore.ts Outdated
Copilot AI review requested due to automatic review settings August 3, 2026 09:07
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 2331a8a to 53cd058 Compare August 3, 2026 09:07

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 15 out of 16 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-mobile/src/mvvm/features/DevTools/integrations/DevToolsScreen.integration.test.tsx:26

  • The app relay is configured with ROLE = "host" (see useDevToolsRelay.ts), but this test mock returns wireState.role: "tool". That mismatch can hide role-specific UI behavior in TransportPanel and makes the test setup inconsistent with runtime.
    const wireState = { hubUrl: "ws://127.0.0.1:9090", role: "tool" };

apps/ledger-live-mobile/package.json:92

  • @devtools/protocols is not imported anywhere in the mobile app code (only present in this package.json). Since @devtools/wire already declares @devtools/protocols as a dependency, this direct dependency looks redundant and increases the app's dependency surface.
    "@devtools/bindings": "workspace:^",
    "@devtools/shell": "workspace:^",
    "@devtools/protocols": "workspace:*",
    "@devtools/transport-panel": "workspace:*",
    "@devtools/wire": "workspace:*",

apps/ledger-live-desktop/package.json:79

  • @devtools/protocols is not imported anywhere in the desktop app code (only present in this package.json). Since @devtools/wire already depends on @devtools/protocols, this direct dependency appears redundant and expands the app's dependency surface unnecessarily.
    "@domain/entity-large-screen-upsell-modal": "workspace:*",
    "@devtools/shell": "workspace:^",
    "@devtools/bindings": "workspace:*",
    "@devtools/protocols": "workspace:*",
    "@devtools/transport-panel": "workspace:*",
    "@devtools/wire": "workspace:*",

Copilot AI review requested due to automatic review settings August 3, 2026 09:52
@Sebastien-Dav1d
Sebastien-Dav1d force-pushed the feat/devtools/transport/wire-apps branch from 53cd058 to 956d4a1 Compare August 3, 2026 09:52

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 15 out of 16 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-mobile/src/state-manager/configureStore.ts:29

  • The PR description mentions wrapping the root reducer with withCopyStoreHydration, but the store is still configured with reducer: reducers. The copy-store protocol’s setStoreState dispatches replaceStoreAction, which won’t actually hydrate anything unless the root reducer handles @devtools/copy-store/replace (or is wrapped). If you want snapshot hydration to work (e.g., if this endpoint ever runs as role: tool or receives a snapshot), wrap the reducer; otherwise, please update the PR description to avoid claiming hydration support.
import { createFeatureFlagsMiddleware, type PartialFeatures } from "@shared/feature-flags";
import { fetchRemoteFlags } from "~/firebase/remoteConfig";
import { sleepingListener } from "./sleepingListener";
import { createPkcePairWithExpoCrypto } from "~/helpers/pkce";

apps/ledger-live-desktop/src/state-manager/configureStore.ts:27

  • The PR description mentions wrapping the root reducer with withCopyStoreHydration, but this store is still configured with reducer: reducers. Since the copy-store protocol’s setStoreState dispatches replaceStoreAction, snapshot hydration won’t work unless the root reducer handles @devtools/copy-store/replace (or is wrapped). If hydration is intended, wrap the reducer; otherwise update the PR description to reflect the current host-only wiring.
import { fetchRemoteFlags as defaultFetchRemoteFlags } from "~/firebase/remoteConfig";
import { sleepingListener } from "./sleepingListener";
type Props = {
  state?: State;
  dbMiddleware?: Middleware;

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@Sebastien-Dav1d
Sebastien-Dav1d marked this pull request as ready for review August 3, 2026 12:33
@Sebastien-Dav1d
Sebastien-Dav1d requested a review from a team as a code owner August 3, 2026 12:33
@Sebastien-Dav1d
Sebastien-Dav1d merged commit 5cec6cf into develop Aug 3, 2026
87 checks passed
@Sebastien-Dav1d
Sebastien-Dav1d deleted the feat/devtools/transport/wire-apps branch August 3, 2026 14:21
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.

3 participants