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.
POSIX opens the port O_NONBLOCK with VMIN/VTIME=0, and fl_open skips
setTimeout on Linux/macOS, so the default all-zero Timeout makes
SerialThread's read() return immediately. With no traffic the reader
spins at 100% of a core for the whole session. Release builds and a
minimized window do not help because it is a native thread.
Set a 10 ms read/select timeout on POSIX. Data still wakes select
immediately; the timeout only bounds idle wakeups and queued-write
latency. Apply the same change to the macOS copy of flserial.
Follow-up to #557.
Measured with a PTY harness, idle: 99.9% of one core before, 0.2%
after. RX and TX still pass.
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.
- Record delivery observations with the path of the attempt the ACK
belongs to, and skip ambiguous ACKs, so a late direct ACK is not
learned as a flood delivery.
- Remove secondsSinceLastRx from the timeout model: it measured time
since any companion frame, which was near zero at train and predict.
- When a contact's path history is full, evict the lowest-scoring path
instead of silently dropping new discoveries.
A background retry's RESP_CODE_SENT arriving while the path was being
prepared was taken as the telemetry request's ack, so its tag and timeout
replaced ours and a sensor's tagged reply was rejected.
Writing the telemetry time into lastSeen sent the phone's clock back to
the radio as the node's advert timestamp on the next path or flag write,
which could later make the radio's record look newer and drop the fix.
The fix now records its own telemetryFixAt and leaves lastSeen as the
advert time; the map and lists show the later of the two as last heard.
A full contact sync (pull to refresh, reconnect) cleared the list before
the radio resent it, so fixes were lost even for an unchanged advert.
They are now held for the sync and restored onto matching records.
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.
Telemetry replies carried a GPS fix that was only shown on the telemetry
screen, so the map kept the node at its last advert position. The fix now
updates the contact and survives radio contact refreshes until the node
adverts again (compared on the node's own advert clock). The map node card
gains an "Update location" button for companions and sensors; repeaters
and rooms only share GPS with logged-in admins, so they don't get it.
Every received packet copy re-saved its channel's whole history, every
unread change re-saved the channel list, and adverts/path records re-saved
full contact and path-history blobs. Under load the SharedPreferences
backlog starved the Dart event loop (frames and timers stopped), the radio's
offline queue overflowed, and CPU stayed pinned after traffic ended.
- Add CoalescedWrites: keeps the latest write per key and runs them once
per window (750 ms; 5 s for path history). Writes start synchronously so
stores still read the current scoped key.
- Flush before the app is backgrounded, on disconnect, before switching
radios, before the channel slot map changes, before channel history
reloads, before deleteChannel drops a list, and before path history
reloads an evicted contact.
- Cap in-memory channel history at ChannelMessageStore.maxStoredMessages;
storage already kept only that many, but the list grew unbounded during a
session and every save grew with it.
- Cache Contact.publicKeyHex and build pubKeyToHex from a hex-digit lookup; it was
rebuilt on every equality/hash and per-advert contact scan.
Load test (fake TCP radio, 350 contacts, 17 channels, 10-150 packets/s,
Linux profile build): CPU at 10 packets/s 104% -> 45%, recovers to idle
after traffic instead of staying at 160%, and queued messages drained went
from 555 to 3237 over the same run.
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.
The QR scanner only read community codes, so the standard
meshcore://channel/add?name=...&secret=... links used by the official
app and sites like ipnt.uk were rejected as invalid community codes.
The scanner now also accepts channel links. It skips channels already on
the radio, asks before adding, and only uses a free slot after the
channel sync has finished. Also fills in the 59 untranslated strings in
all 17 locales.
Fixes#604
'Show link images in all chats by default' (default off) applies to
every channel and contact without an explicit per-chat choice: the
per-chat setting is now unset/on/off and resolves to perChat ?? default.
The 'Load images from links' master switch still overrides it.
'Load images from links' (default on) gates every link image fetch in
MessageUrlImageHelper: chat previews, notification images, ipfs://
resolution and pyx/ibb scraping. Per-chat toggles keep their values but
are disabled while it is off. IPFS uploads are unaffected.
Obscure the key with a show/hide toggle like the map API key dialog,
clear and restore the mask on focus changes instead of onTap, and only
save a key the user actually edited. Add ipfs.io as a named public
gateway preset now that it is the default.
Default to https://ipfs.io/ipfs/ like dev, keep saved gateways as they
are, and keep an explicitly cleared gateway deactivated across restarts
instead of rewriting public gateways to empty on every load.
Give IpfsUploadConfigException a reason enum mapped to l10n strings in
the attach flow, and show a localized empty-file message and generic
upload-failed message instead of raw English exception text.
Check before uploading that the link (from the gateway and a CIDv1-sized
placeholder) fits with the draft and the reply prefix, and tell the user
when it doesn't instead of cutting their text. The channel limit now
counts the @[name] reply prefix like the send path.
Throw IpfsUploadConfigException for upload configuration problems, and
route every failure in the attach flow to the user, so a missing key or
bad endpoint no longer escapes as an unhandled ArgumentError.
Move the pick/read/upload/insert flow that was copied into both chat
screens into helpers/ipfs_link_attach_flow.dart; each screen passes only
its byte limit and outbound encoder.
Keep refreshing channels before clearing so in-flight queue messages
can't write the history back, but decide whether the channel is still
held while ignoring the deleted slot, and clear even if the refresh
fails or is incomplete.
Reject an empty or non-http(s) endpoint, missing Pinata/Filebase
tokens, and a custom (Kubo) endpoint that doesn't end in /api/v0/add
before any data is sent, and derive the files/cp URL from the add URL
so Kubo behind a proxy path works.
Drop the test-only upload facade on MessageUrlImageHelper that
overwrote the shared HTTP client, move its tests to IpfsUploadHelper,
and build the multipart request with the final upload URI instead of
cloning it.
Only ';' needs encoding, so the title and body fit in one TXT string.
Values that aren't valid percent-encoding are used as-is instead of
hiding the banner.
The "get a node" banner's link, and optionally its title, body and button
text, now come from the _banner.meshcoreopen.org TXT record, looked up
over Cloudflare DNS-over-HTTPS and cached for the record's TTL (1 min to
6 h). The record is `v=1;on=1;url=<https link>` with URL-encoded values;
`on=0`, a missing record or any lookup failure hides the banner.
The firmware's CMD_ADD_UPDATE_CONTACT adds the key when it isn't in the
contact table. Screens that stay open after a contact is removed (e.g. a
repeater admin screen after the repeater's keys were changed and the old
contact deleted) sync the path before every send, so the next command,
status or telemetry request silently added the old contact back. Skip
path and flag writes for contacts no longer in the contact list.
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.
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.
Each nearby repeater is now a tappable row that opens the same node
details sheet as the map, or a short sheet with the key prefix and
signal when the repeater isn't a known contact. The map's node info
sheet and login dialogs move to widgets/node_info_sheet.dart so both
places share them.