Commit Graph
76 Commits
Author SHA1 Message Date
zjs81 705267d98f Build repeater settings from a spec list and stop fetching them on open
Repeater settings:
- Each setting is declared once in repeaterSettingSpecs (key, section,
  input type, range, step, labels); the screen builds its control,
  refresh and save command from that list.
- Add flood.max.advert, flood.max.unscoped, rxdelay, cad, adc.multiplier
  and extra.sf. adc.multiplier and extra.sf note their hardware limits
  (extra.sf is LR2021 only and its get reply has no "> " prefix).
- Settings can be edited before they are fetched; only edited ones are
  sent. set radio needs freq, bw, sf and cr together, so a missing one
  is reported instead of silently skipping the radio.
- Check tx delays against the firmware's 0-2 range.
- Keep the not-loaded hint's list slot so the Advanced card doesn't
  collapse when the first value arrives.
- New "Auto-fetch repeater settings" app setting, off by default: each
  get is a LoRa round trip.

Fixes:
- Adding a discovered contact sent its advert time as lastmod, making it
  the oldest contact; with overwrite-oldest on a full table the next add
  evicted it and it reappeared in the discovered list. Let the radio
  stamp its own clock.
- Snackbars replace each other instead of queueing.

Translations: add the new strings in all locales and fix widespread
mistranslations in hu, ko, sk, sl and uk.
2026-10-25 14:46:31 -07:00
zjs81 979e1a7d2a Fix layouts on small screens and large text, and test every screen
Contact rows give the name its own line (wrapping to two) with route and
last seen below, right-aligned on wide windows. Fixes overflows found by a
new widget test that renders every screen at 320x568 with text scales up to
2.0 and on a desktop window: region dropdown, contacts list, repeater CLI,
status grid and settings card, map cache buttons, and empty states.
Dropdowns truncate long labels, and option sheets and dialogs scroll.
2026-10-25 11:10:27 -07:00
zjs81 79e3668c18 Add a global switch to stop loading images from links
'Load images from links' (default on) gates every link image fetch in
MessageUrlImageHelper: chat previews, notification images, ipfs://
resolution and pyx/ibb scraping. Per-chat toggles keep their values but
are disabled while it is off. IPFS uploads are unaffected.
2026-10-24 22:01:29 -07:00
zjs81 c111835bd0 Localize IPFS upload and attach messages
Give IpfsUploadConfigException a reason enum mapped to l10n strings in
the attach flow, and show a localized empty-file message and generic
upload-failed message instead of raw English exception text.
2026-10-24 21:58:39 -07:00
zjs81 34db64d7af Never silently truncate the draft when attaching an IPFS link
Check before uploading that the link (from the gateway and a CIDv1-sized
placeholder) fits with the draft and the reply prefix, and tell the user
when it doesn't instead of cutting their text. The channel limit now
counts the @[name] reply prefix like the send path.
2026-10-24 21:57:55 -07:00
zjs81 084a8fb98b Show IPFS upload configuration errors instead of failing silently
Throw IpfsUploadConfigException for upload configuration problems, and
route every failure in the attach flow to the user, so a missing key or
bad endpoint no longer escapes as an unhandled ArgumentError.
2026-10-24 21:57:35 -07:00
zjs81 cc33595f13 Share the IPFS link attach flow between the chat screens
Move the pick/read/upload/insert flow that was copied into both chat
screens into helpers/ipfs_link_attach_flow.dart; each screen passes only
its byte limit and outbound encoder.
2026-10-24 21:57:12 -07:00
zjs81 3ed88a0fc0 Validate the IPFS upload endpoint before uploading
Reject an empty or non-http(s) endpoint, missing Pinata/Filebase
tokens, and a custom (Kubo) endpoint that doesn't end in /api/v0/add
before any data is sent, and derive the files/cp URL from the add URL
so Kubo behind a proxy path works.
2026-10-24 21:54:16 -07:00
zjs81 abcf6c2eae Treat an existing Kubo MFS entry as a successful share
The MFS name includes the CID, so 'already has entry' means the same
content is already there; re-sharing a file no longer fails.
2026-10-24 21:54:16 -07:00
zjs81 c2d18b431e Test IpfsUploadHelper directly and build the upload request once
Drop the test-only upload facade on MessageUrlImageHelper that
overwrote the shared HTTP client, move its tests to IpfsUploadHelper,
and build the multipart request with the final upload URI instead of
cloning it.
2026-10-24 21:54:16 -07:00
zjs81 7e7e7a48db Merge remote-tracking branch 'origin/dev' into pr-593
# Conflicts:
#	lib/models/app_settings.dart
#	lib/screens/channel_chat_screen.dart
#	lib/screens/chat_screen.dart
#	untranslated.json
2026-10-24 21:45:13 -07:00
zjs81 caf20b4415 Summarize location, image and GIF messages in notifications
Notification bodies now use the chat's parsers to show a localized
summary for shared locations (m: markers), channel images, GIFs and
reactions instead of the raw payload. The marker parser moves out of the
map screen into helpers/marker_message.dart so the service can use it.
2026-10-24 21:01:06 -07:00
ericz a4a7e00732 upload url image or file to ipfs 2026-10-11 13:14:14 +02:00
zjs81 25f197c979 Fix review findings, add default flood scope, and address recent issues
Review fixes:
- Keep stored message history beyond the 200-message window; stop
  messages leaking between radios; reset link/session state on disconnect
