Skip to content

feat: local display names for nodes#4743

Open
gilindoesgit wants to merge 2 commits intomeshtastic:mainfrom
gilindoesgit:feature/display-names
Open

feat: local display names for nodes#4743
gilindoesgit wants to merge 2 commits intomeshtastic:mainfrom
gilindoesgit:feature/display-names

Conversation

@gilindoesgit
Copy link

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

StorageNodeDisplayNamePrefs (DataStore), keyed by node number
ScopeNode list, node detail, detail screen title
Edit entry pointsLong-press node → “Set display name”; Node detail → “Display name” row

UI

  • Node list – Each row shows the custom display name when set, otherwise the device long name.
  • Long-press menu – “Set display name” (Edit icon) opens a dialog to set or clear the name.
  • Node detail – Title shows the display name; a “Display name” row in the Details card is tappable to edit.
  • Edit dialog – Text field (“Local name for this node”), Save, Cancel, and Clear display name.

Technical details

  • Key: Display names are stored and looked up by node number (num), the unique node ID.
  • Persistence: Single DataStore preference; map encoded as num\u0001name\u0002… with escaping for names containing delimiters.
  • **New strings: set_display_name, display_name, display_name_hint, clear_display_name (default locale only in this PR).

Testing

  • Unit tests: core/prefs/…/NodeDisplayNamePrefsTest.kt (defaults, set/get, clear, multiple nodes, trim).
  • Run: ./gradlew :core:prefs:testDebugUnitTest

Checklist

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

Meshtastic Contributor added 2 commits March 8, 2026 20:43
- Add NodeDisplayNamePrefs (DataStore) keyed by node number
- Show custom name in node list, detail, and use in GetNodeDetailsUseCase
- Add EditNodeDisplayNameSheet and 'Set display name' in list context menu
- Add Display name row in node detail (tap to edit)
- Unit tests for NodeDisplayNamePrefsImpl

Made-with: Cursor
@github-actions github-actions bot added the enhancement New feature or request label Mar 8, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Meshtastic Contributor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Needs CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants