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.
This commit is contained in:
zjs81 committed 2026-10-11 01:25:31 -07:00
1 parent a64a33d0c0
commit 25f197c979
120 files changed
+10424 -687

No files matched your search

+26 -4
View File
@@ -47,6 +47,7 @@ import '../l10n/l10n.dart';
import '../helpers/snack_bar_builder.dart';
import '../widgets/unread_divider.dart';
import '../theme/mesh_theme.dart';
import '../widgets/future_timestamp_indicator.dart';
import '../widgets/mesh_ui.dart';
import 'telemetry_screen.dart';
@@ -82,6 +83,9 @@ class _ChatScreenState extends State<ChatScreen> {
Message? _pendingUnreadScrollTarget;
String? _unreadDividerMessageId;
DateTime? _lastTextSendAt;
// True while a send is awaiting outgoing translation, so a second tap
// can't send the same text again.
bool _isSendingText = false;
@override
void initState() {
@@ -435,14 +439,15 @@ class _ChatScreenState extends State<ChatScreen> {
final startsDay =
messageIndex == reversedMessages.length - 1 ||
!isSameChatDay(
reversedMessages[messageIndex + 1].timestamp,
message.timestamp,
reversedMessages[messageIndex + 1].receivedAt,
message.receivedAt,
);
final child = isUnreadAnchor || startsDay
? Column(
mainAxisSize: MainAxisSize.min,
children: [
if (startsDay) ChatDaySeparator(day: message.timestamp),
if (startsDay)
ChatDaySeparator(day: message.receivedAt),
if (isUnreadAnchor) const UnreadDivider(),
bubble,
],
@@ -663,6 +668,16 @@ class _ChatScreenState extends State<ChatScreen> {
}
Future<void> _sendMessage(MeshCoreConnector connector) async {
if (_isSendingText) return;
_isSendingText = true;
try {
await _sendMessageInner(connector);
} finally {
_isSendingText = false;
}
}
Future<void> _sendMessageInner(MeshCoreConnector connector) async {
final text = _textController.text.trim();
if (text.isEmpty) return;
@@ -731,7 +746,10 @@ class _ChatScreenState extends State<ChatScreen> {
}
// end transform
_textController.clear();
// Keep anything the user typed while translation was running.
if (_textController.text.trim() == text) {
_textController.clear();
}
_textFieldFocusNode.requestFocus();
connector.sendMessage(
_resolveContact(connector),
@@ -1644,6 +1662,10 @@ class _MessageBubble extends StatelessWidget {
color: metaColor,
),
),
if (message.hasFutureTimestamp)
FutureTimestampIndicator(
size: 16 * textScale,
),
if (isOutgoing) ...[
const SizedBox(width: 2),
MessageStatusIcon(