Skip to content

XEdDSA packet signing UI (BaseUI)#10841

Open
Xaositek wants to merge 1 commit into
developfrom
baseui_xeddsa_ui
Open

XEdDSA packet signing UI (BaseUI)#10841
Xaositek wants to merge 1 commit into
developfrom
baseui_xeddsa_ui

Conversation

@Xaositek

@Xaositek Xaositek commented Jul 1, 2026

Copy link
Copy Markdown
Contributor
  • Node screen: Added to Favorite frame to identify a node can sign packets
  • Message/text screen: Added to messages list so a "*" will be added to signed messages ahead of the node name

image
image
image

Summary by CodeRabbit

  • New Features

    • Signed messages can now be visually marked in the app with a new badge/icon.
    • Message headers and favorite-user rows now reserve space so the new indicator displays cleanly.
  • Bug Fixes

    • Signed-message status is now saved and restored consistently, so the indicator remains accurate after app restarts.

@Xaositek Xaositek requested a review from HarukiToreda July 1, 2026 17:23
@Xaositek Xaositek self-assigned this Jul 1, 2026
@Xaositek Xaositek added enhancement New feature or request baseui Issues directly related to BaseUI 2.8 labels Jul 1, 2026
@Xaositek Xaositek linked an issue Jul 1, 2026 that may be closed by this pull request
2 tasks
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a persisted xeddsaSigned boolean to StoredMessage and its on-flash record, populated from incoming packets, serialized/deserialized in MessageStore, and surfaced in the UI via a new shield bitmap icon plus a sender-name prefix/icon in message headers and favorite node rows.

Changes

XEdDSA Signed Message Tracking and Display

Layer / File(s) Summary
Persist xeddsaSigned flag
src/MessageStore.h, src/MessageStore.cpp
Adds bool xeddsaSigned to StoredMessage (with constructor init) and a matching byte field in StoredMessageRecord; populates it from packet.xeddsa_signed in addFromPacket(), writes it as 0/1 in writeMessageRecord(), and restores it in readMessageRecord(), all guarded by PKI-keygen exclusion macros.
Render signed indicators
src/graphics/images.h, src/graphics/draw/MessageRenderer.cpp, src/graphics/draw/UIRenderer.cpp
Adds a new xeddsa_shield PROGMEM bitmap; reserves width and inserts a * sign prefix before sender names in message headers when signed; conditionally draws the shield icon and shifts username text/highlight positioning in drawFavoriteNode.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Poem

A shield so small, eight pixels tall,
Now guards the names above the wall.
A star, a byte, saved snug and tight,
Signed messages glow just right. 🛡️✨
Hop hop, review, then merge tonight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description summarizes the UI changes but omits the required attestations/testing section from the template. Add the Attestations section and state what devices/tests were run, or note if you could not test the affected hardware; include any bug-fix reference if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: BaseUI support for XEdDSA packet-signing status in the UI.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 lift

Add a versioned header to MessageStore persistence (src/MessageStore.cpp:288-337)
saveToFlash() still writes a raw count followed by fixed-size records, but StoredMessageRecord changed 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 win

Consider a shared macro for the repeated PKI-exclusion guard.

#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI) is duplicated verbatim here and in MessageRenderer.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

📥 Commits

Reviewing files that changed from the base of the PR and between e64d205 and fb0c13c.

📒 Files selected for processing (5)
  • src/MessageStore.cpp
  • src/MessageStore.h
  • src/graphics/draw/MessageRenderer.cpp
  • src/graphics/draw/UIRenderer.cpp
  • src/graphics/images.h

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Flash this PR in the Web Flasher

firmware commit boards expires

Warning

This is an automated, unreviewed CI test build. Back up your device configuration
before flashing, and only flash devices you are able to recover.

Supported boards built by this PR (25)
Device Board Platform
Crowpanel Adv 3.5 TFT elecrow-adv-35-tft esp32-s3
Heltec HT62 heltec-ht62-esp32c3-sx1262 esp32-c3
Heltec Mesh Node 096 heltec-mesh-node-t096 nrf52840
Heltec Mesh Node T1 heltec-mesh-node-t1 nrf52840
Heltec Mesh Node T114 heltec-mesh-node-t114 nrf52840
Heltec V3 heltec-v3 esp32-s3
Heltec V4 heltec-v4 esp32-s3
Raspberry Pi Pico pico rp2040
Raspberry Pi Pico W picow rp2040
RAK WisMesh Tag rak_wismeshtag nrf52840
RAK WisBlock 11200 rak11200 esp32
RAK WisBlock 11310 rak11310 rp2040
RAK3312 rak3312 esp32-s3
RAK WisBlock 4631 rak4631 nrf52840
Seeed Wio Tracker L1 seeed_wio_tracker_L1 nrf52840
Seeed Xiao NRF52840 Kit seeed_xiao_nrf52840_kit nrf52840
Seeed Xiao ESP32-S3 seeed-xiao-s3 esp32-s3
Station G2 station-g2 esp32-s3
Station G3 station-g3 esp32-s3
LILYGO T-Deck t-deck-tft esp32-s3
LILYGO T-Echo t-echo nrf52840
LILYGO T-Echo Plus t-echo-plus nrf52840
LILYGO T-Impulse Plus t-impulse-plus nrf52840
LilyGo T3-C6 tlora-c6 esp32-c6
Seeed SenseCAP T1000-E tracker-t1000-e nrf52840

Build artifacts expire on 2026-07-31. Updated for fb0c13c.

@github-actions github-actions Bot added the needs-review Needs human review label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Firmware Size Report

22 targets | vs develop: 22 increased, net +26,128 (+25.5 KB)

Target Size vs develop
t-deck-tft 3,818,112 📈 +7,440 (+7.3 KB)
heltec-vision-master-e213-inkhud 2,230,416 📈 +3,056 (+3.0 KB)
elecrow-adv-35-tft 3,418,448 📈 +1,824 (+1.8 KB)
heltec-v3 2,265,040 📈 +960
rak11200 1,861,552 📈 +944
Show 17 more target(s)
Target Size vs develop
rak3312 2,273,168 📈 +928
seeed-xiao-s3 2,277,072 📈 +928
station-g2 2,267,264 📈 +912
station-g3 2,267,264 📈 +912
t-eth-elite 2,492,384 📈 +896
heltec-v4 2,278,144 📈 +848
pico2w 1,221,268 📈 +752
picow 1,245,576 📈 +696
pico2 770,456 📈 +680
seeed_xiao_rp2350 768,616 📈 +680
pico 783,352 📈 +664
rak11310 806,088 📈 +664
seeed_xiao_rp2040 781,552 📈 +648
tlora-c6 2,368,912 📈 +608
heltec-ht62-esp32c3-sx1262 2,135,584 📈 +592
wio-e5 238,916 📈 +288
rak3172 186,504 📈 +208

Updated for 3ba560e

@HarukiToreda HarukiToreda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@Nullvoid3771 Nullvoid3771 mentioned this pull request Jul 1, 2026
58 tasks
@thebentern thebentern requested a review from jp-bennett July 2, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.8 baseui Issues directly related to BaseUI enhancement New feature or request needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.8.0] XEdDSA packet signing UI (BaseUI)

3 participants