XEdDSA packet signing UI (BaseUI)#10841
Conversation
📝 WalkthroughWalkthroughAdds a persisted ChangesXEdDSA Signed Message Tracking and Display
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/MessageStore.cpp (1)
229-286: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftAdd a versioned header to
MessageStorepersistence(src/MessageStore.cpp:288-337)
saveToFlash()still writes a raw count followed by fixed-size records, butStoredMessageRecordchanged layout here. Older flash files will be read with the new layout and restore corrupted cached messages on first boot after upgrade. Reject incompatible files or bump the file format before reading records.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/MessageStore.cpp` around lines 229 - 286, The MessageStore persistence format is still being read as a raw count plus fixed-size StoredMessageRecord entries, so the new StoredMessageRecord layout will corrupt older flash data on upgrade. Add a versioned file header in saveToFlash()/loadFromFlash() (or equivalent MessageStore persistence entry points) and validate it before reading records, so incompatible files are rejected or migrated instead of deserialized with the new layout.
🧹 Nitpick comments (1)
src/MessageStore.cpp (1)
186-189: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider a shared macro for the repeated PKI-exclusion guard.
#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI)is duplicated verbatim here and inMessageRenderer.cpp/UIRenderer.cpp. A single named macro (e.g.MESHTASTIC_HAS_XEDDSA_SIGNING) would reduce the risk of the condition drifting between the three sites.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/MessageStore.cpp` around lines 186 - 189, The PKI-exclusion preprocessor guard is duplicated across MessageStore, MessageRenderer, and UIRenderer, so the condition can drift over time. Introduce a single shared macro such as MESHTASTIC_HAS_XEDDSA_SIGNING and replace the repeated `#if` !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI) checks in the relevant xeddsa_signed handling paths with that macro to keep the logic consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/MessageStore.cpp`:
- Around line 229-286: The MessageStore persistence format is still being read
as a raw count plus fixed-size StoredMessageRecord entries, so the new
StoredMessageRecord layout will corrupt older flash data on upgrade. Add a
versioned file header in saveToFlash()/loadFromFlash() (or equivalent
MessageStore persistence entry points) and validate it before reading records,
so incompatible files are rejected or migrated instead of deserialized with the
new layout.
---
Nitpick comments:
In `@src/MessageStore.cpp`:
- Around line 186-189: The PKI-exclusion preprocessor guard is duplicated across
MessageStore, MessageRenderer, and UIRenderer, so the condition can drift over
time. Introduce a single shared macro such as MESHTASTIC_HAS_XEDDSA_SIGNING and
replace the repeated `#if` !(MESHTASTIC_EXCLUDE_PKI_KEYGEN ||
MESHTASTIC_EXCLUDE_PKI) checks in the relevant xeddsa_signed handling paths with
that macro to keep the logic consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 197cc79c-9974-4a3e-8b54-953dde6fd9a3
📒 Files selected for processing (5)
src/MessageStore.cppsrc/MessageStore.hsrc/graphics/draw/MessageRenderer.cppsrc/graphics/draw/UIRenderer.cppsrc/graphics/images.h
⚡ Try this PR in the Web FlasherWarning This is an automated, unreviewed CI test build. Back up your device configuration Supported boards built by this PR (25)
Build artifacts expire on 2026-07-31. Updated for |
Firmware Size Report22 targets | vs
Show 17 more target(s)
Updated for 3ba560e |
Summary by CodeRabbit
New Features
Bug Fixes