Commit Graph
1030 Commits
Author SHA1 Message Date
zjs81 2c886b00a4 Add missing translations for all locales
Fill in untranslated strings for the 17 non-English locales (notification
replies, region settings, channel min-hops, image messages, map clustering,
and more). untranslated.json is now empty.
2026-09-27 22:31:20 -07:00
zjs81 3b252d229d Merge pull request #565 from zjs81/feature/android-auto-notifications
Add notification replies, Android Auto support, and channel mute bell
2026-09-27 21:58:05 -07:00
zjs81 25f8d6ae27 Add notification replies, Android Auto support, and channel mute bell
- Message notifications use Android MessagingStyle with Reply, Mark as read,
  and Mute channel actions, so they work in Android Auto and on watches
- Replies go through the normal send path (length limits, SMAZ, Cyr2Lat,
  retries), split into up to 3 messages, and report failures
- Declare Android Auto notification support and register the action receiver
- Add a bell icon to channel chat to mute/unmute; unify the channel mute key
  so unnamed channels mute correctly
- Update README and docs for Android Auto support
2026-09-27 21:55:43 -07:00
zjs81 5cfd26b3af Merge pull request #564 from zjs81/docs/refresh-and-dutch-translations
Refresh documentation and update Dutch translation
2026-09-27 13:16:40 -07:00
zjs81 aa00a863c3 Refresh documentation and update Dutch translation
Documentation:
- Correct web transport support: USB via Web Serial in Chrome only; no
  BLE or TCP in the browser.
- Fix region scope semantics, routing modes (Auto/Flood/Manual), the
  156-byte DM limit, repeater CLI framing, the guessed-location algorithm,
  radio stats contents and settings labels.
- Add regions, image messages, radio statistics and troubleshooting guides.
- Restore coding conventions, localization workflow, storage scoping and
  transport entry points to CLAUDE.md/AGENTS.md; align build/CI commands.
- Replace the obsolete docs/BLE_PROTOCOL.md with a pointer to the
  maintained protocol reference.

Dutch (nl):
- Translate the 79 missing strings and correct existing mistranslations,
  typos and grammar (e.g. "Uitzoomen", "Handmatig", "Slowaaks", frequency
  range 150-2500 MHz).
- Use consistent terminology and informal "je" throughout; keep mesh terms
  such as repeater, node, flood, hop and advert in English.

Fixes #538
2026-09-27 13:12:23 -07:00
zjs81 5eca459e1c Merge pull request #561 from ericszimmermann/ez_display_region
Display Regions in Messages
2026-09-27 12:39:23 -07:00
zjs81 a0ed3cf69c Dedupe region candidates without the # prefix
floodScopeKeyForRegion treats `foo` and `#foo` as the same scope, so a
region listed both ways matched every packet twice and was always reported
as ambiguous. Also consider the default region when resolving.
2026-09-27 12:37:45 -07:00
zjs81 7134bac7f7 Merge remote-tracking branch 'origin/dev' into ez_display_region
# Conflicts:
#	lib/connector/meshcore_connector.dart
#	lib/models/channel_message.dart
#	lib/screens/channel_chat_screen.dart
2026-09-27 12:37:45 -07:00
zjs81 52281cc3e9 Merge pull request #493 from ionphoketi/dev
Add Fastlane
2026-09-27 12:27:46 -07:00
zjs81 9dcfe47371 Replace stale 13.txt changelog with release notes for build 16
F-Droid shows the changelog matching the built versionCode (currently 16),
so 13.txt would never display. Summarize the user-facing changes merged
between 9.5.0+13 and 9.5.0+16.
2026-09-27 12:26:58 -07:00
zjs81 90a312fd11 Harden Fastlane workflow and tidy store description
- Run the metadata check only when metadata or the workflow change, with a
  read-only token, pinned action SHAs and no persisted checkout credentials.
- Wrap description bullet lists in <ul> as requested for F-Droid.
- Drop MGRS and OTA firmware update claims the app does not support, and
  mention USB/TCP alongside BLE in the intro.