- Accept firmware's 176-byte RX frames over USB/TCP
- Hold APP_START during contact sync; contact-sync watchdog; replay DMs
  from not-yet-known senders; tombstone late command replies; finish
  channel sync on ERR_NOT_FOUND; fail region-scoped sends cleanly
- DM retry watchdog when RESP_CODE_SENT never arrives; late repeater CLI
  replies; ACK hash collisions; UTF-8-safe name truncation
- Image pipeline: delete-during-decode, lifecycle cancels, decoder memory
  release, entry cap, dead worker recovery, atomic model writes
- Storage: deterministic reaction hash across web/native, Smaz
  double-decode, per-entry parsing, per-radio path history and regions,
  review-mode data isolation
- UI: safe channel slot selection, byte-length name limits, double-send
  guard, mounted checks, localized hardcoded strings
- Skip persisted-store reload on repeat SELF_INFO

Features:
- Radio default flood scope (firmware ver 11+) and explicit unscoped
  sends (ver 12+)
- Scan for nearby nodes (#570)
- Optional distinct first-hop repeater counting for channel resend (#589)
- Optional region next to hop count (#580)

Issues:
- Message text follows system font size (#569)
- Repeater/room password field accepts 20 chars (#576)
- TCP auto-reconnect and keepalive (#571)
- Order feeds by local receive time; flag future timestamps (#584)
- Coding rate help text (#568), French "Favoris" (#575)
- iOS/macOS app badge now clears

Translations for all new strings in every locale.
2026-10-11 01:25:31 -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
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
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
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
ericz 86361f437f fix test of urlimage parsing of pyx.li 2026-09-08 21:11:58 +02:00
Seth Golub 74cd1128bc Support updated MeshCoreOne emoji reaction format
In #521, @Avi0n mentions they will be changing MeshCoreOne's reaction
format in the next release.

Here we add support for the new format, while retaining support for
the old format as "MC1Legacy".

There's some redundancy. My goal was not to maximize elegance, but
to facilitate easily tearing out support for the legacy format months
from now when we no longer care about it.

This has not been tested in the wild, as nothing is transmitting the
new format yet.
2026-09-07 09:56:24 -07:00
Seth Golub 9d3b4a40d9 Improvements to MeshCore-One emoji reaction processing
- Made Crockford-matching regex slighlty stricter (not allowing U)
- Match arbitrarily long multi-code-point joined emoji
- Added more validation checks for potential emoji, including that it's
  a single grapheme
- Added more unit tests for emoji parsing
- For reactions whose targets we can't find, display MC1-style
  reactions as normal messages. Continue old beavior of silently
  dropping unmatched MC-Open reactions.

Part of PR #537
2026-09-07 09:50:14 -07:00
Seth Golub 97f20eaec0 Handle MeshCoreOne's emoji reactions
MeshCoreOne is a companion app that supports emoji reactions, using a
different message format than ours.

This commit adds support for parsing and displaying reactions received
in the MeshCoreOne format.

Their format is described here:
 https://github.com/Avi0n/MeshCoreOne/blob/main/docs/Reactions.md

Here's an example:

👍@[entropy]
b3je6qf7

Major differences compared to MeshCore-Open's reaction messages:
- includes the emoji, rather than an index code
- includes the name of who sent the message it refers to
- the hash does not depend on the sender name
2026-08-30 14:34:38 -07:00
ericz f9465cc4d0 android still failed, edit regex so that // in ipfs://cid are optional and ipfs:cid is also valid. 2026-08-28 21:38:01 +02:00
ericz 99ef08332a Fix URL image preference scoping and cache behavior 2026-08-28 21:25:58 +02:00
zjs81 c8bd1edf0f Merge branch 'dev' into ez_image_urls 2026-08-25 13:47:49 -07:00
zjs81 e9b7e8132b Merge branch 'dev' into emoji-reation-report 2026-08-25 13:38:55 -07:00
ericz 6786c3348f update zjs81/dev 724696cd3c and fix image preview position. 2026-08-11 20:30:14 +02:00
Zach eee72b4c65 Add ability to send images over lora 2026-08-10 23:20:46 -07:00
ericz d920449cbb Add Contact and Channelsettings to explicitly enable Picture preview. 2026-08-10 22:21:10 +02:00
ericz b137dd8fe1 fix onyl pyx.li JPG through parsing of website, as added imgbb.com provider in same way. 2026-08-09 13:24:58 +02:00
Seth Golub 76b34779cf Add emoji reaction report for channel chat, fix reaction deduping bug
In channel chat screen, clicking a reaction emoji brings up a popup
listing the received emoji reactions and their senders.

Also fixes a bug that prevented displaying the count numbers on
reactions. Code existed to display counts for multiples, but the
deduplication failed to differentiate between senders and was tossing
them out.

There is still another preexisting bug, not fixed by this commit, that
over-counts sent reactions in rooms.
2026-08-07 21:24:00 -07:00
ericz 55529c3a61 show images to detected URLs 2026-08-07 19:28:43 +02:00
HDDen 6492058a04 Merge branch 'dev' into update-pacox-multibyte 2026-06-16 11:53:59 +03:00
Eric Poulsen 321d4b9775 Use kSecondaryMouseButton bitmask check, per code review 2026-06-13 20:23:32 -07:00
Eric Poulsen f1478722b0 Fix for right-click on message bubbles (right click didn't work on the actual text of the bubble) 2026-06-13 19:05:52 -07:00
HDDen e92d215582 upd - fix and format 2026-06-14 01:36:49 +03:00
HDDen d61eaaaff1 Merge branch 'dev' into update-pacox-multibyte 2026-06-14 01:12:49 +03:00
zjs81 5ea6b17b16 feat: enhance MeshCoreConnector with improved timeout calculation and path resolution; add PathHopResolver for better contact resolution 2026-06-13 00:36:45 -07:00
zjs81 51d6210920 Add shared UI components for mesh application
- Introduced `mesh_ui.dart` with reusable widgets including SectionHeader, MeshCard, StatusChip, StatTile, AvatarCircle, SignalBars, RouteChip, PulseDot, BottomSheetHeader, ErrorRetryCard, and ListEntrance.
- Implemented `path_map_ui.dart` for path map screens, featuring path distance calculations, playback controls, and a summary list of observed paths.
- Created `themed_map_tile_layer.dart` for shared cached map tiles with automatic dark-mode treatment.
2026-06-12 21:04:02 -07:00
HDDen d06a4c1861 Merge branch 'dev' into update-pacox-multibyte 2026-06-12 13:39:09 +03:00
zjs81 cba1e5950c feat: add contact UI helpers and path editor for routing management
- Implemented contactTypeIcon and contactTypeColor functions for better UI representation of contact types.
- Created colorForName and firstCharacterOrEmoji functions to enhance contact display.
- Developed PathEditorSheet widget for managing contact paths with a user-friendly interface.
- Introduced RoutingSheet for managing contact routing modes and displaying path history.
- Added a script for generating proof of concept (PoC) payloads for clipboard contact import validation.
2026-06-11 00:07:12 -07:00
PacoX 9e5b360f28 fix int conversion 2026-05-28 09:31:42 +02:00
HDDen 7a823654df Telemetry: room-server request fix #2
The telemetry parser has been expanded and should now support significantly more metrics. It has been ported from the Python implementation of meshcore_py.
2026-05-19 23:17:06 +03:00
PacoX 9331b02f94 Merge pull request #1 from ericszimmermann/ez_snr_multibyte2
Multibyte Support for SNR-Indicator, channel message_bubble and Setting
2026-05-19 10:14:03 +02:00
PacoX 27f7932db9 fix import 2026-05-19 08:52:44 +02:00
PacoX 4a39a7cd46 fix from copilot review + doc fix 2026-05-19 08:49:52 +02:00
ericz 28a5913ba3 multibyte for snr_indicator and map_filtering. 2026-05-18 19:00:07 +02:00
PacoX 23f29f2cda rollback-pr review 2026-05-17 17:44:30 +02:00
PacoX d6647f4701 PR review modif + packet aware 2026-05-17 15:50:25 +02:00