Meshtastic-Apple/docs/PULL_REQUEST_DISPLAY_NAMES.md
Meshtastic Contributor 62a2470989 docs: add PR description for display-names feature
Made-with: Cursor
2026-03-08 20:44:42 +00:00

2.2 KiB
Raw Blame History

Local display names for nodes

Users can set a local display name for any node. That name is shown in the app instead of the devices long/short name, and is stored only on the device (not sent over the mesh).


Summary

StorageNodeDisplayNameStore (UserDefaults), keyed by node number
ScopeNode list, node detail, messages (user list & relay), compass waypoint name
Edit entry pointsLong-press node → “Set display name”; Node detail → “Display name” row

UI

  • Node list Rows show the custom display name when set, otherwise the device long/short name.
  • Long-press menu “Set display name” opens a sheet to set or clear the name.
  • Node detail Navigation title and a “Display name” row; tapping the row opens the edit sheet.
  • Edit sheet Text field for the local name, with options to save or clear the display name.
  • Messages User list and relay text use displayLongName / displayShortName.

Technical details

  • Key: Display names are stored and looked up by node number (num), the unique node ID.
  • Persistence: UserDefaults key nodeDisplayNames; JSON dictionary [String: String] with node num as string key.
  • Model: UserEntity extensions displayLongName and displayShortName; they return the stored name if set, otherwise the existing longName / shortName.
  • UI refresh: NodeDisplayNameStore.didChangeNotification is posted when a name is set or cleared; detail view subscribes to refresh the title.

Checklist

  • Display name keyed by node number only
  • Shown in list, detail, and messages; editable from list context menu and detail row
  • Clear display name restores device name
  • No change to device identity or protocol; local-only