Skip to content

fix(reactotron-app): filter custom commands by connection - #1617

Open
giaBaoJS wants to merge 1 commit into
infinitered:masterfrom
giaBaoJS:codex/fix-custom-commands-selected-connection
Open

fix(reactotron-app): filter custom commands by connection#1617
giaBaoJS wants to merge 1 commit into
infinitered:masterfrom
giaBaoJS:codex/fix-custom-commands-selected-connection

Conversation

@giaBaoJS

Copy link
Copy Markdown

Describe your PR

When multiple apps are connected, the Custom Commands context contains registrations from every client. The page previously searched, rendered, and calculated its empty state from that global list, so commands from other connections appeared as duplicates.

This change reads the active connection from StandaloneContext and filters registrations by clientId before applying search or rendering the empty state. Switching connections now immediately shows only that client's commands.

Fixes #1601.

Test plan

  • yarn build-and-test:local
  • Added component-level coverage for two clients, connection switching, selected-client empty state, search isolation, and sending the visible command
  • Kept the final tests and reverted only the source fix: 4 tests failed while the single-client control still passed; restoring the fix returned all 5 tests to green
  • Ran a real desktop build with two reactotron-core-client WebSocket connections: the page initially showed only the selected iOS command, switched to only the Android command, and dispatching it was received by the Android client

The runtime check used real core clients rather than mobile simulators; it exercises the same clientId registration and command-routing protocol without platform app binaries. No documentation changes are needed because this restores the existing selected-connection behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Commands page shows duplicates with multiple connections

1 participant