Commit Graph
70 Commits
Author SHA1 Message Date
zjs81 89071473a5 Merge branch 'dev' into ez_bookmark 2026-11-15 15:16:18 -07:00
zjs81 53e4e457ca Preview image versions before sending, and repair unheard chunks
Send sheet: opens on what recipients will see (the encoded photo decoded
on this device) instead of the original. "Try another version" encodes
the whole photo again with a near-invisible zoom/shift; the generative
decoder reconstructs each version differently, and on Kodak the best of
three raised CLIP agreement from 0.828 to 0.853. The user picks the
version to send; packet count and airtime follow the selection. Version 1
is byte-identical to the previous encode, so the wire format is
unchanged. The sender's bubble shows the chosen version and carries the
AI-reconstructed label.

Repeater echoes: the raw RX log handler now decrypts GRP_DATA as well as
GRP_TXT and counts repeaters re-flooding each chunk of our own images.
The bubble shows the repeat count like channel text, and Packet info
lists each packet. About 15 s after sending, chunks no repeater echoed
are resent once, but only when another chunk of the same image was
echoed, so senders with no repeater in earshot do not double their
airtime. Outgoing entries now record their payload size.
2026-11-14 20:58:43 -07:00
ericz ef94e6be50 Export bookmarks into a Markdownfile. Ordering of Bookmarks in the bookmarks overview. 2026-11-14 00:36:46 +01:00
ericz f32300797e Save Bookmark with Bookmark overview in channel menu, and bookmark-filter in channel and contact. 2026-11-13 23:06:17 +01:00
zjs81 2d56d5e349 Store histories and the tile index in SQLite
Message, channel and route histories move from whole-blob preferences to
indexed SQLite rows on native platforms, so chats page from storage instead
of loading a full conversation. Web keeps the preferences store. Existing
histories are imported once on the first launch.

Linux and Windows keep the map tile index in SQLite and import the old JSON
index on first use.

Unreadable legacy data no longer blocks saves, migrations or startup: it is
left in place and skipped. If the database cannot be opened, the run keeps
histories in preferences and the next launch merges them in.

Also adds a performance profiling reference and a script that clears the
Dart HTTP profile.
2026-11-09 22:32:40 -07:00
zjs81 462159e803 Tester feedback: offline mode, pt-PT, menus, layout and translations
Offline (read-only) mode
- The last connected radio is remembered; with no radio the app opens on
  its saved contacts, channels, messages and unread counts.
- Main screens stay open on disconnect. A Connect button replaces the
  battery and signal indicators, with a sheet to reconnect, choose a
  radio or stop a pending reconnect.
- While disconnected everything is read-only: the composer becomes a
  "connect to send" bar (drafts kept) and controls that change the radio
  or stored history are disabled or hidden.
- Resending while disconnected no longer deletes the message; a
  different radio no longer shows the previous radio's channels.
- Notification taps open the saved chat while offline.

Chats and menus
- Channel chat menu: notifications, edit channel, delete channel; the
  filter row lines up with the others; bell moved out of the app bar.
- DM and room menus: remove from contacts; rooms get room management.
- Search field uses the full app bar; long-press a result to copy.
- Hashtag channel titles no longer read "# #name"; more room around the
  radio activity dot.
- Repeat filter: short messages from one sender are caught at the same
  count as long ones.

Layout
- Shared menu row (wraps to two lines) and segment label (never splits
  a word) used across the app.
- One Scan button on the scanner; consistent settings tile titles;
  contact "last seen" wraps instead of truncating; unfetched repeater
  settings are dimmed.

Localization
- New European Portuguese locale (pt_PT); regional locales are handled
  by the language picker, notifications and the background service.
- Fill 67 missing strings per locale, including backup and restore.
- Keep "Flood" and "Zero Hop" untranslated, shorten "last seen" and
  routing labels, and fix mistranslated scan, theme and hop strings.
- Received-image strings, badge and caption come from translations.
- Regenerate the Czech localizations, which were missing strings.

Docs
- Add documentation/design.md (UI reference) and offline-mode.md;
  update channel, chat, navigation and scanner docs.
