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:
1 parent
a64a33d0c0
commit
25f197c979
120 files changed
+10424
-687
No files matched your search
@@ -413,17 +413,26 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec {
|
||||
for (final asset in spec.assets) asset.fileName,
|
||||
};
|
||||
|
||||
// A file only counts when its size matches the registry: one cut short by
|
||||
// a kill mid-write must not register the bundle as installed, or every
|
||||
// decode fails and reads as "corrupt". Only enforced where a digest pins
|
||||
// the file, since the size is otherwise advisory.
|
||||
bool intact(ImageCodecModelAsset asset) {
|
||||
final file = onDisk[asset.fileName];
|
||||
if (file == null) return false;
|
||||
if (!asset.hasChecksum || asset.sizeBytes <= 0) return true;
|
||||
return file.fileSizeBytes == asset.sizeBytes;
|
||||
}
|
||||
|
||||
for (final spec in imageCodecPresetModels) {
|
||||
final graphFile = onDisk[spec.fileName];
|
||||
if (graphFile == null) continue;
|
||||
final present = [
|
||||
for (final asset in spec.assets)
|
||||
if (onDisk.containsKey(asset.fileName)) asset.fileName,
|
||||
if (intact(asset)) asset.fileName,
|
||||
];
|
||||
final existing = existingByPath[graphFile.localPath];
|
||||
final complete = spec.assets.every(
|
||||
(asset) => onDisk.containsKey(asset.fileName),
|
||||
);
|
||||
final complete = spec.assets.every(intact);
|
||||
merged.add(
|
||||
ImageCodecModelRecord(
|
||||
id: spec.id,
|
||||
@@ -437,8 +446,7 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec {
|
||||
assetFileNames: present,
|
||||
assetRoles: {
|
||||
for (final asset in spec.assets)
|
||||
if (onDisk.containsKey(asset.fileName))
|
||||
asset.fileName: asset.role,
|
||||
if (intact(asset)) asset.fileName: asset.role,
|
||||
},
|
||||
bundleVersion: complete ? kImageCodecBundleVersion : 0,
|
||||
),
|
||||
@@ -1360,8 +1368,14 @@ class ImageCodecService extends ChangeNotifier implements ImageSendCodec {
|
||||
await pendingRelease;
|
||||
} catch (_) {}
|
||||
}
|
||||
if (_session != null && _loadedBundle == bundle) {
|
||||
return _session;
|
||||
final cached = _session;
|
||||
if (cached != null && cached.isDead) {
|
||||
// The worker isolate died; its port answers nothing. Spawn a fresh one
|
||||
// rather than hanging every later job on it.
|
||||
_session = null;
|
||||
_loadedBundle = null;
|
||||
} else if (cached != null && _loadedBundle == bundle) {
|
||||
return cached;
|
||||
}
|
||||
if (bundle == _failedBundle) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user