568 Commits

Author SHA1 Message Date
l5y 436bf34de6 web: chat-log retention and vertical scroll fix (#837)
* web: chat-log retention and vertical scroll fix

* web: suppress redundant advert when a node is heard via an encrypted message
v0.7.1
2026-07-02 20:50:27 +02:00
l5y 6d9d524e09 improve log wiring and capture all meshcore adverts (#836)
* data: fix meshcore adverts gap and capture adv from other nodes

* web: improve log wiring
2026-06-30 12:57:04 +02:00
l5y e633ff9d5e web: progressively backfill all bulk collections (#835) 2026-06-30 09:35:22 +02:00
l5y bc6d0187cc web: fix MeshCore chat duplicates and warm-cache message gap (#834) 2026-06-29 20:59:30 +02:00
l5y 8ed15f1142 web: initial-load module-graph waterfall (#832)
* web: initial-load module-graph waterfall

* web: prefetch initial API data on cold load (faster first paint)

Second phase of the initial-load fix (after the module-graph preload in
8915f8c). Even with the graph preloaded, the first /api/* fetch waited for the
~806KB bundle to download, parse, and boot. An early <script type="module"
async> boot module (main/boot-prefetch.js) now fires the first-load (since=0)
requests in parallel with the module graph (at priority:'high') and stashes the
in-flight Response promises on window.__PM_BOOT__; refresh() consumes them on its
first cold refresh via a new responsePromise option on the data-fetchers instead
of issuing its own requests.

Cold loads only: a synchronous localStorage marker (pm:cache-present, maintained
by the cache write-back / clear / disable paths) suppresses the prefetch on warm
revisits, leaving the FC2 seed-then-delta path untouched. Message endpoints are
skipped in private mode (data-pm-chat="false"), mirroring the /api/messages 404
(Invariant II / PS6). Pure pre-warm: an absent or rejected prefetch re-fetches,
so it is never load-bearing (FC7).

Read-side only; no API/DB/ingestor change, no new dependency. Adds ACCEPTANCE
EF-A1/EF-A2/EF-R1; 100% line/branch/func coverage on the new module (lcov);
rspec + npm test green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v0.7.1-rc0
2026-06-29 14:50:33 +02:00
l5y 266f8ff8bd chore: bump version 0.7.1 (#833) 2026-06-29 14:45:37 +02:00
l5y b5d9249918 web: change tiles to carto (#831)
* web: change tiles to carto

* web: change tiles to carto
2026-06-28 20:59:52 +02:00
l5y c8d5a8a20f web: fix pubsub thread budget to not block entire app (#828)
* web: fix pubsub thread budget to not block entire app

* web: address review comments
2026-06-27 11:09:57 +02:00
l5y be5365105d web: fix api/events hang on shutdown (#827)
* web: fix api/events hang on shutdown

* web: address review comments
v0.7.0
2026-06-26 15:26:13 +02:00
l5y afb15ff48d web: fix live-update DOM handling (#826)
* web: fix live-update DOM handling

* web: live-update feedback upgrades (v2)

* web: more live-update feedback

* web: address review comments
2026-06-26 09:59:41 +02:00
l5y 554fa38f50 web: fix meshcore message duplication regression (#825) 2026-06-24 22:22:35 +02:00
l5y 1804a8a75e web: add visual feedback to pubsub events (#824) 2026-06-24 20:34:35 +02:00
l5y 4831e37a52 web: mark message author nodes as seen (#822) 2026-06-24 17:53:10 +02:00
l5y 8083206210 web: implement pubsub (#821) 2026-06-24 17:35:33 +02:00
l5y f5f9298746 web: add pagination to all APIs (#820) 2026-06-24 13:02:50 +02:00
l5y 7eccbfb89a fix: unify Meshtastic custom LoRa label with MeshCore format (#818) 2026-06-23 21:58:18 +02:00
l5y 3790686ab2 web: version JS/CSS assets to bust stale browser caches (#815) 2026-06-23 21:23:35 +02:00
George c8668a730c fix: report custom LoRa config as "Custom SF{sf}/BW{bw}/CR{cr}" when use_preset=False (#811) (#812) 2026-06-23 19:46:30 +02:00
l5y 9039fb6f95 web: implement local storage caching (#814)
* web: implement local storage caching

* web: address review comments
2026-06-23 19:35:51 +02:00
l5y 4107527eca web: render chat incrementally to reduce page load time (#813) 2026-06-23 12:18:00 +02:00
l5y 843dc85776 web: fix federation cycle and http response error handler (#810) v0.7.0-rc3 2026-06-22 17:06:56 +02:00
l5y be9e7c006f web: fix federation dns status 500 (#809) 2026-06-22 16:35:56 +02:00
l5y d323cab32a web: fix meshcore node synthisation, merging, and deduplication (#808) 2026-06-22 15:54:12 +02:00
l5y 088907345d web: progressively load messages in batches (#807)
* web: progressively load messages in batches

* web address review comments
2026-06-22 13:21:50 +02:00
l5y 027b6160df web: federation signature v2 migration (#805)
* web: federation signature v2 migration

* web: address review comments
v0.7.0-rc2
2026-06-22 10:01:45 +02:00
l5y af64b2c60f web: fix apis to use consistently use camel case (#802) v0.7.0-rc1 2026-06-21 20:17:40 +02:00
l5y 5e0363a0ec web: breaking change on stats api (#801)
* web: breaking change on stats api

* address review comments
v0.7.0-rc0
2026-06-21 13:41:41 +02:00
l5y bb95b0792d web: fix chat (#800)
* chore: add guardrails

* docs: fix meshcore badge

* web: life chat message cap at 1000 in frontend

* web: honor protocol in chat

* web: deprioritize test channels

* fix ci
2026-06-19 16:37:41 +02:00
dependabot[bot] efd2c59fb8 build(deps): bump openssl from 0.10.79 to 0.10.80 in /matrix (#795)
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.79 to 0.10.80.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.79...openssl-v0.10.80)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.80
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-28 23:24:54 +02:00
l5y 512b4f157b Fix regression where Meshcore chat senders show as Meshtastic (#794)
* Fix regression where Meshcore chat senders show as Meshtastic

* Address review feedback for protocol misclassification fix

- ingest.rb: exclude wrapper ``protocol`` key from /api/nodes batch-limit
  count so the documented 1000-node maximum still applies after the
  Python ingestor started stamping protocol at the wrapper level.
- Drop plan-file references from production and test comments per the
  repo guidelines; the why is already explained inline.

* Address protocol-fallback review feedback

- Neighbor placeholder now inherits the source node's protocol from the
  surrounding /api/neighbors entry, so the badge tracks the radio the
  peer lives on instead of collapsing to the neutral "Unknown" label
  (review item #1).
- resolve_record_protocol logs one warn_log line when an explicit
  protocol stamp is rejected as malformed, making misbehaving custom
  protocol adapters visible in the operator log instead of silently
  falling back (review item #3).

* Extract buildNodePlaceholder helper for testability

The neighbor placeholder logic in main.js lives inside an untested
closure, so codecov reported the protocol-propagation lines as
uncovered.  Extract the small placeholder builder into long-link-router
so it can be unit tested directly; the closure-internal call site stays
trivial (one factory call + one fallback call).
2026-05-24 09:49:45 +02:00
l5y d2fe4f8223 web: add node opt-out marker and data retention policies (#793)
* web: add node opt-out marker and data retention policies

* web: address review comments

* web: address review comments
2026-05-20 21:02:59 +02:00
l5y 8a89185fbe fix sentinel position data (#792)
* fix sentinel position data

* address review comments
2026-05-18 21:27:47 +02:00
l5y b187ba2066 data: move connected event to after ensure_contacts (#789)
* data: move connected event to after ensure_contacts

* data: address review comments
2026-05-18 08:57:08 +02:00
dependabot[bot] 705f15c3e4 build(deps): bump openssl from 0.10.78 to 0.10.79 in /matrix (#787)
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.78 to 0.10.79.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.78...openssl-v0.10.79)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.79
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-06 21:05:53 +02:00
l5y c32da2c541 chore: bump to 0.6.4 (#785) 2026-05-03 17:01:28 +02:00
l5y 73e161f432 web: fix liveliness of api data hydration bug (#783)
* web: fix liveliness of api data hydration bug

* web: address review comments
v0.6.3
2026-05-03 13:05:37 +02:00
l5y 7b38f92b2d web: refactor 6/7 node page (#777)
* web: refactor 6/7 node page

* web: address node-page refactor review and close coverage gaps

Fix the concurrency cap in fetchNodeDetailsIntoIndex so it actually
limits in-flight requests.  The previous implementation built each
fetch as an immediately-invoked async IIFE, so all N fetches started
the moment the loop ran; the slicing-then-Promise.all step only
changed when settlement was observed, not when work began.  Replace
the IIFE-then-batch pattern with a worker pool: a fixed-size set of
worker promises iterates a shared queue and only pulls the next
identifier once the previous fetch settles.

Reduce cross-module coupling around the role-aware short-name badge
by extracting renderRoleAwareBadge into a new badge.js module that
single-node-table, messages, detail-html, and traces import directly,
so the neighbour module is no longer pulled in by four non-neighbour
callers.  Tighten applyDetails in role-index.js by hoisting the
ternary into a single key binding and dropping the redundant
instanceof Map guard.

Close the patch-coverage gap reported by Codecov: add tests for
parameter-validation paths in bootstrap (parseReferencePayload,
normalizeNodeReference, fetchNodeDetailHtml, initializeNodeDetailPage),
the worker-pool branches in role-index (no-fetch, empty queue, 404,
non-success responses, and an explicit concurrency-cap assertion),
the badge fallback path, the nested-neighbor seedNeighborRoleIndex
branches, the renderNeighborBadge metadata-merge and short-name
fallback paths, the empty-trace and empty-chart short-circuits, and
single-node-table validation.  All ten node-page submodules now
report 100% line coverage.
v0.6.3-rc1
2026-05-02 23:05:36 +02:00
l5y 1041e06644 data: refactor 4/7 interfaces (#775)
* data: refactor 4/7 interfaces

* data: address PR #775 review feedback

Fix the two CI test regressions caused by the package split:
- ``factory._load_ble_interface`` no longer keeps a stale module-level
  ``BLEInterface`` cache that survived ``monkeypatch`` teardown across
  tests. The package-level attribute is now the single cache; the
  ``factory.py`` global was removed.  This unblocks
  ``test_load_ble_interface_sets_global``.
- ``interfaces/__init__.py`` re-resolves ``SerialInterface`` and
  ``TCPInterface`` from ``meshtastic.*`` at package-load time so that a
  test that pops ``data.mesh_ingestor.interfaces`` from ``sys.modules``
  and re-imports picks up the freshly registered classes rather than
  whatever a cached ``factory.py`` first resolved.  This unblocks
  ``test_interfaces_patch_handles_preimported_serial``.

Restore 100% patch coverage on the interfaces subpackage by:
- Adding tests for previously uncovered, testable paths:
  ``_extract_host_node_id(None)``, ``_ensure_channel_metadata``,
  ``_normalise_nodeinfo_packet`` (None input + dict-conversion fallback),
  ``_resolve_lora_message`` (radio_section paths), ``_modem_preset``
  (preset attr fallback + unparseable value), ``_camelcase_enum_name``
  separator-only input, ``_region_frequency`` no-digit enum name,
  ``_ensure_radio_metadata`` unresolvable-message path, plus the
  unknown-section recursive branch of ``_candidate_node_id``.
- Marking genuinely unreachable defensive branches with
  ``pragma: no cover`` (BLE receive loop body, upstream API regression
  guards, patch re-entry guard, unreachable ``NoAvailableMeshInterface``
  fallback).
2026-05-02 22:59:52 +02:00
l5y e04fab5b19 web: refactor 7/7 main js (#778)
* web: refactor 7/7 main js

* web: refactor 7/7 main js

* web: address review feedback on 7/7 main.js refactor

* Consolidate the duplicate ./main/format-utils.js import block in
  main.js so all symbols come from a single, alphabetised import
  statement (review item: "Important — Duplicate format-utils.js
  import block").
* Replace the leftover stale JSDoc atop +createOfflineTileLayer+ with
  one clear "do not inline" DI block, and likewise expand the
  +fetchMessages+ wrapper docstring so future readers see the shim's
  purpose without hunting for the implementation (review nit:
  "thin wrappers ... worth a one-line JSDoc").
* Add per-module unit tests under
  public/assets/js/app/main/__tests__/ covering every previously-
  uncovered branch in the 9 modules codecov flagged: tile-coords,
  sort-comparators, fullscreen-helpers, format-utils, data-fetchers,
  data-merge, tooltip-html, long-link-router, and offline-tile-layer.
  This drives the codecov patch percentage on PR #778 from 78.99%
  to ~100% on the new modules and unblocks the codecov/patch gate.

JS suite: 1,114 tests, 0 failures.
2026-05-02 22:35:34 +02:00
l5y d1d0225197 web: refactor 5/7 node page charts (#776)
* web: refactor 5/7 node page charts

* web: address review feedback on node-page-charts split

* Drop the local stringOrNull/numberOrNull copies from node-page.js
  and import them from ./value-helpers.js so the shared module's
  stated dedup actually happens (review issue #1).  The two locals
  were byte-identical to the new shared module.
* Split the display-only formatters out of
  node-page-charts/format-utils.js into a sibling
  node-page-charts/display-formatters.js so format-utils.js carries
  only chart concerns (review issue #2).  The barrel
  node-page-charts.js re-exports both files so existing callers and
  tests keep working unchanged.
* Inline +fmtCurrent+ in node-page-charts/specs.js and drop the
  sideways import from short-info-telemetry.js so node-page-charts/
  no longer depends on an unrelated module (review issue #3).
* Add a dedicated value-helpers.test.js pinning the contract of
  +numberOrNull+ and +stringOrNull+ so they stop relying on
  transitive coverage from the chart suite (review issue #5).
2026-05-02 22:16:18 +02:00
l5y 0fbff32535 web: refactor 2/7 federation (#773)
* web: refactor 2/7 federation

* web: close federation coverage gaps and apply review nits

Address Codecov patch coverage feedback by adding rspec examples for
the 51 lines flagged across the new federation shards (announce,
crawl, validation, http_client, self_instance, instance_metrics,
announcer_threads, lifecycle, signature). Per-shard line coverage in
the federation directory is now 100%.

Apply two review-comment changes: rename the awkwardly-named
http_client_get.rb to instance_fetcher.rb (matching its semantic
role rather than the HTTP verb), and declare PotatoMesh::App::Federation
explicitly in the federation.rb manifest so the namespace is owned by
this file rather than implicitly created by whichever shard happens to
load first.
2026-05-02 22:12:20 +02:00
l5y 03caf391e7 web: refactor 1/7 data processing (#772)
* web: refactor 1/7 data processing

* web: close coverage gaps in data_processing submodules

Bring every file under lib/potato_mesh/application/data_processing/ to
100% line coverage so codecov/patch passes on the 1/7 refactor PR. The
gap was a relocation of pre-existing untested branches; closing them
here keeps the subsequent refactor PRs in the series unblocked.

* Add unit tests covering canonical sender/recipient overrides,
  reply_id/emoji updates on existing rows, and the rare INSERT
  ConstraintException recovery path inside +insert_message+.
* Cover the non-canonical reporter and per-neighbour resolution
  branches in +insert_neighbors+.
* Cover the SQLException rescue in +upsert_ingestor+, the
  fallback_num branch in +touch_node_last_seen+, the limit fallback
  in +read_json_body+, the unrecognised-type branch in
  +store_decrypted_payload+, the +power+ telemetry_type fallback,
  the default-coercion path in +resolve_numeric_metric+, and the
  numeric/bare-hex paths in +canonical_node_parts+ and
  +coerce_trace_node_id+.

Drop dead code surfaced while pinning behaviour:

* +clear_encrypted+ in +insert_message+ has been initialised to
  +false+ and never reassigned since #633 dropped the
  decrypted-text override; remove it and the four dependent
  branches.
* The +rescue ArgumentError; nil+ tails in
  +identity.resolve_node_num+ and +traces.coerce_trace_node_id+ are
  unreachable because every +Integer(...)+ call inside is guarded by
  a regex pre-check.

Add a comment to the +data_processing.rb+ shim explaining that the
+require_relative+ list is ordered by dependency rather than
alphabetically, addressing review nit #5.
2026-05-02 22:08:21 +02:00
l5y f6aff3bdb8 data: refactor 3/7 protocols (#774)
* data: refactor 3/7 protocols

* data: address PR #774 review feedback

- Rewrite the parents[4] path comment in protocols/meshcore/debug_log.py
  to clearly explain why the index changed from parents[3] (the original
  pre-split index) without contradicting the code.
- Add tests covering the six lines flagged uncovered by codecov:
  * _process_self_info host-position branch (handlers.py:78)
  * on_contact_msg early-return for missing text/sender_ts (handlers.py:278)
  * close() RuntimeError swallow when loop closes mid-call (interface.py:155-156)
  * _run_meshcore wrapper around _ensure_channel_names failure (runner.py:131-132)

Restores 100% patch coverage on the meshcore package.
2026-05-02 22:05:43 +02:00
l5y 09d9e7be13 chore: bump version to 0.6.3 (#779)
* chore: bump version to 0.6.3

* chore: bump version to 0.6.3
v0.6.3-rc0
2026-04-29 22:06:29 +02:00
l5y 43a5724b7f web: add seo improvements (#771)
* web: add seo improvements

* web: address review comments

* web: address review comments
2026-04-29 10:33:33 +02:00
l5y c4dd825d72 matrix: fix matrix preset labels (#770)
* matrix: fix matrix preset labels

* matrix: address review comments

* matrix: address review comments
2026-04-29 07:49:31 +02:00
l5y ee98efc120 web: rework map spider-net feature (#769)
* web: rework map spider-net feature

* web: address review comments

* web: address review comments
2026-04-29 07:06:18 +02:00
dependabot[bot] 521c2f2972 build(deps): bump openssl from 0.10.75 to 0.10.78 in /matrix (#766)
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.75 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.75...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 19:15:29 +02:00
dependabot[bot] f8b02b9f24 build(deps): bump rustls-webpki from 0.103.10 to 0.103.13 in /matrix (#764)
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.103.10 to 0.103.13.
- [Release notes](https://github.com/rustls/webpki/releases)
- [Commits](https://github.com/rustls/webpki/compare/v/0.103.10...v/0.103.13)

---
updated-dependencies:
- dependency-name: rustls-webpki
  dependency-version: 0.103.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 19:57:35 +02:00
l5y 161f22bf12 chore: bump version to 0.6.2 (#763)
Backfill v0.6.1 CHANGELOG entry (previously undocumented),
add v0.6.2 entry covering 9 commits since v0.6.1, and bump
the version string across data, web, matrix, and app along
with the README docker-pull examples.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v0.6.2
2026-04-21 19:02:26 +02:00