2026-11-09 21:18:29 -07:00
zjs81 47f2293a5c Merge pull request #646 from ericszimmermann/ez_backup-restore
Backup and Restore functionality
2026-11-09 07:08:40 -07:00
zjs81 5ea44d6ce9 Tester feedback: routing, bulk select, notifications, map crash
Routing
- Auto routing picks routes by Thompson sampling over faded delivery
  stats (24 h half-life, capped evidence), weighted by what the radio
  currently hears; retries prefer a different route; last attempt floods.
- Route failures are held until a message's fate is known, so an offline
  contact no longer wrecks its route history; failing routes are only
  deleted after a week without a delivery.
- Direct (zero-hop) path is a rotation candidate (#643) and a new Direct
  mode in the routing sheet; history routes are used for repeater logins.
- Remove the route-weight sliders the new chooser no longer uses.

Chats
- Bulk selection in channel chats (spam / not spam / delete / copy) and
  in the Filtered messages list.
- Tapping a search result jumps to the message.
- Swipe-to-reply ignores vertical scrolls.
- Active conversation follows route lifecycle, so covered chats count
  unread again.

Notifications
- Tapping a notification opens its conversation.
- Per-conversation coalescing and one alert per queued-message sync.
- Monochrome status-bar icon; background service stops when the app is
  swiped away; stale notifications cleared on radio or slot change.

Other
- Online map: opaque links and painted dots for dense areas to avoid an
  Impeller GPU crash; expandable hop list on path maps.
- Contact share: clipboard import of shared contacts, "Add again".
- Android: enableEdgeToEdge and scrolling-screenshot support.
- Translations for all new strings; fix mistranslated routing labels.
2026-11-08 23:19:15 -07:00
ericz a020eb30d0 ask for download models and fix problem with reloading discovered list after import. 2026-11-08 14:13:33 +01:00
zjs81 ddf0b9f553 Fix false repeat flags, add repeat-sends setting, limit holiday animations
Message filter:
- Ignore copies of a message already seen (same sender, text and send
  second). Switching between companions re-synced messages the first one
  had delivered; they missed per-radio storage dedup and were flagged as
  repeats.
- Exempt replies and @[name] mentions from repeat detection.
- New "Sends to count as a repeat" setting (2-5, default 2). Each send
  must fall within 10 minutes of the previous one.
- Translations for the new strings in all locales.

Holiday animations:
- Only one plays at a time; greetings arriving while one is playing or
  within 5 seconds after it ends are dropped, not queued.
- Christmas map "self" marker: Santa hat was upside down.
2026-11-08 01:33:05 -07:00
zjs81 c939f7a29c Add Czech, in-chat search, typed-hash path trace and contact sharing
- Czech UI locale (app_cs.arb), selectable in the language picker and as a
  message translation language; language names added to every locale.
- Fix wrong language names: Slovak shown as Slovenian in it/ja/pt/sl,
  garbled Slovak/Bulgarian in pl, Ukrainian in ru, Hungarian in ko/zh.
- Search inside DM and channel chats across the full stored history, with
  highlighted matches; filtered channel messages are excluded.
- Path trace by typed hashes (e.g. A1,B2,C3) from the Contacts and map
  menus, without needing node locations; the map trace panel can hand its
  hops to it.
- Share contacts in chats using the official app's <pubkey:type:name>
  format; received cards have a one-tap Add contact button that reuses the
  QR card import path.
- Translations for all new strings in every locale; docs updated.
2026-11-07 22:31:14 -07:00
ericz 76232c1ad7 clear contacts and channels before restoring. 2026-11-08 03:15:32 +01:00
ericz 79109c2c5c more granular selection and import of official meshcore file. 2026-11-08 02:47:34 +01:00
ericz aae2bf6d60 Backup&Restore 2026-11-08 00:40:23 +01:00
zjs81 394df3109b Merge pull request #640 from zjs81/feature/message-filter
Add channel message filter for spam and repeated messages
2026-11-06 00:54:27 -07:00
zjs81 a9d369f42f Address message filter review findings
False positives
- Same-sender repeats need at least 3 words and 10 characters, so short
  replies ("ok", "test") repeated within 10 minutes stay visible.
- Repeated characters needs a run of 20+ of one non-digit character;
  "Noooooooo!", separators, a row of emoji and long numbers are chat.

Correctness
- Rules apply to stored messages: adding a rule hides matching messages
  already in the chat, and removing or disabling one shows again what only
  it was hiding. Other filter reasons are left alone. Also applied when
  history is loaded.
- The filter runs after mesh dedup, inside _addChannelMessage, so each
  message is evaluated and counted by the duplicate tracker once.
- Channels excluded from filtering no longer feed implicit clean examples
  to the classifier.
- Unread counting and the unread anchor treat filtered messages as normal
  when filtering is off for the channel.

Performance
- Classifier training runs in a background isolate (injectable trainer for
  widget tests); app start-up no longer waits for it.
- Reply previews look up the quoted message through an id index instead
  of scanning the channel per bubble.
- The latest-messages channel sort computes each channel's latest visible
  message once.

Cleanup
- Use MessageFilterText.isStructuredPayload instead of a screen copy.

Docs: message-filter.md explains how each check works, including the
learned classifier, and drops the outdated "new messages only" limit.
2026-11-06 00:54:09 -07:00
zjs81 1332c35884 Add channel message filter for spam and repeated messages
Client-side filter for channel messages, with no model download:
- User rules on message text and/or sender name (contains, whole word,
  exact), normalised for case, accents, zero-width and look-alike letters.
- Automatic checks: repeated characters, same-sender repeats within 10
  minutes, and the same sentence (>= 6 words) from 3+ senders within 30
  minutes. Windows use send times, so synced history is not a flood.
- On-device n-gram classifier trained by Mark as spam / Not spam taps.

Filtered messages are kept, never notify or count as unread, are not
auto-translated or used for channel previews, and are concealed in reply
quotes. They show as a calm, collapsible placeholder that animates open
and closed, or can be hidden completely. Includes a Filtered messages
list, per-channel toggle, settings screen, translations for all locales
and documentation.
2026-11-05 23:35:27 -07:00
zjs81 3eeb15cbff Merge pull request #623 from wared2003/issue-622-reset-default-routing-algo-settings
Implements Issue #622: Add ability to reset routing algorithm settings to factory defaults.
2026-11-05 23:09:19 -07:00
Logan Rawlins c7847f0d9e add arm64 appimage 2026-11-01 15:05:12 -07:00
Logan Rawlins c19cd28de8 fix CI build pipeline 2026-11-01 14:27:34 -07:00
Logan Rawlins b60e18fe6b init appimage building 2026-11-01 13:36:57 -07:00
zjs81 bfaa00bb38 Document themes, chat backgrounds and automatic holiday themes 2026-10-31 14:09:29 -07:00
edouard 3032be9bad feat: add reset to default for routing algorithm settings (#622)
- Add Reset button in routing settings with Icons.restart_alt
- Extract default values as constants in AppSettings to avoid duplication
- Add translations for all 18 supported languages
- Update documentation in settings.md
2026-10-31 04:53:21 +01:00
ericz f415f0ad4e remove non Hotlink ipfs gateways 2026-10-28 18:48:48 +01:00
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 5e3dc897ba Document map location requests, telemetry positions and the contact row
Explain Update location, which nodes include a position and why, when a
newer advert replaces a telemetry position, and the new contact row.
2026-10-25 11:26:15 -07:00
zjs81 f58a76904a Reject malformed channel QR links and document channel QR scanning
A name with invalid percent-encoding (e.g. name=%FF) made
Uri.queryParameters throw from the scanner's validator. The parser now
returns null for it, with a regression test.

Update the channels and additional-features guides for the renamed
"Scan a QR Code" option, the supported channel link format, and its
limits.
2026-10-24 22:30:51 -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 7c2f481520 Merge remote-tracking branch 'origin/dev' into fix/ui-issues
# Conflicts:
#	untranslated.json
2026-10-24 21:13:02 -07:00
zjs81 471a2b6a5e Merge branch 'dev' into issue-37-selective-notifs 2026-10-24 21:04:26 -07:00
zjs81 f2a27f0f71 Wait for the radio before removing a contact, and explain re-adds
removeContact now waits for the radio's reply and only drops the contact
locally when the radio confirms (or reports it doesn't have it), so a
lost command no longer leaves a contact that the next sync restores.
Failures are shown to the user. The delete dialog warns when the radio
auto-adds that contact type, since the contact returns on its next
advert.
2026-10-24 21:03:39 -07:00
zjs81 1e786b24ba Make the map path trace builder explicit and keep its state
The builder panel now labels its actions, lets the user pick round trip
or as-entered with an explanation, and only sends when "Run path trace"
is pressed. Hops, mode and the last result are kept in UiViewStateService
for the session, so going back no longer clears them and the last result
can be reopened without sending again.
2026-10-24 21:02:19 -07:00
zjs81 f667320608 Fix review findings in channel notification modes
- Detect mentions on the original text, as @[name] or a whole-word @name
- Save and restore the full mode map in review mode
- Open the mode picker from the chat bell and show the mode in its tooltip
- Share one mode picker sheet; fix the stale sheet context
- Persist modes by name and skip unknown entries
- Keep writing muted_channels so older builds keep the user's mutes
- Remove the muteChannel/unmuteChannel/isChannelMuted shims
- Update notifications docs to match the behaviour
2026-10-24 20:46:49 -07:00
zjs81 fe7e72a421 Make Android Auto an opt-in build flag
Android Auto support is now merged into the app only when building with
-PandroidAuto=true (flutter build apk --android-project-arg=androidAuto=true).
The car application meta-data and automotive_app_desc.xml move to
android/app/src/androidAuto/, so default builds no longer declare Android
Auto. Notification replies from the shade and watches are unchanged.
2026-10-24 20:22:12 -07:00
edouard 9f358461e7 update notif docs becose of deleted specific ans redundant reply detection 2026-10-24 15:23:52 +02:00
edouard e0ce8dc6b8 update mention detection pattern 2026-10-24 08:35:31 +02:00
edouard 401b81475a Fix documentation table to use distinct icons (🔔/🔔!/🔕) for the 3 modes 2026-10-24 06:14:36 +02:00
edouard 09e9208108 Update notification mode strings with verified translations
- Add channels_notifyAll, channels_notifyMentionsOnly, channels_notifyNone to all 18 language ARB files
- Add channels_notificationSettings to all ARB files for consistency (was missing in 16 languages)
- Remove redundant "(@)" suffix from mentions only mode
- All translations verified for accuracy
- Special fix: Slovak "Iba spomienky" -> "Iba zmienky" (mentions, not memories)
- Update all localization Dart files via flutter gen-l10n
- Update documentation table with proper icons
- Update untranslated.json
2026-10-24 04:29:24 +02:00
edouard caad3dd703 feat: add per-channel notification modes (all/mentions only/muted)
- Add ChannelNotificationMode enum with all, mentionsOnly, muted options
- Replace mutedChannels Set with channelNotificationModes Map for per-channel settings
- Add mention detection for @username in channel messages
- Update channels list and chat UI with notification mode selector
- Add localization strings for new notification modes
- Automatic migration from old mutedChannels to new system
- Update user documentation
- Preserve backward compatibility with existing mute/unmute API
2026-10-23 22:37:49 +02:00
ZIERandCopilot 4000c49213 Merge zjs81/dev into ez_share_urlimage_PR
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-13 10:16:13 +02:00
zjs81 c18b509d7e Merge remote-tracking branch 'origin/dev' into feat/network-map
# Conflicts:
#	lib/connector/meshcore_connector.dart
2026-10-11 21:55:22 -07:00
zjs81 bc14de586f Add opt-in network map uploads and online map view
- Opt-in upload of header-only packet records and repeater/room server
  adverts to map.meshcoreopen.org about once a minute; payloads, channel
  and DM hashes and transport codes are stripped on the phone, locations
  snapped to a ~2 km grid, install ID rotates daily
- One-time opt-in dialog on first radio connection; toggle and status in
  App settings
- Local / Online / Both switch on the map screen with online repeater
  hexagons, links, add-to-contacts and manage
- Node purchase banner on the connect screen (affiliate link, disclosed)
- Privacy policy and network map documentation
- Translations for all locales
2026-10-11 21:54:16 -07:00
zjs81 679116ed03 Key per-channel storage by PSK-derived channel ID
Channel messages, settings, region, order and images were persisted by
radio slot index, so a slot reused for a different channel inherited the
old channel's history and settings (#359).

- Channel.storageId: first 8 bytes of SHA-256("meshcore-channel:" + psk).
- All per-channel stores key by channel ID; in-memory state stays by slot.
- The connector keeps a slot -> channel ID map, diffs it against the saved
  map on every channel sync and reloads slots whose channel changed.
- Queued channel frames wait until this session's map is confirmed.
- One-shot per-radio migration from slot keys, using the cached channel
  list the legacy data was written under; rerun-safe if interrupted.
- Deleting a channel clears its data; a channel removed elsewhere keeps its
  history and gets it back when re-added. A PSK edit keeps its place in
  the custom order.
- Slots sharing a PSK share history and settings.
- Image entries record their channel ID; a slot change resets that slot's
  in-progress reassembly.
2026-10-11 17:52:59 -07:00
zjs81 5fb67abdde Merge dev; fix share-location and discovered-contact import/export; update docs
Merge dev (#588 share location, #436 discovered-contact import/export)
into fix/review-fixes-and-issue-batch. Conflicts: keep the node-scan
button alongside dev's import/export menu; take dev's marker label
prompt.

Share location (#588):
- Never share a missing or 0,0 radio position; hide the chat action and
  show "Your radio has no location set"
- Sanitise marker labels ('|' -> '/', newlines -> spaces) on every path
- One shared MarkerLabelDialog owning its controller/focus node, with
  keyboard submit, replacing three copies
- Map pins default to "Point of interest" again; "Share my location"
  uses the node name
- Location shares honour the send cooldown and handle send errors

Discovered-contact import/export (#436):
- Per-entry decoding with imported/skipped/invalid counts; reject keys
  that are not 32 bytes; skip in-file duplicates and the radio's own key
- Strip routing paths on import and stop exporting them; clamp future
  timestamps; enforce the discovered-contact cap; require a connection;
  2 MB file limit
- Export via in-memory XFile (fixes web); pass sharePositionOrigin for
  iPad (also GPX export and image save); macOS user-selected read-write
  entitlement for save dialogs

Docs: cover share location, import/export, node scan, TCP reconnect,
channel auto-resend options, arrival ordering, badge, password length
and image limits.

Translations for all new strings in every locale.
2026-10-11 01:54:07 -07: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 11c94040e3 Add review mode with a simulated radio
Store reviewers have no MeshCore radio, so they could not reach any
screen past Connect or test the Android Auto messaging notifications.

- Long-press the "MeshCore Open" title on the Connect screen to enter
  review mode on any platform
- A simulated radio speaks the companion protocol as a fourth transport,
  so sync, messages, ACKs, notifications and notification replies run
  through the normal code paths
- Seeded contacts, channels and history; a new incoming message every
  45 s, auto-replies a few seconds after sending, and a banner with
  "Send test message" and "Exit"
- Review data uses its own fixed key scope and is cleared on entry, exit
  and at startup; the review scope never adopts legacy unscoped keys,
  and channel mutes changed during review are restored
- Code lives in lib/review_mode/ with tests in test/review_mode/
2026-10-07 20:38:59 -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 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
PacoX a8cac76491 resolved conflict and update doc 2026-07-09 09:08:50 +02:00
zjs81 0f3961f3a2 Merge pull request #461 from ericszimmermann/ez_alternative_maps
Alternative Maps
2026-07-04 00:32:58 -07:00