2026-09-27 12:22:52 -07:00
zjs81 70ee354cac Merge remote-tracking branch 'origin/dev' into fastlane-493 2026-09-27 12:20:09 -07:00
zjs81 aac3f4ed53 Merge pull request #516 from Hacuchino-hash/contacts-full-warning
Warn when the node reports contact storage is full
2026-09-27 12:17:52 -07:00
zjs81 8076a48816 Merge remote-tracking branch 'origin/dev' into contacts-full-warning
# Conflicts:
#	lib/connector/meshcore_connector.dart
#	lib/connector/meshcore_protocol.dart
#	lib/screens/contacts_screen.dart
2026-09-27 12:16:35 -07:00
zjs81 f77308cbdd Merge pull request #513 from Hacuchino-hash/self-telemetry
Add self node telemetry screen
2026-09-27 12:11:28 -07:00
zjs81 d7d197ca84 Fix self telemetry timeout handling and disconnected stats button
- Cancel the self-request timeout when sendFrame throws, so a failed send
  no longer shows a second timeout snackbar or reschedules auto-refresh twice.
- Do not wait for respCodeSent on self requests: none is sent for a local
  request, so any that arrives belongs to another send and replaced the
  5s self timeout.
- Disable the Radio Stats telemetry button while disconnected, matching
  the Settings tile.
2026-09-27 12:10:10 -07:00
zjs81 052a45e3cd Merge remote-tracking branch 'origin/dev' into self-telemetry 2026-09-27 12:08:23 -07:00
zjs81 346bbf7f7a Merge pull request #554 from M0Rf30/feat/contact-qr-import
Add contact import from QR code
2026-09-27 12:04:55 -07:00
zjs81 3c971705bd Fix QR contact import replay guard, type fallback and rescan loops
- Pass the existing contact's advert timestamp (0 for new contacts) so the
  firmware replay guard does not drop the node's real adverts.
- Leave a missing/invalid QR type unset and fall back to the existing
  contact's type instead of rewriting repeaters/rooms as Companion.
- Show a failed state with Retry instead of reopening the camera, which
  rescanned the same QR and resent the frame in a loop.
- Keep the processing flag set after a successful import so the closing
  route cannot restart the camera, import again and pop twice.
2026-09-27 12:04:05 -07:00
zjs81 fba97b9628 Merge remote-tracking branch 'origin/dev' into feat/contact-qr-import
# Conflicts:
#	untranslated.json
2026-09-27 12:02:42 -07:00
zjs81 31186fc134 Merge pull request #557 from M0Rf30/fix/usb-serial-nonblocking-close
Close USB serial port off the UI isolate
2026-09-27 11:54:38 -07:00
zjs81 d74c280ea3 Fix USB buffer leak on dispose and guard fl_free against orphaned close
dispose() no longer relies on FlSerial.closePort() to free the I/O buffers:
it checks the buffers' first byte instead of their address, so it usually
leaked both. Close via fl_close and always free by address.

