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
@@ -0,0 +1,177 @@
import { TimeAgo } from "@components/generic/TimeAgo";
import { Separator } from "@components/UI/Separator.tsx";
import type { WaypointWithMetadata } from "@core/stores";
import { useNodeDB } from "@core/stores";
import { bearingDegrees, distanceMeters, hasPos, toLngLat } from "@core/utils/geo";
import type { Protobuf } from "@meshtastic/core";
import {
ClockFadingIcon,
ClockPlusIcon,
CompassIcon,
MapPinnedIcon,
MoveHorizontalIcon,
NavigationIcon,
RotateCwIcon,
UserLockIcon,
} from "lucide-react";
import { useTranslation } from "react-i18next";
interface WaypointDetailProps {
waypoint: WaypointWithMetadata;
myNode?: Protobuf.Mesh.NodeInfo;
onEdit: () => void;
}
export const WaypointDetail = ({ waypoint, myNode }: WaypointDetailProps) => {
const { t } = useTranslation("map");
const { getNode } = useNodeDB();
const waypointLngLat = toLngLat({
latitudeI: waypoint.latitudeI,
longitudeI: waypoint.longitudeI,
});
const distance = hasPos(myNode?.position)
? distanceMeters(toLngLat(myNode?.position), waypointLngLat)
: undefined;
const bearing = hasPos(myNode?.position)
? bearingDegrees(toLngLat(myNode?.position), waypointLngLat)
: undefined;
return (
<article
aria-labelledby={`wp-${waypoint.id}-title`}
className="flex flex-col gap-2 px-1 text-sm dark:text-slate-900"
>
<header className="flex items-center my-1 justify-between">
<h3
id={`wp-${waypoint.id}-title`}
className="flex items-center gap-2 font-semibold text-slate-900"
>
<span aria-hidden>{String.fromCodePoint(waypoint.icon) ?? "📍"}</span>
<span>{waypoint.name}</span>
</h3>
</header>
{waypoint.description && (
<p className="inline-flex items-center gap-1">{waypoint.description}</p>
)}
<Separator className="dark:bg-slate-200" role="separator" />
<section aria-label={t("waypointDetail.details")}>
<dl className="space-y-1.5">
{/* Coordinates */}
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-top gap-2 text-slate-500 min-w-0">
<MapPinnedIcon size={14} aria-hidden className="mt-1" />
<span className="truncate">
{t("waypointDetail.longitude")}
<br />
{t("waypointDetail.latitude")}
</span>
</dt>
<dd className="ms-auto text-right">
<data value={waypointLngLat[0]}>{waypointLngLat[0]}</data>
<br />
<data value={waypointLngLat[1]}>{waypointLngLat[1]}</data>
</dd>
</div>
{/* Created */}
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-center gap-2 text-slate-500 min-w-0">
<ClockPlusIcon size={14} aria-hidden />
<span className="truncate">{t("waypointDetail.createdDate")}</span>
</dt>
<dd className="ms-auto text-right">
<time dateTime={new Date(waypoint.metadata.created).toISOString()}>
<TimeAgo timestamp={waypoint.metadata.created} />
</time>
</dd>
</div>
{/* Updated */}
{waypoint.metadata.updated && (
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-center gap-2 text-slate-500 min-w-0">
<RotateCwIcon size={14} aria-hidden />
<span className="truncate">{t("waypointDetail.updated")}</span>
</dt>
<dd className="ms-auto text-right">
<time dateTime={new Date(waypoint.metadata.updated).toISOString()}>
<TimeAgo timestamp={waypoint.metadata.updated} />
</time>
</dd>
</div>
)}
{/* Expires */}
{waypoint.expire !== 0 && (
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-center gap-2 text-slate-500 min-w-0">
<ClockFadingIcon size={14} aria-hidden />
<span className="truncate">{t("waypointDetail.expires")}</span>
</dt>
<dd className="ms-auto text-right">
<time dateTime={new Date(waypoint.expire * 1000).toISOString()}>
<TimeAgo timestamp={waypoint.expire * 1000} />
</time>
</dd>
</div>
)}
{/* Distance */}
{distance != null && (
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-center gap-2 text-slate-500 min-w-0">
<MoveHorizontalIcon size={14} aria-hidden />
<span className="truncate">{t("waypointDetail.distance")}</span>
</dt>
<dd className="ms-auto text-right">
<data value={Math.round(distance)}>
{Math.round(distance)}{" "}
{distance === 1 ? t("unit.meter.one") : t("unit.meter.plural")}
</data>
</dd>
</div>
)}
{/* Bearing */}
{bearing != null && (
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-center gap-2 text-slate-500 min-w-0">
<CompassIcon size={14} aria-hidden />
<span className="truncate">{t("waypointDetail.bearing")}</span>
</dt>
<dd className="ms-auto text-right inline-flex items-center ">
<NavigationIcon
size={16}
aria-hidden
className="shrink-0 origin-center transition-transform mr-2"
style={{ transform: `rotate(${bearing - 45}deg)` }}
/>
<data value={Math.round(bearing)}>{Math.round(bearing)}</data>
<span aria-hidden>{t("unit.degree.suffix")}</span>
</dd>
</div>
)}
{/* Locked To */}
{waypoint.lockedTo != null && waypoint.lockedTo !== 0 && (
<div className="flex flex-wrap items-start gap-x-3">
<dt className="inline-flex items-center gap-2 text-slate-500 min-w-0">
<UserLockIcon size={14} aria-hidden />
<span className="truncate">{t("waypointDetail.lockedTo")}</span>
</dt>
<dd className="ms-auto text-right">
{getNode(waypoint.lockedTo)?.user?.longName ?? t("unknown.longName")}
</dd>
</div>
)}
</dl>
</section>
</article>
);
};