From 62a24709899431402784cee446bc4eab9aaff38c Mon Sep 17 00:00:00 2001 From: Meshtastic Contributor Date: Sun, 8 Mar 2026 20:44:42 +0000 Subject: [PATCH] docs: add PR description for display-names feature Made-with: Cursor --- docs/PULL_REQUEST_DISPLAY_NAMES.md | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/PULL_REQUEST_DISPLAY_NAMES.md diff --git a/docs/PULL_REQUEST_DISPLAY_NAMES.md b/docs/PULL_REQUEST_DISPLAY_NAMES.md new file mode 100644 index 00000000..81e865fb --- /dev/null +++ b/docs/PULL_REQUEST_DISPLAY_NAMES.md @@ -0,0 +1,43 @@ +# 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 device’s 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 + + + +--- + +## 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 + +- [x] Display name keyed by node number only +- [x] Shown in list, detail, and messages; editable from list context menu and detail row +- [x] Clear display name restores device name +- [x] No change to device identity or protocol; local-only