A native close still running in a helper isolate is invisible to a fresh
isolate after hot restart, so connect() could fl_free() a slot mid-close.
Track the in-flight close with a per-process temp marker and wait for it
(bounded to 45s) before resetting the slot table.
2026-09-27 11:50:55 -07:00
zjs81 8b8715cfda Merge remote-tracking branch 'origin/dev' into fix/usb-serial-nonblocking-close
# Conflicts:
#	pubspec.yaml
2026-09-27 11:50:25 -07:00
zjs81 f793e80f6b Merge pull request #540 from AzazelSensei/docs-web-readme-325
docs: add web client and self-host notes to README #325
2026-09-27 11:37:52 -07:00
zjs81 80d8cfec2b Merge pull request #563 from zjs81/feature/ux-fixes-channel-resend
UX fixes, map performance, and optional channel resend
2026-09-27 11:36:36 -07:00
zjs81 5d7f922c58 Improve channel resend error handling and enhance message comparison logic 2026-09-27 11:35:55 -07:00
zjs81 0e8a8bd8c4 Add unit tests for ChannelMessage replies and update untranslated.json with new translations 2026-09-25 13:23:07 -07:00
zjs81 c1680208d8 Merge pull request #562 from zjs81/fix/review-firmware-fixes
Firmware compatibility fixes, bug fixes, and translation cleanup
2026-09-25 10:17:00 -07:00
Zach adabbd4b54 Update protocol comparison and review documentation with recent findings and fixes 2026-09-25 10:16:04 -07:00
Zach d74587c167 Refactor LoRa airtime tests and add new functionality
- Updated LoRa airtime calculations in `lora_airtime_test.dart` to reflect new reference values.
- Introduced new tests for LDRO behavior and preamble symbol calculations.
- Added `contact_path_width_test.dart` to validate path hash width handling in contacts.
- Enhanced `model_changes_test.dart` to ensure legacy data migration works correctly.
- Created `remote_node_stats_test.dart` to decode and validate remote node statistics.
- Implemented `map_marker_parse_test.dart` for parsing marker text with coordinate validation.
- Developed `map_tile_cache_key_test.dart` to ensure API keys are excluded from cache keys.
- Added `message_retry_failure_test.dart` to test message retry service behavior on failures.
- Extended `path_history_service_test.dart` to preserve learned state across path attempts.
- Enhanced `received_image_store_test.dart` to handle concurrent writes and review fixes.
- Implemented `repeater_command_service_test.dart` to validate command response handling.
- Created `store_tolerant_parsing_test.dart` to ensure stores skip malformed records gracefully.
- Cleared untranslated JSON file for localization updates.
2026-09-25 10:01:18 -07:00
ericz 20e01145e6 display Regions in received Messages and allow reply to same region. 2026-09-21 17:52:33 +02:00
zjs81 d5f54dfa11 Merge pull request #537 from sethoscope/mc1-reactions
Handle MeshCoreOne's emoji reactions
2026-09-20 23:12:41 -07:00
zjs81 8729bd571b Merge pull request #558 from M0Rf30/fix/gpx-export-desktop
Save GPX export via file dialog on desktop
2026-09-20 23:12:00 -07:00
zjs81 8fd67cfe48 Merge pull request #548 from hdhog/dev
fix: use explicit time <epoch> for repeater clock sync
2026-09-20 23:10:23 -07:00
zjs81 5c1f2b77c5 Merge pull request #546 from ericszimmermann/ez_apply_flserial_patch
flserial import points to MeshEnvy/PR1
2026-09-20 23:06:41 -07:00
Gianluca Boiano e169f7c639 Make pyx URL parsing tests hermetic
flutter_test blocks real HTTP, so the two pyx tests could never pass in CI.
Inject an overridable http.Client and drive them with MockClient.

(cherry picked from commit fb032ef0ee)
2026-09-17 23:15:29 +02:00
Gianluca Boiano 9ac1bff7e1 Make pyx URL parsing tests hermetic
flutter_test blocks real HTTP, so the two pyx tests could never pass in CI.
Inject an overridable http.Client and drive them with MockClient.

(cherry picked from commit fb032ef0ee)
2026-09-17 23:12:52 +02:00
Gianluca Boiano 2910dc9f67 Apply dart format 2026-09-17 23:12:52 +02:00
Gianluca Boiano fb032ef0ee Make pyx URL parsing tests hermetic
flutter_test blocks real HTTP, so the two pyx tests could never pass in CI.
Inject an overridable http.Client and drive them with MockClient.
2026-09-17 23:09:55 +02:00
Gianluca Boiano 1b5ebf6834 Honor manual disconnect and re-validate state after waiting
Sixth review round:

- disconnect(manual: true) joining an in-flight automatic teardown now
  still marks it manual (and cancels the reconnect timer / stops the
  background service), so a user-initiated disconnect can no longer be
  followed by an auto-reconnect scheduled by the teardown it joined.
- _shouldAutoReconnect is false once _disposed, so a teardown that
  outlives disposal cannot arm a timer that calls connect() on a disposed
  connector.
- connect()/connectUsb()/connectTcp() and UsbSerialService.connect()
  re-check the connection state after awaiting the in-flight teardown.
  The await is a suspension point, so two callers could previously pass
  the initial guard, resume together and both run the open sequence.
2026-09-17 23:05:43 +02:00
Gianluca Boiano 83be065c86 Save GPX export via file dialog on desktop
share_plus cannot share files on desktop: the Linux implementation throws
UnimplementedError('Sharing files not supported on Linux') unconditionally
(share_plus_linux.dart:22), and Windows throws for builds older than
10.0.17763. exportGPX() swallowed that in its catch-all, so every GPX
export on Linux ended as gpxExportFailed with the file already written to
the documents directory and never cleaned up.

On desktop, write the file where the user asks via file_selector's
getSaveLocation() instead of routing it through the share sheet; a
dismissed dialog maps to gpxExportCancelled. Mobile keeps the share flow.

Verified on Linux with a standalone probe app: SharePlus.share with files
throws UnimplementedError, while getSaveLocation returns the chosen path
and the GPX file is written there.
2026-09-17 23:03:10 +02:00
Gianluca Boiano fa9e9d18cd Suppress connector state publication after dispose
Fifth review round:

- MeshCoreConnector.dispose() sets _disposed, and _setState(),
  notifyListeners() and markNotifyDirty() no-op afterwards. A teardown
  started before disposal can still be running (the USB native close waits
  out the kernel's closing_wait off the UI isolate), and its tail would
  otherwise call notifyListeners() on a disposed ChangeNotifier.
- _handleSerialData() now only drops callbacks in the teardown states
  (disconnecting/disconnected) instead of everything that is not
  `connected`, so data arriving in the `connecting` window is still
  ingested and buffered by the frame decoder.
2026-09-13 15:42:34 +02:00
Gianluca Boiano fb7958a52e Serialize connects against the connector-level teardown
Fourth review round:

- UsbSerialService.connect() now waits for _activeDisconnect before it
  claims the `connecting` status, covering the Android USB-host path too;
  previously the wait sat inside the desktop branch, so an Android
  reconnect could still be overwritten by the old teardown.
- MeshCoreConnector.disconnect() is now a re-entrant-safe wrapper around
  _disconnectInternal() that publishes the teardown as _activeDisconnect,
  and connect()/connectUsb()/connectTcp() join it before starting. The
  transport-level guard alone could not prevent the connector's own
  teardown tail from setting the state back to `disconnected` after a new
  connection was up. Repeat disconnect() calls now join the in-flight
  teardown instead of returning early while it is still running.

flutter analyze clean; flutter test 570 passing, 2 pre-existing failures
in message_url_image_helper_test.dart (identical on a stashed tree);
flutter build linux --debug succeeds.
2026-09-13 15:33:44 +02:00
Gianluca Boiano 10f557e811 Serialize reconnect against the whole disconnect teardown
Third review round:

- disconnect() is now a re-entrant-safe wrapper around _disconnectInternal()
  whose future is held in _activeDisconnect for the entire teardown, not just
  the native close. connect() and dispose() wait on that instead of
  _pendingNativeClose, so a reconnect can no longer open a new port and then
  have the tail of the old teardown mark it disconnected.
- dispose() closes on any live handle (flh >= 0) instead of only when
  isOpen() reports `open`: flserial keeps a valid slot and a running
  SerialThread in the I/O error state, which would otherwise have been
  orphaned. A setDTR() failure no longer skips the close.
- _releaseSerialBuffers() takes alreadyFreed: closePort() frees both buffers
  but leaves the pointer fields dangling, so after a successful synchronous
  close the fields are only cleared, never freed a second time.

Builds: flutter build linux --debug succeeds (after patching the unrelated
glibc >= 2.42 / tinycthread once_flag clash in the flserial checkout).
2026-09-13 13:12:35 +02:00
Gianluca Boiano b0b5016806 Serialize reconnect and teardown around the pending close
Second review round:

- connect() awaits _pendingNativeClose before touching flserial's global
  slot table. fl_close() (helper isolate) and fl_free()/fl_init() mutate
  the same flserial_tab, so reconnecting during the kernel's closing_wait
  could double-close the old slot or kill the freshly opened one.
- dispose() no longer re-enters disconnect() when a close is in flight;
  the running disconnect owns the ordering (native close, then
  subscription cancel), so dispose only chains _closeFrameController onto
  the pending close.
- dispose() frees the I/O buffers through the new _releaseSerialBuffers()
  on every path, not just after a successful closePort(); with _serial
  nulled, an error/closed-state dispose used to leak both 8 KiB buffers.
- _handleSerialData() ignores callbacks once the status leaves `connected`:
  a callback queued before flh was invalidated made readList() throw and
  published a spurious transport error mid-teardown.
2026-09-13 13:01:16 +02:00
Gianluca Boiano 9a90d1f448 Coordinate dispose() with the off-isolate close
Review follow-up:

- dispose() now takes ownership of the FlSerial (nulls _serial) and clears
  serialReadBuff/serialWriteBuff after the synchronous closePort(); flserial
  frees those buffers but leaves the pointer fields dangling, so a later
  disconnect() reaching _closePortOffUiIsolate() with the same object would
  have freed them a second time. _closePortOffUiIsolate() additionally
  returns early when flh is already -1.
- dispose() skips its synchronous close when a close is already in flight:
  fl_close() sets breakThread and joins the SerialThread before it reaches
  the blocking ::close(), so the thread — and its NativeCallable — is
  already gone while the helper isolate waits out closing_wait. The
  in-flight future is tracked in _pendingNativeClose.
- If Isolate.run itself fails the port is now closed inline rather than
  leaking a native slot and SerialThread with no reachable handle.
2026-09-13 12:50:06 +02:00
Gianluca Boiano 4a25f718a8 Close USB serial port off the UI isolate
close(2) on a tty whose output the peer never drained blocks in the
kernel for the line discipline's closing_wait (measured 30.4s on Linux
against a CDC-ACM device that never reads its bulk OUT endpoint, e.g. a
MeshCore board flashed with a BLE-only companion build). FlSerial's
closePort() is a synchronous FFI call, so the whole app froze for that
window on every failed USB connect and on disconnect.

