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 + +
| Storage | NodeDisplayNameStore (UserDefaults), keyed by node number |
| Scope | Node list, node detail, messages (user list & relay), compass waypoint name |
| Edit entry points | Long-press node → “Set display name”; Node detail → “Display name” row |
displayLongName / displayShortName.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