Skip to content

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

Merged
thebentern merged 9 commits into
mainfrom
protobuf-sync
Jun 15, 2026
Merged

feat(protobufs): sync to firmware-current and consume workspace package#1097
thebentern merged 9 commits into
mainfrom
protobuf-sync

Conversation

@thebentern

Copy link
Copy Markdown
Contributor

What this does

  • Syncs the vendored .proto sources in packages/protobufs/meshtastic/ from ~v2.7.20 to firmware-current (v2.7.25 + 48 commits) — +2 new files (deviceonly_legacy, serial_hal) and additions across config / module_config / mesh / admin / portnums / telemetry.
  • Regenerates the v2 TS bindings (buf generate).
  • Makes the app consume the workspace protobufs (workspace:*) instead of the stale JSR @meshtastic/protobufs@2.7.20, finishing the monorepo migration that was half-done (@meshtastic/core was already workspace:*; protobufs was still on JSR).
  • One breaking-change fix: admin.proto nodedb_reset changed int32 → bool, so MeshDevice.resetNodes() now sends value: true (the oneof-case presence triggers the reset; true preserves 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, serial LOG/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.proto NodeInfoLite restructure — core never imports NodeInfoLite.
  • channel.proto is_client_muted → is_muted + mute removed — neither web nor core references those fields yet.

Consumption approach — for review

This takes workspace consumption: rename @meshtastic/protobufs-ws → @meshtastic/protobufs (still private), point its exports at the TS source, and depend on it via workspace:* from root + core.

The alternative is to keep the package JSR-published — sync the .proto sources here, publish a new @meshtastic/protobufs to JSR, then bump the root range. Happy to reshape if that's preferred; the .proto sync, the regen, and the nodedbReset fix are identical either way — only the 3 dependency-wiring edits change.

Regenerating bindings

pnpm --filter @meshtastic/protobufs gen

Output lands in packages/protobufs/packages/ts/dist/ (gitignored).

Verification

  • packages/core typecheck: clean except 2 pre-existing queue.ts strict-catch errors.
  • packages/web vite build: green.
  • 36 config / module validation tests: pass.

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.
Copilot AI review requested due to automatic review settings June 13, 2026 23:32
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web-test Ready Ready Preview, Comment Jun 15, 2026 6:21pm

Request Review

Copilot AI 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.

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/core to depend on @meshtastic/protobufs via workspace:* (and update lockfile).
  • Update protobuf exports to the new generated layout (dist/meshtastic/*) and sync .proto sources (including new proto files).
  • Update MeshDevice.resetNodes() to send nodedbReset: true (bool) per updated admin.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

Comment thread packages/protobufs/package.json
Comment thread packages/protobufs/packages/ts/mod.ts
Comment thread packages/protobufs/meshtastic/mesh.proto
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

Copilot AI 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.

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.json now 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 like serial_hal), or (b) restore subpath exports (e.g. ./*) so consumers can import individual generated files without going through mod.ts.

Comment thread packages/protobufs/meshtastic/channel.proto
Comment thread packages/protobufs/package.json
Comment thread packages/protobufs/meshtastic/mesh.proto
Comment thread packages/protobufs/meshtastic/mesh.proto
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.
@danditomaso

Copy link
Copy Markdown
Collaborator

@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.

Picks up the #1062 revert (#1100). Clean auto-merge — #1097 had already dropped #1062, so both sides agree.
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.
@thebentern thebentern merged commit bbe9a0d into main Jun 15, 2026
4 checks passed
@thebentern thebentern deleted the protobuf-sync branch June 15, 2026 18:23
thebentern added a commit that referenced this pull request Jun 15, 2026
…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.
thebentern added a commit that referenced this pull request Jun 15, 2026
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants