feat(messages): surface XEdDSA packet signing status (firmware 2.8+) (#3923)#3940
feat(messages): surface XEdDSA packet signing status (firmware 2.8+) (#3923)#3940Yeraze wants to merge 1 commit into
Conversation
…3923) Firmware 2.8 adds XEdDSA broadcast signing. The official mobile clients show a verified-signature shield in message details; MeshMonitor exposed nothing. This adds the flag end-to-end and renders a green shield 🛡️ wherever per-message metadata is shown. - Bump the `protobufs` submodule to master HEAD (v2.7.26 predates the field; no release tag carries it yet) to expose `MeshPacket.xeddsa_signed` (field 22). Protobufs are parsed at runtime, so the bump alone makes the wire field decodable. - Read `xeddsaSigned` off the decoded packet in the message-build path (camelCase + snake_case defensive read) and thread it through the TextMessage / DbMessage / MeshMessage types. - Persist it on the `messages` table via migration 113 across all three backends (SQLite/PostgreSQL/MySQL), mirroring the viaMqtt/viaStoreForward nullable-boolean pattern. - Serialize it in both DB->MeshMessage paths (server.ts + getRecentMessages) and the unified per-reception view so it survives reloads, plus realtime WebSocket via the built message object. - Render a shield in HopCountDisplay (MessagesTab/ChannelsTab) and in the UnifiedMessagesPage reception-stats modal. i18n key with English fallback. Tests: HopCountDisplay shield rendering, message repository round-trip persistence, migration registry count (112 -> 113). Full Vitest suite passes (0 failures); server tsc clean (no new errors); vite build OK. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AphLfgUJWaFNAgU5UXdJ4n
|
Claude finished @Yeraze's task —— View job PR Review: feat(messages): surface XEdDSA packet signing status (firmware 2.8+)
Overall this is a clean, well-structured feature addition that follows the project's existing patterns faithfully. The implementation is low-risk (additive, nullable column; no behavioral changes to existing paths). A few observations below. Protobuf / decode path
Backend
Database / migrationMigration 113 is idempotent across all three backends and follows the exact pattern of the prior
One subtle concern: The MySQL Frontend
Indicator ordering in Test coverage
Gap: There are no tests covering Minor nits
SummaryApprove with minor suggestions. The only actionable items worth addressing before merge:
Items 1 and 2 are the only ones I'd consider blocking. The rest are polish. |
|
⏸️ Deferred pending an official protobufs release. This PR is complete and green, but it requires bumping the vendored Per maintainer decision, we're holding this rather than shipping bleeding-edge protos. Unblock trigger: the next tagged Marking as draft to prevent accidental merge. All other work (migration 113, decode→DB→UI threading, 🛡️ shield, i18n, tests) is done and preserved on branch |
Closes #3923
Summary
Firmware 2.8 adds XEdDSA broadcast signing. The official mobile clients show a verified-signature shield for signed broadcasts in message details; MeshMonitor exposed nothing. This surfaces the signing status end-to-end and renders a green shield 🛡️ wherever per-message metadata is displayed.
What the field is
MeshPacket.xeddsa_signed(field 22, firmware 2.8+) — set by the receiving node when it cryptographically verified the broadcast's signature. Absent/false on pre-2.8 firmware and unsigned traffic.Changes
Protobuf
protobufssubmodule tomasterHEAD. The pinned tag (v2.7.26) predates the field and no release tag carries it yet — it only exists onorigin/master. Protobufs are parsed at runtime (protobufLoader.ts), so the bump alone makes the wire field decodable (verified with a round-trip encode/decode). AddedxeddsaSignedto the hand-writtenMeshPacketTS interface.Backend
xeddsaSignedoff the decoded packet in the text-message build path (defensive camelCase + snake_case read), threaded throughTextMessage/DbMessage(repo + facade) /MeshMessage.xeddsaSignedboolean to themessagestable across SQLite / PostgreSQL / MySQL, mirroring the existingviaMqtt/viaStoreForwardpattern. Registered in the migration registry (count 112 → 113).server.tstransformDbMessageToMeshMessageandgetRecentMessages) plus the unified per-reception view, so the flag survives reloads. Realtime is covered by the built message object emitted over WebSocket.Frontend
HopCountDisplayrenders a green 🛡️ shield whenxeddsaSignedis true, alongside the existing MQTT/S&F indicators (wired inMessagesTab×2 andChannelsTab).UnifiedMessagesPagereception-stats modal shows the shield per signed reception.messages.xeddsa_signed(English) with an inline fallback string.Scope note
This PR covers the packet-level
xeddsa_signedflag (the "green shield for verified signed broadcasts"). The separate node-levelUser.has_xeddsa_signed("this node signs its packets") is a natural follow-up for the node-detail view and is intentionally out of scope here to keep the change focused.Testing
HopCountDisplay.test.tsx: shield renders for true / hidden for false/undefined / co-exists with MQTT + S&F indicators / appears with hop count and with SNR-RSSI direct-message rendering.messages.insert.test.ts: round-trip persistence of the column (stored as 1 / NULL; read back astruevia the async path).migrations.test.ts: registry count and last-migration assertions updated to 113.success: true, 8623 tests). Servertsc -p tsconfig.server.jsonclean (no new errors; only the ~pre-existing TelemetryChart ones remain).vite buildOK. ESLint 0 errors on changed files.🤖 Generated with Claude Code
https://claude.ai/code/session_01AphLfgUJWaFNAgU5UXdJ4n