Skip to content

feat(nearby): Nearby people - #4

Merged
Sidpatchy merged 11 commits into
Sidpatchy:mainfrom
zvx-echo6:feat/nearby-peers
Nov 24, 2026
Merged

Sidpatchy merged 11 commits into
Sidpatchy:mainfrom
zvx-echo6:feat/nearby-peers

Conversation

@zvx-echo6

Copy link
Copy Markdown
Collaborator

Builds on #3 (Bluetooth peering). Until #3 merges, this PR also shows its commits; the Nearby people changes are the last 9 commits.

Adds a Nearby people page that lists people whose LXMF delivery announces Starling has heard, so you can add them without typing a 32-character address.

What it does

  • Two sections:
    • Nearby (Bluetooth): people heard over Bluetooth peers.
    • Network: people heard over TCP, an RNode or a shared instance.
  • Rows: each shows how the person was heard (e.g. "Bluetooth · Direct · Just now", or "TCP · 2 hops"), and an Add button that turns into "Contact" once added.
  • Person details: address, Copy address, when last heard, a "names are chosen by the sender and aren't verified" note, and Message.
  • Limits: keeps the 50 most recent people, and entries expire.
  • Announce button: announces this device's LXMF address on demand.
  • Automatic announces: Starling announces when Bluetooth peering starts, and to a new Bluetooth peer once its handshake completes. That one goes over Bluetooth only.
  • Interface names: "Bluetooth", "TCP", "RNode", "Shared instance", "Local network" (AutoInterface).
  • Also fixes: adding a contact by hand no longer jumps away from the current page.

Tested on a device

Pixel 8 (Android 16) with a Linux laptop as a Bluetooth peer.

  • Discovery: the laptop appears under Nearby (Bluetooth), and the drawer shows "Nearby people 1".
  • Add and message: Add, Message, and a message plus its echo, which lands in the conversation (needs fix(lxmf): file incoming messages under the sender's address #1).
  • Announces: the Announce button and the announce on start are both heard by the laptop.

Python 161, desktopTest 193, debug APK builds.

Screenshots

01-nearby-list 02-after-add 03-person-details 04-render-dark 05-render-bluetooth-off

Not verified on a device

The Network section was checked in renders only. During the device test, no announces arrived over the TCP hub we used, and the hub's relay could not be checked.

zvx-echo6 and others added 11 commits November 24, 2026 12:08
Track people heard through verified lxmf.delivery announces with the interface and hop count they arrived on, expire and cap them, and report each one to the app as a NEARBY_PEER event. Add a manual LXMF_ANNOUNCE command and announce at most once per five minutes when a new Bluetooth peer links.
Adding a contact never opens or creates a conversation, so the Add contact dialog no longer selects the new direct message, and its description no longer says it will.
…pository

Parse NEARBY_PEER bridge events, merge and expire them in the repository, persist the network readings with chat state, and add contacts from an announce without opening a conversation. Add an announce command to every transport, including the Android node service.
List people heard over Bluetooth and the network under Direct Messages, with a details dialog, one-tap Add, and a name prompt for people who share no name. Add Announce to the page header and next to the LXMF address on the Identity page.

@Sidpatchy Sidpatchy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @zvx-echo6 for future PRs can you please get commit signing set up? I am going to enable that requirement for future merges.

@Sidpatchy
Sidpatchy merged commit 67cc2ef into Sidpatchy:main Nov 24, 2026
10 of 11 checks passed
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.

2 participants