Commit Graph
62 Commits
Author SHA1 Message Date
zjs81 eafc4f1152 Check OS permission and reveal child toggles in notification settings 2026-11-21 20:23:00 -07:00
zjs81 5f7370a38a Merge pull request #690 from zjs81/fix/consistent-overflow-menus
Make top-right overflow menus consistent across main views
2026-11-21 18:49:26 -07:00
zjs81 cf4b21ef02 Make top-right overflow menus consistent across main views
Reorder the Channels overflow menu so screen-specific items appear above a divider followed by Connect/Disconnect and Settings, matching Contacts. Add the section divider on Map whenever screen items precede Connect/Disconnect, standardize the overflow tooltip and screen-context callback capture across all three main views via a shared trailing-section helper, and update the UI design reference and widget tests.
2026-11-21 18:37:15 -07:00
zjs81 11345d3bba Preserve link recognizers across rebuilds and document coordinates 2026-11-21 18:14:33 -07:00
zjs81 05b47a037b Add interactive GPS coordinates in messages 2026-11-21 17:43:15 -07:00
zjs81 2f8fcb87d7 Merge pull request #688 from zjs81/feat/single-add-contact-page
Add dedicated Add Contact page with manual public key entry
2026-11-21 14:36:29 -07:00
zjs81 f45b511bcb Add dedicated Add Contact page with manual public key entry
Replace the Contacts add-contact modal sheet and separate menu shortcuts with a unified Add Contact screen supporting manual type/name/public-key entry, clipboard import (meshcore:// URIs, share tokens, and bare 64-hex keys), discovered contacts, and QR scanning.
2026-11-21 14:03:18 -07:00
zjs81 222b45e130 Keep explicit trace contacts and re-resolve on self move
Keep plausible explicit pathContacts authoritative over nearer general contacts sharing a hop prefix while still rejecting impossibly far hops. Re-resolve primary outbound hops, inferred positions, target guess, and map points when _rebuildDisplayPaths runs after self location changes.
2026-11-21 13:44:39 -07:00
zjs81 79f624c743 Ignore impossible hops in path map resolution
Reject repeater matches and peer inferences whose distance from the previous plausible hop anchor exceeds the per-hop LoRa range budget (250 km scaled by consecutive unresolved hops).

Without a known self location, select the anchor chain that explains the most local hops so a single distant prefix collision does not poison resolution for the remaining hops. Apply the same hop-order resolution and anchor-bounded peer inference in PathTraceMapScreen.
2026-11-21 13:14:32 -07:00
zjs81 3a93481bdf Merge pull request #681 from zjs81/fix/visual-consistency
Fix stale map labels, avatar initials and offline bubble widths
2026-11-21 09:30:23 -07:00
zjs81 787f1bb931 Merge pull request #686 from zjs81/fix/copy-full-and-special-messages
Preserve reply mentions and support copying image messages
2026-11-21 09:29:37 -07:00
zjs81 96b8ff5cf7 Merge origin/dev into fix/visual-consistency 2026-11-21 08:51:01 -07:00
zjs81 4065d60a16 Merge origin/dev into cursor/routing-send-settings-ef15 2026-11-21 08:33:50 -07:00
zjs81 ee7b4c8f8b Preserve reply mentions and support copying image messages 2026-11-21 08:03:25 -07:00
zjs81 816dc92f2b Improve slider inactive track contrast inside SettingsReveal panels 2026-11-21 03:10:43 -07:00
zjs81 b649d8373d Wrap channel bubble metadata row on narrow screens 2026-11-21 02:41:05 -07:00
zjs81 f96bf31444 Merge remote-tracking branch 'origin/dev' into pr681-fix 2026-11-21 02:34:43 -07:00
zjs81 aa621526ec Keep composer focus-intent tracking local to chat screens 2026-11-20 23:09:48 -07:00
zjs81 267936bb91 Merge branch 'dev' into fix/chat-scroll-and-keyboard 2026-11-20 23:06:46 -07:00
zjs81 84c0b97710 Merge remote-tracking branch 'origin/dev' into cursor/routing-send-settings-ef15
# Conflicts:
#	documentation/design.md
#	lib/screens/channels_screen.dart
#	lib/screens/chat_screen.dart
2026-11-20 22:53:08 -07:00
zjs81 ae967ec21f Merge pull request #676 from zjs81/fix/list-sorting-and-performance
Fix list ordering and long-list scrolling
2026-11-20 21:21:07 -07:00
zjs81 173c8db9cc Merge pull request #678 from zjs81/feat/chat-compression-selector
Add in-chat compression selector
2026-11-20 21:15:51 -07:00
zjs81 27cc332383 Add leading icons to every settings row 2026-11-20 20:59:56 -07:00
Cursor Agentandzjs81 dca270e5ad Add Repeaters and Rooms settings for login and clock sync
Move login attempts and auto-fetch into the new section, and let a global clock-sync default be overridden per repeater.

Co-authored-by: zjs81 <zjs81@users.noreply.github.com>
2026-11-21 01:06:26 +00:00
Cursor Agentandzjs81 1b804bd1eb Move send controls into Routing and split retry limits
Direct and flood attempts are separate settings, available with auto
route rotation off. Saved single retry limits migrate to that split,
and reset restores the whole Routing section.

Co-authored-by: zjs81 <zjs81@users.noreply.github.com>
2026-11-21 00:50:53 +00:00
zjs81 bc0062363d Restyle the chat composer
Rounded borderless bubble that grows to five lines, one round button that
switches between attach and send, reply and GIF previews inside the bubble,
a byte counter shown only near the limit, and a transparent panel over chat
wallpapers. Sending, limits and compression are unchanged.
2026-11-20 16:38:01 -07:00
zjs81 fc5f7eb516 Add in-chat compression selector
A Compression: Off / SMAZ / Cyr2Lat strip at the top of DM and channel chats
opens one sheet that explains each mode and holds the Cyr2Lat profile picker.
New connector setters keep the modes mutually exclusive. The old switches are
removed from contact settings and the channel edit sheet, so editing a channel
no longer overwrites its compression setting.
2026-11-20 16:37:54 -07:00
zjs81 ffbb61bc3d Keep chat reading position during sync, selection and app switches
- Room chats: keep the visible message in place when synced messages arrive,
  don't pull a scrolling reader back to the bottom, and keep loaded older
  pages while the chat is open.
- Selecting messages no longer jumps to the newest message.
- Focus returning after a sheet, dialog or app switch no longer counts as
  opening the keyboard.
2026-11-20 16:37:51 -07:00
zjs81 316088dfd6 Fix list ordering and long-list scrolling
- Sort channels by latest message and contacts by recent message using local
  arrival time instead of the sender's clock.
- Contacts added from a card sort by when they were added until the radio
  hears an advert (app-side only; lastAdvert stays 0).
- Stop entrance animations on rows scrolled into view and reuse unchanged
  contact rows across connector updates.
2026-11-20 16:37:47 -07:00
zjs81 92dadb0d3a Fix stale map labels, avatar initials and offline bubble widths
- Map node labels follow light/dark theme changes.
- Avatar initials use only letters and digits; hop avatars fall back to the
  hash prefix.
- Incoming channel bubbles are the same width connected and offline.
- Day separators wrap instead of overflowing with large text.
2026-11-20 16:04:50 -07: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 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
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 821479742d Fix repeater settings grey box, nameless discovered nodes and chip contrast
Repeater settings:
- The Advanced and Identity Keys cards store their expanded flag in
  PageStorage. Their TextFields' inner Scrollables shared that identifier,
  read the bool as a scroll offset and failed to build, which showed as a
  large grey box in release builds. Give each card's body its own storage
  scope. Regression test added.

Discovered contacts:
- Adverts parse the two optional 16-bit feature fields before the name,
  as MeshCore's AdvertDataParser does, so their bytes are no longer read
  as the name (a zero byte gave an empty name).
- A nameless advert or removal no longer wipes a known name.
- The discovery tile gives the name the full width (the type chip beside
  it squeezed it to nothing at large text sizes); the type moves to the
  key line as plain text, and an unnamed node shows its key prefix.
- The node scan sheet's type chip can shrink instead of the name.

Contrast:
- StatusChip draws its label in the normal text color; the icon or dot
  keeps the accent, adjusted to 3:1 against its tint. Avatar icons and
  initials get the same adjustment. Amber on its tint in the light theme
  was about 2:1.

Channel chat:
- Hashtag channels drop the redundant "Hashtag" subtitle label, and the
  region action moves into the overflow menu (tapping the title still
  opens it) so the channel name keeps its room.
2026-10-31 12:09:42 -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 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
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 b15f6450bd dart format 2026-08-04 17:27:51 +02:00
ericz 2879bf6147 fix test/screen/path_trace_test.dart 2026-08-04 17:23:50 +02:00
PacoX 445a18a83f Fix failed test 2026-06-16 15:01:10 +02:00
HDDen d61eaaaff1 Merge branch 'dev' into update-pacox-multibyte 2026-06-14 01:12:49 +03:00
HDDen d06a4c1861 Merge branch 'dev' into update-pacox-multibyte 2026-06-12 13:39:09 +03:00
zjs81 26fdf74d69 Refactor UI code for better readability and consistency
- Improved formatting of ListTile icons and text styles in settings_screen.dart, telemetry_screen.dart, usb_screen.dart, gif_picker.dart, path_editor_sheet.dart, repeater_login_dialog.dart, and room_login_dialog.dart for better readability.
- Consolidated TextStyle definitions into single lines where applicable.
- Updated notification_service.dart to enhance readability of notification ID assignment.
- Simplified function signatures in routing_sheet.dart for clarity.
- Cleaned up test assertions in usb_flow_test.dart for conciseness.
- Removed unused translations in untranslated.json to streamline localization files.
2026-06-11 00:28:13 -07: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
HDDen 2e4f26d7cd Multibyte: fix map 2026-05-28 02:20:56 +03:00
PacoX 5d03f99040 fix tracepath 2026-05-26 20:12:27 +02:00
just-stuff-tm be690c8194 fix: provide AppSettingsService in tcp_flow_test
TcpScreen.initState reads AppSettingsService from context
to pre-fill host/port fields, but the test helper only
provided MeshCoreConnector. Switch to MultiProvider so
AppSettingsService is also in the widget tree.
2026-03-15 16:48:40 -04:00
Zach db935a7454 refactor(tcp): promote MeshCoreTcpConnector, fix translations, harden UI
- Replace thin MeshCoreTcpManager facade with a proper MeshCoreTcpConnector
  that owns TcpTransportService and the frame subscription, mirroring
  MeshCoreUsbManager. The connector no longer holds a raw TcpTransportService
  or a _tcpFrameSubscription field.
- Remove hardcoded default host IP from TcpScreen (keep port 5000 hint).
- Disable connect button during scanning state, not just connecting state.
- Fix tcpPortLabel mistranslated as nautical "port/harbor" in de, it, pt,
  nl, sv, sk, sl, zh; fix corrupted Slovak tcpPortHint ("5 000" → "5000").
- Remove unused tcpStatus_connecting string from all 15 locale arb files
  and all generated app_localizations_*.dart files.
- Add extendedPadding to TCP screen FABs to match USB screen.
- Add Key to connect button; update tests to use byKey and assert
  onPressed == null when button is disabled during scanning.
2026-03-13 10:59:09 -07:00