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 authored and GitHub committed 2026-06-15 13:23:28 -05:00
1 parent 7a8529b841
commit bbe9a0d5cd
695 files changed
+27038 -786

No files matched your search

+6 -6
View File
@@ -37,18 +37,18 @@ jobs:
run: pnpm run test
- name: Build web package
working-directory: packages/web
working-directory: apps/web
run: pnpm run build
- name: Package output
working-directory: packages/web
working-directory: apps/web
run: pnpm run package
- name: Upload compressed build (artifact)
uses: actions/upload-artifact@v7
with:
name: web-build-nightly
path: packages/web/dist/build.tar
path: apps/web/dist/build.tar
if-no-files-found: error
- name: Compute tags and labels
@@ -64,8 +64,8 @@ jobs:
# Try to use latest release tag if it exists; fallback to package version; else date
LATEST_TAG="$(gh release view --json tagName --jq .tagName 2>/dev/null || true)"
if [ -z "$LATEST_TAG" ] && [ -f packages/web/package.json ]; then
LATEST_TAG="v$(jq -r .version packages/web/package.json)"
if [ -z "$LATEST_TAG" ] && [ -f apps/web/package.json ]; then
LATEST_TAG="v$(jq -r .version apps/web/package.json)"
fi
if [ -n "${LATEST_TAG:-}" ] && [ "$LATEST_TAG" != "vnull" ]; then
@@ -89,7 +89,7 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
containerfiles: |
./packages/web/infra/Containerfile
./apps/web/infra/Containerfile
image: ${{ env.REGISTRY_IMAGE }}
tags: |
${{ steps.meta.outputs.moving_tag }}
+1 -1
View File
@@ -57,4 +57,4 @@ jobs:
run: pnpm run test
- name: Build web package
run: pnpm --filter "./packages/web" run build
run: pnpm --filter "./apps/web" run build
+5 -5
View File
@@ -49,25 +49,25 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Build web package
working-directory: packages/web
working-directory: apps/web
run: pnpm run build
- name: Create release archive
working-directory: packages/web
working-directory: apps/web
run: pnpm run package
- name: Upload archive (artifact)
uses: actions/upload-artifact@v7
with:
name: web-build
path: packages/web/dist/build.tar
path: apps/web/dist/build.tar
if-no-files-found: error
- name: Attach archive to GitHub Release
if: ${{ github.event_name == 'release' || inputs.attach_to_release == true }}
uses: softprops/action-gh-release@v3
with:
files: packages/web/dist/build.tar
files: apps/web/dist/build.tar
tag_name: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.tag_name }}
fail_on_unmatched_files: true
env:
@@ -132,7 +132,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
file: ./packages/web/infra/Containerfile
file: ./apps/web/infra/Containerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.tag_name != '') }}
tags: ${{ steps.meta.outputs.tags }}
+65
View File
@@ -0,0 +1,65 @@
# Protobuf catch-up to firmware-current
> Draft PR description + the one decision for maintainers. This file is **untracked** —
> use it as the PR body, then delete it (or leave it, it won't be committed).
## 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` — they 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.
## The one decision for maintainers — how to consume the protobufs
This changeset takes **Option A (workspace consumption):** rename the workspace package
`@meshtastic/protobufs-ws → @meshtastic/protobufs` (still `private`), point its `exports` at the
TS source, and depend on it via `workspace:*` from root + core.
- ✅ Monorepo is self-consuming and always firmware-current; no publish round-trip; matches
the already-migrated `@meshtastic/core`.
- ⚠️ Diverges from the JSR publish flow; the published JSR `@meshtastic/protobufs`
(latest 2.7.23) is no longer what the app builds against.
**Option B (canonical publish flow):** keep the package JSR-published — sync the `.proto`
sources here, publish a new `@meshtastic/protobufs` to JSR, then bump the root range.
- ✅ Stays on the established pipeline; one source of truth on JSR.
- ⚠️ Needs a JSR publish, and can't reach firmware-current until that release lands
(JSR tops out at 2.7.23, still behind firmware).
If you prefer **B**, everything except the 3 dependency-wiring edits still applies — the
`.proto` sync, the regen, and the `nodedbReset` fix are identical; only the root dep, the core
dep, and the protobufs `package.json` name/exports get swapped for a JSR publish + range bump.
## Regenerating bindings
```
pnpm --filter @meshtastic/protobufs gen
```
Output lands in `packages/protobufs/packages/ts/dist/` (gitignored).
## Verified in isolation (this branch only — no feature/demo code)
- `packages/core` typecheck: clean except 2 **pre-existing** `queue.ts` strict-catch errors.
- `packages/web` `vite build`: green.
- 36 config/module validation tests: pass.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -38,6 +38,8 @@
"@meshtastic/transport-web-bluetooth": "workspace:*",
"@meshtastic/transport-web-serial": "workspace:*",
"@noble/curves": "^1.9.2",
"@preact/signals-core": "^1.8.0",
"better-result": "^1.0.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-checkbox": "^1.3.3",
File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 164 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Loaded 100 of 695 files, more files were not shown because too many files have changed in this diff. Show more