feat(protobufs): sync to firmware-current and consume workspace package#1097
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the monorepo’s protobuf layer by syncing the vendored Meshtastic .proto sources to firmware-current, regenerating the TypeScript bindings layout, and switching the web/core workspaces to consume the local @meshtastic/protobufs workspace package instead of the older JSR-published dependency. It also adapts MeshDevice.resetNodes() to the upstream breaking change where admin.proto’s nodedb_reset becomes a bool.
Changes:
- Switch root +
@meshtastic/coreto depend on@meshtastic/protobufsviaworkspace:*(and update lockfile). - Update protobuf exports to the new generated layout (
dist/meshtastic/*) and sync.protosources (including new proto files). - Update
MeshDevice.resetNodes()to sendnodedbReset: true(bool) per updatedadmin.proto.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Switch protobuf dependency from JSR to workspace link; refresh related lock entries. |
| package.json | Consume workspace @meshtastic/protobufs from the repo root. |
| packages/core/package.json | Consume workspace @meshtastic/protobufs from @meshtastic/core. |
| packages/core/src/meshDevice.ts | Update nodedbReset payload to boolean true. |
| packages/protobufs/package.json | Rename workspace package to @meshtastic/protobufs and adjust exports/deps/scripts. |
| packages/protobufs/packages/ts/mod.ts | Update re-exports to match new generated dist/meshtastic/* path layout. |
| packages/protobufs/meshtastic/admin.proto | Sync admin schema updates (incl. nodedb_reset type change, new messages). |
| packages/protobufs/meshtastic/apponly.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/atak.proto | Sync proto sources (large expansion of TAK/CoT types and messages). |
| packages/protobufs/meshtastic/cannedmessages.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/channel.proto | Sync proto sources (field rename/removal related to mute/muted). |
| packages/protobufs/meshtastic/clientonly.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/config.proto | Sync proto sources (regions/presets/UI config additions). |
| packages/protobufs/meshtastic/connection_status.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/device_ui.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/deviceonly.proto | Sync proto sources (NodeDB split/reshape and new satellite entries). |
| packages/protobufs/meshtastic/deviceonly_legacy.proto | Add legacy NodeDB descriptor for migration decoding. |
| packages/protobufs/meshtastic/interdevice.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/localonly.proto | Sync proto sources (new module config entries). |
| packages/protobufs/meshtastic/mesh.proto | Sync proto sources (new enums/messages/fields, docs updates). |
| packages/protobufs/meshtastic/module_config.proto | Sync proto sources (new module configs and fields). |
| packages/protobufs/meshtastic/mqtt.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/paxcount.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/portnums.proto | Sync proto sources (new port numbers). |
| packages/protobufs/meshtastic/powermon.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/remote_hardware.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/rtttl.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/serial_hal.proto | Add new Serial HAL command/response protos. |
| packages/protobufs/meshtastic/storeforward.proto | Sync proto sources to firmware-current. |
| packages/protobufs/meshtastic/telemetry.proto | Sync proto sources (new metrics/messages/enums). |
| packages/protobufs/meshtastic/xmodem.proto | Sync proto sources to firmware-current. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
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
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 57 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (1)
packages/protobufs/packages/ts/mod.ts:1
- With
package.jsonnow exporting only".", any generated modules not re-exported here (e.g.SerialHal,DeviceOnly,DeviceUI,Interdevice,DeviceOnlyLegacy) become effectively inaccessible to consumers. Either (a) re-export the full surface area needed (including newly added protos likeserial_hal), or (b) restore subpath exports (e.g../*) so consumers can import individual generated files without going throughmod.ts.
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.
Resolves package.json conflict: takes main's @bufbuild/protobuf ^2.12.0 bump (#1095) and keeps the workspace:* @meshtastic/protobufs consumption. Lockfile + vendored bindings regenerated; web build green.
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.
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.
#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.
|
@thebentern I love that you completed the mono-repo packages -> apps folder migration, i'm not sure why that wasn't done on my end but i'm glad to see it landed. I'm happy to continue on using the git submodule of protobufs so long as i dont encounter further issues using them. Thanks for this. Since there are so many changes its pretty difficult to review all changes so i'm relying on the smoke testing you did prior to creating this PR. |
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.
…1110) The Release Web workflow builds the Docker image with the repo root as context (file: ./apps/web/infra/Containerfile), but the Containerfile's ADD/COPY still referenced ./packages/web/dist and ./packages/web/infra/default.conf. After #1097 moved the web app to apps/web, those paths no longer exist, so buildx failed with '"/packages/web/infra/default.conf": not found'. Point both at ./apps/web/. Verified with a local multi-stage docker build against the apps/web build output.
…ge (#1120) #1050 (Phase C) deleted packages/core in favor of @meshtastic/sdk, but the squash-merge hit a delete/modify conflict with #1097 (which had modified packages/core/package.json and src/meshDevice.ts), leaving those two files behind as a broken stub. Its package.json still declared a tsdown build (entry: "mod.ts") while mod.ts and the rest of the source were gone, so the 'Push to Main CI' build-and-package loop failed with: Error: Cannot find entry: "mod.ts" Nothing depends on the workspace @meshtastic/core — the app resolves @meshtastic/core to the JSR-published @jsr/meshtastic__core@2.6.6 — so finish the deletion and drop the now-unused pnpm-lock importer. Verified locally: frozen-lockfile install passes and the full build-and-package loop builds every package green (sdk, sdk-react, sdk-storage-sqlocal, all transports).
What this does
.protosources inpackages/protobufs/meshtastic/from ~v2.7.20 to firmware-current (v2.7.25 + 48 commits) — +2 new files (deviceonly_legacy,serial_hal) and additions acrossconfig/module_config/mesh/admin/portnums/telemetry.buf generate).workspace:*) instead of the stale JSR@meshtastic/protobufs@2.7.20, finishing the monorepo migration that was half-done (@meshtastic/corewas alreadyworkspace:*; protobufs was still on JSR).admin.protonodedb_resetchangedint32 → bool, soMeshDevice.resetNodes()now sendsvalue: true(the oneof-case presence triggers the reset;truepreserves favorites through it).Free wins (dynamic enum dropdowns — no UI code)
New LoRa regions (ITU/EU amateur bands), modem presets (LONG_TURBO, LITE/NARROW/TINY_*), ~25 hardware names,
OLED_SH1107_ROTATED, serialLOG/LOGTEXT— these flow into the existing enum-bound<select>s automatically once the bindings regenerate.Breaking proto changes that DON'T break us (verified)
deviceonly.protoNodeInfoLiterestructure — core never importsNodeInfoLite.channel.protois_client_muted → is_muted+muteremoved — neither web nor core references those fields yet.Consumption approach — for review
This takes workspace consumption: rename
@meshtastic/protobufs-ws → @meshtastic/protobufs(stillprivate), point itsexportsat the TS source, and depend on it viaworkspace:*from root + core.The alternative is to keep the package JSR-published — sync the
.protosources here, publish a new@meshtastic/protobufsto JSR, then bump the root range. Happy to reshape if that's preferred; the.protosync, the regen, and thenodedbResetfix are identical either way — only the 3 dependency-wiring edits change.Regenerating bindings
Output lands in
packages/protobufs/packages/ts/dist/(gitignored).Verification
packages/coretypecheck: clean except 2 pre-existingqueue.tsstrict-catch errors.packages/webvite build: green.