Skip to content

feat(settings): wire is_unmessagable/is_licensed into DeviceProfile export/import#6065

Merged
jamesarich merged 1 commit into
mainfrom
claude/heuristic-moser-17befa
Jul 2, 2026
Merged

feat(settings): wire is_unmessagable/is_licensed into DeviceProfile export/import#6065
jamesarich merged 1 commit into
mainfrom
claude/heuristic-moser-17befa

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Why

meshtastic/protobufs#971 added is_unmessagable (tag 9) and is_licensed (tag 10) to the DeviceProfile message so exported/imported profiles can carry these per-node settings, mirroring a companion change on the CLI side (meshtastic/python#944). The proto pin already landed on main via #6063 — this wires the new fields into the app rather than leaving them silently unpopulated.

What changed

🌟 New Features

  • RadioConfigRepositoryImpl.deviceProfileFlow now includes is_unmessagable/is_licensed from the connected node's User when building a DeviceProfile for export.
  • EditDeviceProfileDialog's field picker gained two checkboxes (reusing the existing unmessageable/licensed_amateur_radio strings) so users can choose whether to include these in an exported/imported profile.
  • InstallProfileUseCase applies is_unmessagable on install.

🛠️ Deliberate scope limit

  • is_licensed is intentionally not auto-applied on install. Enabling ham mode is a dedicated onboarding flow (set_ham_mode: reboot, disable encryption, apply tx power/frequency) — see RadioConfigViewModel.saveUserConfig. A plain set_owner with is_licensed=true would flag the radio licensed without any of those required side effects, so the field round-trips through export/import for backup purposes only, with a comment explaining why it's excluded from install.

Testing Performed

  • Added InstallProfileUseCaseTest: asserts is_unmessagable is installed and is_licensed is never auto-installed.
  • Added lastSetOwnerUser capture hook to FakeRadioController to make the above assertable.
  • ./gradlew spotlessApply spotlessCheck detekt — clean (extracted two tag constants for a detekt magic-number rule).
  • :core:domain:allTests and :feature:settings:allTests (200+ tests) — all pass.

🤖 Generated with Claude Code

…xport/import

protobufs#971 added these fields to DeviceProfile for CLI/app profile
parity. Export/import now round-trips both via the profile picker
dialog; install applies is_unmessagable directly. is_licensed is
deliberately excluded from auto-install since enabling ham mode needs
the dedicated set_ham_mode flow (reboot, encryption disable, tx
power/frequency) that a plain set_owner would skip.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dcac42ec-10e0-44ca-bb57-f78e4ec374a4

📥 Commits

Reviewing files that changed from the base of the PR and between a90c09b and ceddf7c.

📒 Files selected for processing (5)
  • core/data/src/commonMain/kotlin/org/meshtastic/core/data/repository/RadioConfigRepositoryImpl.kt
  • core/domain/src/commonMain/kotlin/org/meshtastic/core/domain/usecase/settings/InstallProfileUseCase.kt
  • core/domain/src/commonTest/kotlin/org/meshtastic/core/domain/usecase/settings/InstallProfileUseCaseTest.kt
  • core/testing/src/commonMain/kotlin/org/meshtastic/core/testing/FakeRadioController.kt
  • feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/EditDeviceProfileDialog.kt
👮 Files not reviewed due to content moderation or server errors (5)
  • core/domain/src/commonMain/kotlin/org/meshtastic/core/domain/usecase/settings/InstallProfileUseCase.kt
  • core/data/src/commonMain/kotlin/org/meshtastic/core/data/repository/RadioConfigRepositoryImpl.kt
  • core/testing/src/commonMain/kotlin/org/meshtastic/core/testing/FakeRadioController.kt
  • core/domain/src/commonTest/kotlin/org/meshtastic/core/domain/usecase/settings/InstallProfileUseCaseTest.kt
  • feature/settings/src/commonMain/kotlin/org/meshtastic/feature/settings/radio/component/EditDeviceProfileDialog.kt

📝 Walkthrough

[!WARNING]

Walkthrough skipped

File diffs could not be summarized.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/heuristic-moser-17befa

Comment @coderabbitai help to get the list of available commands.

@jamesarich jamesarich added the refactor no functional changes label Jul 2, 2026
@jamesarich jamesarich merged commit 4d50e84 into main Jul 2, 2026
16 of 17 checks passed
@jamesarich jamesarich deleted the claude/heuristic-moser-17befa branch July 2, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactor no functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant