feat(protobufs): sync to firmware-current and consume workspace package (#1097)

* feat(protobufs): sync to firmware-current and consume workspace package

Sync the vendored .proto sources to firmware-current (v2.7.25+48), regenerate the v2 TS bindings, and consume the workspace @meshtastic/protobufs (workspace:*) in place of the stale JSR 2.7.20 — finishing the monorepo migration (core was already workspace:*).

Includes the one required breaking-change fix: admin nodedb_reset changed int32 to bool, so resetNodes() now sends value: true.

* build(protobufs): vendor generated bindings for workspace consumers

The package is consumed via workspace:* — its exports point at the TS source, which imports ./dist/meshtastic/*_pb.ts — so the generated output must exist at build time. CI builds web/core with no codegen step and the runners have no buf CLI, so the bindings are vendored here (kept gitignored; lint/format skip them). Regenerate with: pnpm --filter @meshtastic/protobufs gen

* fix(protobufs): clean script removes the actual generated output dir

buf writes bindings to packages/ts/dist, but clean was removing a non-existent root dist — so it never cleaned stale output. Addresses Copilot review feedback.

* refactor: move web app packages/web -> apps/web

Aligns the web app with the apps/web layout (matching the Vercel web-test Root Directory and the SDK-migration direction). Pure directory move plus root config: pnpm-workspace (adds apps/*), vitest projects, root tsconfig reference, and the pr/release-web/nightly workflows. vercel.json moved with the app. Build + 36 validation tests green.

* feat: config fields, module pages, key verification, telemetry capture

Incorporates the firmware-current feature work onto the protobuf foundation: new config fields (Display message bubbles; LoRa fem_lna_mode + serial_hal_only; Telemetry air_quality_screen_enabled); 4 new ModuleConfig pages (TrafficManagement, StatusMessage, TAK, RemoteHardware); the manual Key Verification flow (sendKeyVerification + ClientNotificationDialog stages + Verify Key button); live telemetry capture (nodeDB addDeviceMetrics) and admin hardening (toggleMutedNode, graceful PortNum default); plus the sdk-preview ConfigEditor demo and store/config tests. Build + lint + format + 131 tests green.

* chore: drop #1062 (unsaved-change-detection) to match upstream revert

#1062 was merged to main by accident (per @danditomaso) and is being reverted. Reverse-applied its diff here via 3-way so #1097 stays consistent with where main is headed, while keeping the feature changes layered on the same files (deviceStore/changeRegistry). Build + 131 tests + lint + format green.

* fix(nodes): clean up SNR display in node table and map popup

SNR is a ratio measured in dB, not dBm (which is absolute power); the
node table and map popup both mislabeled it and crammed three values
together: '0dBm/50%/50raw'. The trailing '%/raw' pair was the same
heuristic ((snr+10)*5) shown twice — once clamped, once not.

Render SNR in dB rounded to one decimal, color-coded by a 0-100%
signal-quality heuristic (green/yellow/red), with the quality percentage
as a muted secondary. Drop the redundant raw value. Adds unit.db; this
matches the existing SNRTooltip, which already renders dB.
This commit is contained in:
Ben Meadors
2026-06-15 13:23:28 -05:00
committed by GitHub
parent 7a8529b841
commit bbe9a0d5cd
695 changed files with 27038 additions and 786 deletions
+87 -35
View File
@@ -2,6 +2,7 @@ syntax = "proto3";
package meshtastic;
/* trunk-ignore(buf-lint/COMPILE) */
import "meshtastic/channel.proto";
import "meshtastic/config.proto";
import "meshtastic/localonly.proto";
@@ -12,7 +13,7 @@ import "nanopb.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "DeviceOnly";
option java_package = "com.geeksville.mesh";
option java_package = "org.meshtastic.proto";
option swift_prefix = "";
option (nanopb_fileopt).include = "<vector>";
@@ -49,6 +50,11 @@ message PositionLite {
* TODO: REPLACE
*/
Position.LocSource location_source = 5;
/*
* Indicates the bits of precision set by the sending node
*/
uint32 precision_bits = 6;
}
message UserLite {
@@ -106,20 +112,15 @@ message NodeInfoLite {
*/
uint32 num = 1;
/*
* The user info for this node
*/
UserLite user = 2;
// Tag 2 was UserLite user; flattened into tags 14..18 (presence via
// NODEINFO_BITFIELD_HAS_USER).
// Tag 3 was PositionLite position; moved to NodeDatabase.positions.
reserved 2, 3;
reserved "user", "position";
/*
* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
* Position.time now indicates the last time we received a POSITION from that node.
*/
PositionLite position = 3;
/*
* Returns the Signal-to-noise ratio (SNR) of the last received message,
* as measured by the receiver. Return SNR of the last received message in dB
* In-memory SNR of the last received message in dB. Not serialised directly:
* always zeroed before encode; persisted as snr_q4 = 19 below.
*/
float snr = 4;
@@ -127,48 +128,69 @@ message NodeInfoLite {
* Set to indicate the last time we received a packet from this node
*/
fixed32 last_heard = 5;
/*
* The latest device metrics for the node.
*/
DeviceMetrics device_metrics = 6;
// Tag 6 was DeviceMetrics device_metrics; moved to NodeDatabase.telemetry.
reserved 6;
reserved "device_metrics";
/*
* local channel index we heard that node on. Only populated if its not the default channel.
*/
uint32 channel = 7;
/*
* True if we witnessed the node over MQTT instead of LoRA transport
*/
bool via_mqtt = 8;
// Tags 8/10/11 were via_mqtt/is_favorite/is_ignored bools; packed into bitfield.
reserved 8, 10, 11;
reserved "via_mqtt", "is_favorite", "is_ignored";
/*
* Number of hops away from us this node is (0 if direct neighbor)
*/
optional uint32 hops_away = 9;
/*
* True if node is in our favorites list
* Persists between NodeDB internal clean ups
*/
bool is_favorite = 10;
/*
* True if node is in our ignored list
* Persists between NodeDB internal clean ups
*/
bool is_ignored = 11;
/*
* Last byte of the node number of the node that should be used as the next hop to reach this node.
*/
uint32 next_hop = 12;
/*
* Bitfield for storing booleans.
* LSB 0 is_key_manually_verified
* Bitfield for storing booleans. See NODEINFO_BITFIELD_* in src/mesh/NodeDB.h.
*/
uint32 bitfield = 13;
// Flattened user fields (formerly UserLite). macaddr dropped (deprecated 1.2.11).
/*
* A full name for this user, i.e. "Kevin Hester".
*/
string long_name = 14;
/*
* A VERY short name, ideally two characters or an emoji.
* Suitable for a tiny OLED screen.
*/
string short_name = 15;
/*
* Hardware model the user's device is running.
*/
HardwareModel hw_model = 16;
/*
* The user's role in the mesh.
*/
Config.DeviceConfig.Role role = 17;
/*
* The public key of the user's device, for PKI-based encrypted DMs.
*/
bytes public_key = 18;
/*
* Q4-encoded SNR: dB × 4, sint32 zigzag. Matches RouteDiscovery convention.
* Encode: snr_q4 = (int32_t)(snr * 4.0f). Decode: snr = snr_q4 / 4.0f.
* float snr is always zeroed on disk; this field carries all persisted SNR.
*/
sint32 snr_q4 = 19;
}
/*
@@ -234,6 +256,29 @@ message DeviceState {
repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13;
}
// Satellite per-node entries; stored alongside the slim NodeInfoLite so nodes
// that never report don't pay the embedded cost.
message NodePositionEntry {
uint32 num = 1;
PositionLite position = 2;
}
message NodeTelemetryEntry {
uint32 num = 1;
DeviceMetrics device_metrics = 2;
}
message NodeEnvironmentEntry {
uint32 num = 1;
EnvironmentMetrics environment_metrics = 2;
}
message NodeStatusEntry {
uint32 num = 1;
StatusMessage status = 2;
}
message NodeDatabase {
/*
* A version integer used to invalidate old save files when we make
@@ -246,6 +291,13 @@ message NodeDatabase {
* New lite version of NodeDB to decrease memory footprint
*/
repeated NodeInfoLite nodes = 2 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeInfoLite>"];
// Per-NodeNum satellite arrays. Constrained platforms (e.g. STM32WL) omit
// these via MESHTASTIC_EXCLUDE_*DB build flags.
repeated NodePositionEntry positions = 3 [(nanopb).callback_datatype = "std::vector<meshtastic_NodePositionEntry>"];
repeated NodeTelemetryEntry telemetry = 4 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeTelemetryEntry>"];
repeated NodeStatusEntry status = 5 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeStatusEntry>"];
repeated NodeEnvironmentEntry environment = 6 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeEnvironmentEntry>"];
}
/*