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

+24 -2
View File
@@ -79,6 +79,11 @@ class ImageCodecSession {
final Map<int, Completer<void>> _pendingReleases = {};
int _nextJobId = 1;
bool _disposed = false;
bool _dead = false;
/// True once the worker isolate has died. A dead session can never answer
/// again, so the owner must drop it and spawn a new one.
bool get isDead => _dead;
ImageCodecSession._({
required Isolate isolate,
@@ -121,12 +126,16 @@ class ImageCodecSession {
});
errors.listen((message) {
final description = message is List && message.isNotEmpty
// `null` is the onExit notification: the isolate is gone without an
// error report (killed, or a native crash).
final description = message == null
? 'exited'
: message is List && message.isNotEmpty
? message.first.toString()
: message.toString();
final active = session;
if (active != null) {
active._failAll(StateError('Image codec isolate died: $description'));
active._markDead(StateError('Image codec isolate died: $description'));
} else if (!handshake.isCompleted) {
handshake.complete({'type': 'fatal', 'error': description});
}
@@ -146,6 +155,7 @@ class ImageCodecSession {
),
errorsAreFatal: true,
onError: errors.sendPort,
onExit: errors.sendPort,
debugName: 'image-codec',
);
} catch (_) {
@@ -359,6 +369,18 @@ class ImageCodecSession {
}
}
/// The worker died on its own. Fail what is pending and refuse new work,
/// or the next job would be sent to a dead port and wait forever.
void _markDead(Object error) {
if (_disposed) return;
_dead = true;
_disposed = true;
_failAll(error);
_isolate.kill(priority: Isolate.immediate);
_fromWorker.close();
_errors.close();
}
/// Kills the isolate and frees the model's resident memory.
Future<void> dispose() async {
if (_disposed) return;