Skip to content

Handle deprecated DeviceConfig.Role.REPEATER (migration for existing repeater nodes)Β #2025

Description

@garthvh

πŸ€– Good task for an agent: this is a self-contained, well-scoped migration ideal for an automated coding agent.

Summary

The deprecated DeviceConfig.Role value REPEATER = 4 is absent from the Apple UI β€” DeviceRoles has no repeater case β€” but there is no migration path for existing nodes already set to REPEATER. A device configured as REPEATER has deviceRole = 4, and DeviceRoles(rawValue: 4) returns nil, so the role can't be displayed or safely reconfigured. Per the upstream deprecated-fields audit, REPEATER is being retired in favor of Router-based roles (the same infrastructure-role family Android guards with a router confirmation dialog). This was a ⚠️ (partial) row rather than a clean red X: the role is correctly not offered for new selection, but the missing-migration gap for existing repeater nodes remains.

Field Detail
Enum DeviceConfig.Role
Deprecated value REPEATER = 4
Announced v2.7.11 (2025-10-01)
Stable v2.7.15 (2025-11-19)
Reason Creates 'holes' in the mesh rebroadcast chain
Replacement Router-based roles (e.g. ROUTER)
Android status βœ… Filtered via isDeprecatedEnumEntry(); included in the infrastructureRoles guard so it triggers the router confirmation dialog when already set
Apple status ⚠️ Absent but no migration

Audit reference

https://github.com/meshtastic/design/blob/master/standards/audits/deprecated-fields-audit.md

Suggested approach

  1. Grep the Apple codebase for the role enum (e.g. DeviceRoles, .repeater, deviceRole, Config.DeviceConfig.Role) and where DeviceRoles(rawValue:) is used to render/select the role.
  2. Handle rawValue: 4 gracefully on read: don't crash or show blank when an existing node reports REPEATER β€” surface it (e.g. as a "Repeater (deprecated)" label) so the user can see and change it.
  3. Provide a migration path: prompt or guide users on REPEATER nodes toward a Router-based role, mirroring Android's infrastructure-role confirmation flow.
  4. Keep REPEATER out of the list of newly selectable roles (it already is), and verify a node currently set to REPEATER is displayed and can be reconfigured to a supported role.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions