#951

Test hook: synthetic peer for single-device UI testing

OpenChessing234wants to merge intofrom

Summary

  • Adds a debug-only inject_synthetic_peer test-hook command alongside inject_peers.
  • The hook registers a peer nickname in the mesh layer, adds the peer to AppStateStore, and optionally injects a public mesh message and/or a private conversation thread for UI automation.

Usage

adb shell am broadcast -a com.bitchat.droid.TEST_HOOK \
  -n com.bitchat.droid/com.bitchat.android.testhook.TestHookReceiver \
  --es cmd inject_synthetic_peer --es id synth1 \
  --es name Mara --es mesh_message "Hello from the fixture" \
  --es private_message "DM thread seed"

Clear with --es name "" or --ez clear true (optional --es peer).

Test plan

  • Debug build: run command above and confirm mention autocomplete lists Mara
  • Confirm mesh timeline shows inbound message from Mara
  • Open private chat sheet for the synthetic peer and see the seeded DM
  • Clear command removes peer from peer list

Closes #856

Made with Cursor