fl_close() only touches process-global native state, so run it through
Isolate.run() and replicate the Dart-side cleanup closePort() does
(stream close, calloc'd I/O buffers, flh reset). Log when the close
exceeds 1s so the "device is not draining" case is visible in the debug
log.

Verified against the wedged device: inline close blocked the calling
isolate for 30476ms with 0 timer ticks; the isolate close took 30302ms
with 302 ticks, i.e. the main isolate stayed responsive throughout.
2026-09-13 12:30:51 +02:00
Gianluca Boiano d0583f2039 Add contact import from QR code
Contacts could only be imported by pasting `meshcore://<hex advert>` from
the clipboard, so contact QR codes and links shared by the official app
(`meshcore://contact/add?name=...&public_key=...&type=...`) could not be
used at all.

Add a contact QR scanner screen, reachable from the contacts menu, that
scans with the camera or decodes a QR code from a photo in the gallery.
Both the official contact-card link and the existing hex advert form are
accepted; cards are applied with CMD_ADD_UPDATE_CONTACT and advert blobs
keep using CMD_IMPORT_CONTACT.

Fixes #529
2026-09-13 00:23:46 +02:00
zjs81 92e1d15d1c Merge pull request #555 from M0Rf30/feat/copy-public-key
Show and copy the full node public key
2026-09-12 14:49:21 -07:00
zjs81 2c500645ff Merge pull request #549 from shortwavesurfer2009/more_power
max power on USA presets
2026-09-12 14:47:02 -07:00