Epic #1155, owner decision 2 (2026-11-19): block the write, not only the
button. LocalCliService.run refuses before building frame 66 when
supportsLocalCli is false: nothing is sent, a warning is logged (without
the command text, which may hold a secret), and LocalCliUnsupported is
thrown. LocalCliTransport maps it to CliConsoleUnsupported, and the
console adds a row that stays in the transcript: "<cmd>: not sent. Your
radio's firmware doesn't support the device CLI." English key only;
untranslated.json regenerated (17 locales fall back to English).
The existing local CLI suites now connect a stock 1.18 radio first,
since an unclassified connector no longer sends frame 66.
Tests: 40 pass across the service, console and transport suites. With
the refusal check removed, the 2 refusal tests fail.
Agent: BrightForge (session 440fbe94)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Epic #1155. The Settings Device CLI row reads supportsLocalCli; the
companion chat menu's CLI console and the contact Remote CLI switch read
supportsRemoteCli. The switch was shown on every radio, including ones
that ignore flag 0x10 (owner decision 1, 2026-11-19). When the switch is
hidden, Close passes remoteCli: null, so a stored grant is left exactly
as it was rather than cleared.
Tests: 33 pass across the gate, Settings entry, contact dialog and
console suites. With the old gates put back, 4 fail.
Agent: BrightForge (session 440fbe94)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The radio is the only thing that hears the mesh, so what it feeds is
the truth and a value the app stored never beats it (owner ruling).
- A contact sync copied the discovered entry's coordinates over the
radio's (getFromDiscovered), so a stale value, often a 0,0 from a
repeater heard before its location was set, hid the real location on
every sync and was written back. It now copies only the raw advert,
which the contact record does not carry.
- A radio record with no location kept the old one; it now clears it.
- A raw advert without a location, or with 0,0, kept the old one and
stored 0,0 as a value. The newest advert now sets the location,
including "none", and 0,0 is unknown at parse time.
- An advert older than the one applied leaves the location and its age
alone, unless the applied one is dated ahead of the phone: one advert
from a clock set in the future must not freeze a node (Gemini).
- Packet Path shows each hop's coordinates with the age of the advert
that carried them. A last known location never ages out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > Actions gets "Delete message history": the connected radio's
channel messages and direct messages, removed from the app after a red
confirm. Contacts, channels and settings stay. The owner's ruling: start
fresh for a radio, channels and DMs together.
Clear Chat on a channel or a contact saved the emptied list. Saves
merge since #343, so that deleted nothing and the history came back on
the next load. Both now confirm in red and delete the stored history,
the channel's by its own PSK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A channel add, rename or delete the radio did not answer was reported
as unconfirmed at once, while the re-read that would settle it was
still running. The write now waits for that re-read and reports done
when the slot holds the change. The error shows only when the re-read
disagrees or cannot finish, and it carries a Resync button. A delete
confirmed this way clears the deleted channel's history by its own key,
since its slot no longer resolves to it.
The Channels screen gets a Resync action in the app bar. The only
other way to resync was pulling the list down, which nothing said.
During a running sync, Resync explains why it is waiting instead of
doing nothing.
New string channels_resync is English-only; untranslated.json is
regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
caps2 0x04 INDICATORS answers display AND LED with one bit, so a board
with a real display and no controllable LED showed the Status LED
switch, and the radio refused the write with [0xC5][0x7F][0x06]
(firmware #2065: T096, T1000-E, QCC badge).
Firmware PR #2080 (merged on firmware-base, c835aeca) adds advert tags
0x04 TAG_DISPLAY_CONTROL and 0x05 TAG_LED_CONTROL. The precedence comes
from the header, in the same shape as channel notify:
- the advert carries either tag: the tags decide, the bit is ignored
- the advert answers with neither tag: the bit answers both
- no advert (pre-0x1C radio, or not answered yet): the bit answers both
The Display block and the Status LED switch are now gated
independently. The Indicators row shows when either one is present.
Each SET is refused locally unless its own capability is present.
There is no GET-and-read-the-refusal probe.
Client half of OffbandMesh/meshcore-firmware#2069.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner ruling: a channel's message history either stays or goes, never
kept hidden for a later re-add.
- Edit Channel asks Keep or Delete when the key changes (hashtag rename,
new private key). Cancel writes nothing. Same-key renames ask nothing.
- The answer is applied once the radio confirms the clear. Keep moves the
rows (copy, verify, delete only what was copied, repeat) and the phone
notify mode; Delete removes the old key's history.
- After a sync that saw every slot, confirmed them all, found none erased
and had no write in flight, history no channel on the radio shows is
deleted, each key logged. Restore's case (erased slots) and partial
syncs delete nothing; a radio with no channels deletes nothing.
- A different channel over a slot is settled by that sync, since 1.7.0
firmware may move the occupant rather than wipe it.
- Keep history that could not land (add refused, move failed) is spared
for the connection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exported log could not show what the client did when a channel's
phone notify mode was set, or why a channel message notified, so #1121
could not be diagnosed from a log.
- Every notify-mode save logs radio, slot, channel, a one-way PSK
fingerprint, old mode with its source, new mode, and the read-back.
A save refused for a missing radio key or PSK logs as an error.
- Any change to the notify table, by any path, logs before and after.
Settings that fail to parse at startup, or fail to write, log errors.
- The notify dialog and the channel action sheet log what they show.
- Every incoming channel message logs its notify decision: which
channel the slot held, from the live or cached list, the mode and
where it came from, and posted or suppressed with the reason.
- NotificationService queue, batch, suppress and failure paths go to
the app log instead of debugPrint.
- The app version is logged at startup and on every connect.
- appLogger no longer drops messages when the in-app log view is off;
the log file always receives them, as connector lines already did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore to radio (#1060) replayed each cached channel into its remembered
slot, in place, and reported how many frames it sent. On the firmware
shipping next that is refused for every erased slot (an erased record
reads as occupied, #1865), for slot 0 unless it is Public, and for Public
anywhere else (#1896). It would still have said it restored them.
planChannelRestore (lib/helpers/channel_restore_plan.dart) now places by
identity:
- a cached channel whose key is already live on the radio is left out
- Public goes to slot 0
- any other channel goes to its remembered slot when that slot is free or
erased and not slot 0, otherwise to the lowest free slot
- a live channel is never a destination, so nothing is overwritten
- an erased slot is cleared before it is written
Every write goes through _writeChannelSlot and waits for the radio's OK or
ERR. The result is what the radio confirmed. The screen says "The radio
confirmed all N channel(s)", or "confirmed X of Y. Not restored: ...",
persistently. Waiting for each answer also paces the writes by the radio
itself, which replaces the fixed 10 ms gap. The comment claiming a confirmed
count was impossible is gone. The confirm dialog lists only the channels the
radio is missing, and no longer warns that it replaces what the slots hold,
because it doesn't.
The #1060 restore tests are rewritten to the new contract, keeping what they
protected (no erased entry written back, nothing cached is refused, the key
travels with the channel, writes are paced), and adding: slot 0 for Public
only, clear-before-write, nothing live rewritten or overwritten, refusals
reported by name.
Mutation-checked with this commit and the previous one: not skipping slot
0 fails 5 tests; never clearing first fails 1; counting sends as confirmed
fails 1; allowing a Public delete fails 2; a one-# hashtag rule fails 1.
Full suite 2034 pass, analyze clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The firmware shipping next (firmware-base, #1896) refuses any channel but
Public in slot 0, even while it is empty, refuses Public in any other slot,
and refuses clearing Public. Every refusal is ERR_CODE_BAD_STATE, the same
code as an occupied slot, so the client has to avoid them, not interpret
them. Owner rulings, 2026-10-28: slot 0 "should always remain public",
"make sure Public can't be deleted", "Of course add the real public".
- decideChannelSlot takes a required isPublic. Public goes to slot 0 when
it is free; nothing else ever does. The fallback that lets Public take
another free slot is reached only when slot 0 holds some other channel,
which happens only on older firmware.
- The shared allocator takes the key being written and decides from it,
so Join Public, a typed private key, a QR share and a hashtag join all
follow the rule, and a second Public is refused on every one of them.
- planChannelImport follows the same rule for a stock config file.
- Deleting Public is refused at the attempt with "Public can't be removed
from the radio. It always stays in slot 0." The control stays live.
- Edit Channel locks Public's key, and refuses typing Public's key into
another channel while Public is on the radio.
- A hashtag join of "public" (leading # and spaces and trailing spaces
dropped, any case: the device's namesPublic rule) adds the real Public,
not sha256("#public").
The #1022 test that asserted Public has no claim on slot 0 is replaced by
tests for the rule above.
On older firmware, slot 0 is no longer handed to other channels, so one
slot of 40 goes unused there. That follows the owner's ruling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Second Gemini round on Epic #1021, findings verified against the code.
Kept, fixed:
- A writer's re-read called _syncChannels directly, so with two writes
overlapping, the first to finish started a sync while the second still
waited on the same reply queue. The trigger was restoreChannelsToRadio,
the one write path the UI did not gate. Writers now only request the
re-read; the last write to finish runs it, once. Nested writes (an edit's
clear and add) and batches re-read once, at the end.
- Restore to radio refuses with the busy message while the table is busy,
like every other channel write. With that, no write path can overlap a
sync.
Justified, not changed:
- "A write slips in between a batch ending and its deferred sync
starting": calling an async function runs synchronously up to its first
await, and _syncChannels sets _isSyncingChannels before any await, so no
tap can land in between.
- "A disconnect leaves the write counter stuck": every write decrements in
finally, and _writeChannelSlot returns within the 5 s reply timeout even
after the queue is cleared. A sync deferred meanwhile runs when that write
ends.
- "A deferred sync is dropped if a sync is already running": reachable only
when a write overlaps a running sync, which no write path allows now.
Mutation-checked: a writer starting its own re-read fails the new
overlapping-writes test. Full suite 1963 pass, analyze clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gemini review findings on Epic #1021, after verifying each against the
code.
Kept, fixed:
- A sync started while a channel write waits for its reply shares the
ordered reply queue with it, so the sync's empty-slot ERR could be taken
as the write's answer. The trigger is real even though the review named a
path that doesn't exist: pull-to-refresh, the sync button, the 400 ms
channel-changed debounce, and dev's 3 s failed-sync retry all call
getChannels at any time. getChannels now defers while a write is in
flight, and the last write to finish runs it once. The writers' own
re-reads call _syncChannels directly.
- Config import and community delete hold the guard across their whole
loop (batchChannelWrites), so a deferred sync cannot start between two
writes.
- A key change whose clear lands but whose add fails used to report "did
not confirm the change", understating that the channel is now gone. It
returns ChannelWrite.clearedNotAdded, with a message saying the slot is
empty and to add the channel again.
Justified, not changed:
- A reply arriving after the 5 s timeout, once the waiter has been
dropped, shifts the queue by one. Keeping the waiter instead would shift
it permanently whenever a reply is truly lost. Firmware answers
CMD_SET_CHANNEL synchronously, far inside 5 s, and a disconnect clears the
queue, so dropping is the smaller risk.
- Claimed crash on removeAt(0) with an empty queue: both handlers check
isEmpty first.
Mutation-checked: removing the deferral fails 2 tests; returning the add's
own result fails 1. Full suite 1962 pass, analyze clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebasing Epic #1021 onto dev met #1063, which keys channel history by the
channel's PSK. On a slot reassignment it keeps the old channel's history,
so re-adding that channel brings it back, and only a delete removes history
outright. #1026's write path had cleared history on every change; the
rebase resolution moves it onto dev's rules. A confirmed reassignment
(an add, or an edit to a new key) purges only the slot's legacy keys and
the in-memory entry. A confirmed delete removes history outright. All three
still happen only after the radio's OK.
Nothing in dev's suite caught a reassignment true-deleting the old
channel's history: with that mutation applied, all tests passed. A new test
(channel_write_history_identity_test.dart) drives the real PSK-keyed store
and fails 2 of 4 under it.
The Edit Channel dialog now checks for a busy channel table before #1103's
identity check. Mid-sync the list is empty, so the identity check closed the
dialog and blamed a changed channel. The busy check keeps the dialog and the
user's edits open and gives the real reason.
#1060's restoreChannelsToRadio now counts as a channel write in flight
while it runs, so an add made during a restore is refused instead of
choosing a slot the restore is about to fill (in the rebased #1026 commit).
Full suite 1954 + 4 pass, analyze clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part A of the #1021 test child.
Widget tests (test/helpers/channel_slot_ui_test.dart) for all six refusal
messages: busy, all slots full (with the count), Public already on the
radio, and the three unconfirmed-write outcomes (occupied, rejected, no
reply). Each one shows on its own failure, is still on screen 10 seconds
later (past the 4 second toast default), and none shows when the action is
allowed.
Connector test: a channel sync that fails restores the cached list with
hasLoadedChannels false, and the table still reads as not busy, so an add
gets a free slot. This is the lockout a hasLoadedChannels gate would have
caused on a flaky link, driven through the real sync rather than asserted.
The "Public is already on this radio" check moves from the channels screen
into channel_slot_ui.dart, so all six messages live in one tested place.
Mutation-checked: dropping persist: true fails all 7 persistence tests;
gating the table on hasLoadedChannels fails the failed-sync test. Full suite
1805 pass, analyze clean.
Part B (on-device) is the owner's hardware pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setChannel sent CMD_SET_CHANNEL and moved on without the radio's OK or
ERR, then cleared the slot's message history on the strength of having
sent it. Firmware with OffbandMesh/meshcore-firmware#1864 refuses a
different channel over an occupied slot with ERR_CODE_BAD_STATE and keeps
that channel intact, so the client would have deleted the history of a
channel the radio still holds.
Connector:
- setChannel, deleteChannel and the new editChannel wait for the reply,
using the existing generic-ack queue (each pending entry can now carry a
completer), and return ChannelWrite: ok, occupied (BAD_STATE), rejected,
or noReply (timeout, send failure, or not connected).
- History is cleared only after an OK. A refusal or no reply keeps it.
- A timed-out waiter leaves the queue, so a late or lost reply cannot be
matched to the next command.
- isChannelTableBusy covers an unanswered write as well as a sync. Without
that, a second add made while the first is waiting would pick the same
slot, because the list does not show the first one yet.
- editChannel does clear-then-add for a new key. #1864 firmware refuses a
new key written in place (owner ruling on that epic: changing a key is
clear-then-add), so the edit dialog would have broken once it shipped.
A rename is still a single write.
Callers:
- Every add, edit and delete path waits for the result and shows its
success toast only after an OK; otherwise a persistent message says what
happened. The two places the channels screen cleared history itself now
do it only after an OK.
- Edit and delete refuse, with the busy message, while the table is busy.
- Config import and community delete write one channel at a time and
re-read the list once at the end. A re-read after each write would put
the next write inside a sync, where its reply cannot be told from the
sync's. Import counts only confirmed channels; refused ones are listed
as skipped.
- Creating a community: the dialog closes before the write, so the wait
cannot invite a second tap, and a refused channel's message is no longer
replaced by the "created" toast (a #1022 regression, since a newer toast
replaces the visible one).
Tests: 12 connector tests driving synthetic OK / BAD_STATE / NOT_FOUND /
no reply. Mutation-checked: clearing before the reply fails 3, a new key
written in place fails 1, and a timed-out waiter left queued fails 1. Full
suite 1793 pass, analyze clean.
The refusal path cannot be exercised on a real radio until #1864 ships;
the OK path can be tested on hardware now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The channels screen was fixed in #1022, but two more surfaces chose a
channel slot on their own and had the same race.
Community QR scanner:
- A channel share link picked its slot before the confirm dialog and wrote
it after, so a sync during the confirmation (setChannel itself starts
one) could leave it pointing at an occupied slot. The slot is now chosen
after the user confirms, and a refusal keeps the screen open with the
reason showing.
- Joining a community skipped the public channel silently when the radio
was full and still showed the green "joined" toast. A refusal now
explains itself, and the green toast shows only when the channel was
actually written.
- Its private slot finder is deleted.
Config import:
- planChannelImport takes a required isSyncing. Mid-sync the connector's
channel list is empty, so the planner would have written every incoming
channel from slot 0 up, over Public. It now plans nothing and reports
each channel as skipped with a new channelsSyncing reason. The parameter
is required so a caller cannot forget it and get the unsafe behavior by
default.
Both screens now share allocateChannelSlotOrExplain
(lib/helpers/channel_slot_ui.dart), so the "which slot is free" question
has a single answer. channels_noFreeSlot is retired; its only caller moved
to the shared message.
Tests: two planner tests for the syncing case, mutation-checked (with the
guard disabled both fail). Full suite 1781 pass, analyze clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding #qcchams and #qcchhv from the phone lost Public, from the client and the radio. Three faults combined, all client-side; the firmware's CMD_SET_CHANNEL is a plain indexed write by design and did what it was told.
1. The slot was chosen when the add dialog opened (_showAddChannelDialog computed nextIndex before showDialog and closed over it), so it was stale by the time Add was pressed. 2. The connector empties its channel list for the duration of a sync and refills it slot by slot, so a dialog opened mid-sync saw every slot as free. 3. _findNextAvailableIndex answered 'no free slot' with return 0, which is where Public normally lives, turning a full radio into a silent overwrite of Public.
The decision moves into a pure helper, decideChannelSlot, called at the moment of each write and never earlier. It refuses while isSyncingChannels is true and refuses when full, returning a named reason rather than slot 0. Deliberately isSyncingChannels and not hasLoadedChannels: the latter stays false after a FAILED sync while the cached list is restored into use, so gating on it would disable adding a channel permanently on a flaky link.
Add Public no longer hardcodes slot 0, which it wrote with no occupancy check. Public is identified by its PSK, not its index, so it takes a free slot like any other channel, and is refused if it is already present.
Owner ruling: block the unsafe write but keep the control live, since a greyed-out button is itself a silent failure. Every refusal explains itself and passes persist: true, because showDismissibleSnackBar defaults to a 4 second toast that SAFELANE 6 rules out for an error. A refused add leaves the dialog open so the user can retry.
Mutation-tested rather than trusted: restoring return 0 fails 2 tests, and removing the sync guard fails 4, including the exact reported scenario. Full suite 1779 pass. New strings are English-only with the regenerated untranslated.json, matching the convention of every recent string-adding commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lands the #523 indicator controls, separated from the factory reset (#1057)
that happened to share their branch. #1057 is destructive, untested and the
owner did not ask for it, so it stays behind rather than riding along.
Rotation is 0xC5 0x1A GET / 0x1B SET, gated on TAG_DISPLAY_ROTATION in the
0x1C advert, with no caps-bit fallback and no probing. It is NOT 0x18/0x19:
those are per-channel channel notify, and an earlier build that put rotation
there corrupted silently, because the firmware's 0x19 handler validates a
channel-notify mode and nothing else. The hazard commit 89f1768e is not in
this history at all; this is the post-fix state only.
Display mode and the status LED read device-info bytes 86 and 85. Nothing
reads byte 87, which contract section 2 retired permanently.
Provenance, since the route matters: cherry-picked ea09d2f3 with -m 1. That
commit is the merge of the #523 work into the #1095 advert work, and the
rotation fix lives in its merge resolution rather than in a commit of its own,
so its first-parent diff is exactly what #523 adds on top of what dev already
carries. The result is 956 insertions across 28 files, matching ea09d2f3's own
stat, and offband_indicators.dart, indicators_view.dart and
indicators_connector_test.dart are byte-identical to the old branch tip.
Adversarial review (gemini-2.5-pro) found a crash, fixed here: the rotation
control force-unwrapped displayRotation, but the advert tag that ENABLES the
control arrives before the rotation GET reply that supplies the value, so the
pane threw on any slow link. It now takes an empty selection, matching the
display-mode control beside it, which was already null-safe. Proved by probe:
restoring the unwrap yields "Null check operator used on a null value" and
turns 2 of the new widget tests red.
The review's second finding, a read reply overwriting a newer confirmed write,
is real but deliberately NOT fixed here. The obvious guard is to drop read
replies while a write is outstanding, and _sendIndicatorSet sets that flag
with no timeout and no cleanup, unlike _awaitDeviceUi which clears it in a
finally. That guard would wedge rotation reads for the rest of the session
after any SET that went unanswered, which is worse than the stale value it
prevents. Giving _sendIndicatorSet the same timeout discipline is the real
fix and is follow-up work, not something to change minutes before a cut.
flutter analyze clean, 1945 tests pass and 1 skipped, including 25 indicators
connector tests and 4 new widget tests.
Not hardware-tested.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Wrapping the menu in a scroll view re-indented this line, so dart format
split the if statement across two lines and CI's --fatal-infos analyze
flagged curly_braces_in_flow_control_structures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings feat/1014-ios-app-review up to date with dev for PR #1049.
Conflicts: the app name in TESTFLIGHT_GUIDE.md and tools/ios-signing/README.md
keeps "Offband MeshCore" (#1050); channels_screen.dart takes dev's channel
menu (new radio sound tile) and re-applies the #1075 scroll wrapper.
testflight.yml is dispatch-only again, as the push trigger was only for the
owner's TestFlight pass (#1047). REVIEW-NOTES encryption line and PLAN
finding 14 updated to match what App Store Connect shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User report (Jeremy AA4KY, iOS; one codebase so the fix is
platform-wide): the Edit Channel dialog was type-blind, offering a
free-text PSK field and a random-PSK die for every channel. A hashtag
channel's key IS its name, so hand-editing it silently diverges the
channel from everyone else on that hashtag.
- hashtag: key read-only and copyable (copy icon replaces the die),
derived live from the name while renaming, exactly as adding that
hashtag would. Save refuses a name that stops being a hashtag or
carries a double '#' (a '##name' hashes differently), inline error.
- community hashtag: name and key both read-only (community-secret
derived), key copyable.
- private/public/communityPublic: unchanged.
- Save also refuses, with a persistent error, when the slot's live
occupant no longer matches the channel the dialog opened on, so a
background sync replacing the slot mid-edit (the 1060 class) cannot
be overwritten by a stale dialog (review finding).
Policy helpers are unit-tested; with both guards behaviorally
disabled 2 tests fail. Suite 1903 passed / 1 skipped. English strings
only; untranslated.json regenerated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two findings from the owner's field report: a Channels screen full of
replacement characters, and a channel he had silenced chirping again.
An erased record is not an empty one. Erased flash reads back 0xFF and
Channel.isEmpty tests for 0x00, so a slot the radio had LOST was adopted
as a channel, rendered with U+FFFD, and then persisted over the client's
own good cached list. One missing validation gate, two symptoms.
- Channel.isErased / isUnusable: an all-0xFF record, or a name that did
not decode, is never adopted.
- A sync that sees an erased slot KEEPS the cached list, reusing the
fail-closed branch #1062 already had for unconfirmed holes.
- restoreChannelsToRadio() writes the cache back to the original slots
with their PSKs, behind a confirmed banner action.
Radio notify was keyed by slot, not identity. #544 landed after #1061 and
keyed its in-memory map by slot index; the slot-identity handler cleared
the slot's messages but not its notify mode, so a channel that moved
slots handed its mode to the new occupant and lost its own.
- _channelNotifyModes is keyed by PSK hex, matching channelNotifyModesByRadio
(#848) and the PSK-keyed history (#194).
- A reply whose slot does not resolve to a confirmed channel is dropped.
- setChannelNotify takes a Channel and resolves its CURRENT slot at send
time, so a stale handle cannot address the wrong one; unresolvable is a
visible refusal, not a silent write.
Both guards proved against planted defects: forcing isErased false turns
5 tests red including the cache overwrite, and restoring the slot-keyed
map yields Expected: null, Actual: RadioChannelNotify.off.
flutter analyze clean, 1885 tests pass. New strings English-only with
untranslated.json regenerated.
Task: meshcore-open-75d
Agent: CalmBay
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Stock-parity gap: the companion radio persists a pin set over
CMD_SET_DEVICE_PIN (37) and reports the configured value in device
info bytes 4..7, but the client exposed neither.
- cmdSetDevicePin + buildSetDevicePinFrame ([cmd][pin x4 LE]).
- parseDevicePin reads the device-info field; deviceBlePin getter
(0 = firmware build default, null until reported), nulled on each
new connection handshake; setDevicePin validates with firmware's
own rule (0 or 100000-999999) and sends like the other config
writes.
- Settings tile in the device Actions card, pin shown in PLAIN text
(owner ruling 2026-11-06: no masking, parity with other mesh
clients). Edit dialog with inline validation and Reset to default;
persistent re-pair notice on success, persistent error when the
send fails. English strings only; untranslated.json regenerated.
Gemini gate on the diff: fixed the unsaveable prefill of CLI-set
out-of-range pins, the failed-send success lie, and a controller
leak; double-tap idempotence and the short-frame fallback justified
in the PR. Negative evidence: mutating the encoding, the parse
offset, or the validation fails 4 of the 7 new tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gemini gate (gemini-2.5-pro) on the pre-push stack, four findings:
- Held channel message frames are now keyed per radio: verifying the
unbounded-growth finding exposed that frames held from radio X would
have flushed into radio Y's conversations after a radio switch. A
parked radio's frames flush when that radio next completes a sync. No
cap is added: held frames are popped messages, dropping one is
guaranteed loss, and growth is traffic-bounded (<=172 bytes/frame).
- _loadChannelMessages merges messages that arrived during the disk
read instead of clobbering the list, so the slot-identity reload
cannot hide a message the held-frame flush just filed (disk was never
at risk: saves merge by identity, #343).
- sendChannelMessage refuses the write for a slot this connection has
not confirmed (the persisted copy would fall back to the legacy
slot-index key and be orphaned), and the chat screen surfaces a
persistent error at every send path instead of greying anything.
New English UI string; untranslated.json regenerated (#1063).
Three integration tests cover the fixes (#1064); with the guards
behaviorally disabled exactly those three fail (+3 -3). Full suite
1807 passed / 1 skipped. OUTCOMES.md records the gate and dispositions.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner ruling: no FIRMWARE_VER_CODE gating, caps-bit recognition only. The
reset no longer refuses below ver code 7. A radio that cannot reset keeps its
identity, so the pending record resolves as "not reset" on the next connect
and no app data is touched.
Removes FactoryResetRefusal.unsupported and its string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Epics B3 and C of #544, so there is something testable on hardware.
B3 reads the radio's mode for every reported slot, hooked to
_cleanupChannelSync(completed: true). Deliberately only on completed: the
failure branch restores a CACHED channel list, and addressing a slot from a
cache is the guessed-slot error this must not make. When #1061 lands its
stricter confirmed-list barrier this moves onto it.
C adds 'Radio sound' as its OWN control beside the phone's notifications,
on the Channels sheet and the channel chat menu, gated on caps2 0x80. The
existing control is relabelled 'Phone notifications' so neither is mistaken
for the other. Neither reads the other: that independence is pinned by the
A2 tests.
C3, the owner's call: the row shows what the channel will ACTUALLY do, not
the stored byte. A set mode decides for itself; an unset one reads 'Follows
the radio: <scope>'; and a device scope of None shows as silent even on a
channel set to All, because telling a user with a muted radio that a
channel is on 'All messages' is the confusion this feature exists to end.
Null composes to a reading state, never to an invented mode.
Proved that check can fail: removing the None-override branch fails the
test that asserts it. Restored.
Strings are English-only with untranslated.json regenerated, per the l10n
rule.
flutter analyze clean; full suite 1809 passed.
#1075: the contact, channel, message and channel-sender menus were plain
Columns in a sheet capped at 9/16 of the screen, so items past the cap were
clipped. A room server's Delete Contact was unreachable on an iPhone. They
now scroll, and the sheet can grow to the safe area.
#1074: a message with an @mention or contact card was built as rich text
whose plain segments were never linkified. Those segments now go through
LinkifySpan with the same options, style and confirm dialog as Linkify.
Three new widget tests fail without the fix and pass with it.
Epic #1078.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gemini gate (gemini-2.5-pro) on the pre-push stack, four findings:
- Held channel message frames are now keyed per radio: verifying the
unbounded-growth finding exposed that frames held from radio X would
have flushed into radio Y's conversations after a radio switch. A
parked radio's frames flush when that radio next completes a sync. No
cap is added: held frames are popped messages, dropping one is
guaranteed loss, and growth is traffic-bounded (<=172 bytes/frame).
- _loadChannelMessages merges messages that arrived during the disk
read instead of clobbering the list, so the slot-identity reload
cannot hide a message the held-frame flush just filed (disk was never
at risk: saves merge by identity, #343).
- sendChannelMessage refuses the write for a slot this connection has
not confirmed (the persisted copy would fall back to the legacy
slot-index key and be orphaned), and the chat screen surfaces a
persistent error at every send path instead of greying anything.
New English UI string; untranslated.json regenerated (#1063).
Three integration tests cover the fixes (#1064); with the guards
behaviorally disabled exactly those three fail (+3 -3). Full suite
1807 passed / 1 skipped. OUTCOMES.md records the gate and dispositions.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Epic A of #1061, fixing the #1060 class: the client's slot-to-channel map could silently diverge from the device and misroute notifications and conversations.
- A slot the device never answers for is UNKNOWN: tracked, surfaced via a persistent channels-screen banner with Retry, and never backfilled from the previous list. Lookups for it fail closed, including notification evaluation, which now suppresses instead of defaulting to noisy.
- Ingress barrier: live channel traffic holds until this connection's list is confirmed, then flushes. Pull-based message frames are never dropped (the radio already popped them); lossy raw sniffs stay bounded. Raw-RX no longer matches the offline cache.
- Per-slot unread counts survive a sync only when the slot keeps the same PSK; identity changes are listed in a dismissible notice and logged.
- A sync with unconfirmed slots does not overwrite the last fully-confirmed offline cache; a sync that fails on a live connection retries itself.
New strings English-only per the #1021-era ruling; regenerated l10n + untranslated.json committed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Epic A of #544, plus the B1 contract it needed to fail behaviourally rather
than as a compile error.
Owner directive: app and radio notifications are separate controls, separate
notifications, independent settings. So this adds a RADIO-side per-channel
mode and touches the app's per-channel setting not at all.
- offband_channel_notify.dart: 0x18 GET / 0x19 SET, RadioChannelNotify with
the 1-based encoding (0 unset, 1 all, 2 mentions, 3 off), frame builders,
and a parser that DROPS an unknown mode byte rather than guessing
- offbandCap2ChannelNotify = 0x80, the last bit in caps byte 2
- parseOffbandCaps3 at device-info offset 87, length-gated, never
version-gated (#1065). 87 and not 85: 85 is ui_led_enabled and 86 is
ui_display_mode, so reading 85 would parse the LED state as a caps mask
- connector: per-radio slot-to-mode state cleared in _clearDeviceUiState,
request/set shaped on requestChannelTune/setChannelTune so state follows
the device's re-read reply and never the request, reply handler, and
DeviceUiSurface.channelNotify for refusals
15 tests across three groups. The A2 independence group is the load-bearing
one: changing the app mode emits no radio frame, a radio reply saying Off
does not mute the phone, and the app setting still works on a radio with no
capability at all. That is what stops the two being quietly re-merged later.
Proved the checks can fail: flipping the caps-3 offset to 85 fails three
tests, including the one asserting the LED and display bytes are not
mistaken for byte 3. Reverted.
The radio control itself is Epic C; this pane explicitly does not own a
channelNotify refusal, recorded at the switch rather than left implicit.
Blocked downstream, recorded on #1069: B3's read-on-connect should hang off
#1061's confirmed-list barrier, and the slot-to-mode cache belongs in
#1061's PSK identity-diff reset set.
flutter analyze clean; full suite 1804 passed.
Owner reaffirmed: do not depend on FIRMWARE_VER_CODE, depend on caps bits.
The 0xC0 config gate ANDed OFFBAND_CONFIG_MIN_VER (14) on top of the
OFFBAND_CAP_WIFI_OBSERVER bit, which left it passing at zero margin once the
code rolled back onto 14. Removed; supportsConfig now takes only offbandCaps.
The bit is the sounder signal: caps byte 1 exists only on fork replies, which
are the only replies that carry 0xC0 at all, and a build without the observer
backend compiled in leaves the bit clear whatever version it reports.
minVerCode is deleted rather than left unused, so it cannot be reintroduced
into a gate. Two call sites and four tests updated.
Four gates now depend on caps bits alone: block, caplog, packet hash,
observer config. Those are all of the readers in the conflated 14-22 range.
Full suite: 1739 passed.
Settings > device gets a red Factory Reset tile next to Reboot. The confirm
dialog warns that the radio's identity, contacts, channels and settings are
erased, with "Also delete this radio's data stored in the app" ticked by
default (owner D1=C, D2=A).
Wire: stock CMD_FACTORY_RESET (51) + "reset", since firmware ver code 7.
Refused, with a persistent message and nothing sent, when no radio is
connected or the version is unknown or below 7.
The radio disables its link before formatting, so the client never hears the
result. The app data therefore waits for proof: a pending record (device,
old key prefix, the checkbox) is saved, the frame sent and the session ended
so it does not auto-reconnect into a wiped radio. On the next SELF_INFO from
the same device, a new key means the wipe worked and, if ticked, every
perRadio surface of the old prefix is deleted across drift, prefs and message
rows, plus its notify modes. The same key means it did not happen: nothing is
deleted. A different device decides nothing. A failed delete keeps the record
and retries next connect.
The wipe is driven by scoping_inventory.dart, so a per-radio store added
later is covered without editing it. An app-root banner reports the outcome,
including the BLE note to remove the old OS pairing before reconnecting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS has no system Back. The chat had a hamburger in place of the back arrow, PopScope(canPop: false) switched off the edge swipe, and the keyboard covered the bottom bar with nothing to dismiss it.
Add a back arrow to the channel and the line-of-sight map, keep the edge swipe on pushed screens on iOS, and dismiss the keyboard by tapping the channel's messages or dragging either chat's list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner decision for the first App Store submission. Guideline 2.5.19 bars hidden features, and a personal sponsorship link is an unclear fit. With no unlock on iOS, CoreScope is unreachable there, so the privacy label becomes Data Not Collected, and the notes no longer need the disclosure. Other platforms are unchanged.
Epic #1014, Feature #200.
Agent: ChartreuseBay (session 425e424d)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App Store guideline 2.3.10 bars naming other marketplaces in an app. Other platforms keep the link.
Epic #1014, Feature #200.
Agent: ChartreuseBay (session 425e424d)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Android 11 and below the BLE plugin refuses to scan while system Location is off. The Scan button caught that error and only logged it, so the user saw nothing; one tapped Scan 172 times. A failed scan now shows a persistent message: a specific one when Location is off, a plain generic one for anything else, never the raw exception. The detail still goes to the log, and Scan stays pressable.
New owner-approved strings scanner_scanFailedLocationOff and scanner_scanFailedGeneric; other locales fall back to English via untranslated.json.
Tests: each message present on its failure, absent on success, still shown after 10 s, and Scan retries after a failure. Each check was made to fail first against a broken build (persist false; log-only; misclassification).
Plan by EmeraldBrook on #1033.
Agent: BrightDog (session 38fb0e08)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route into the app on return from settings only when the scanner is the current route again, the same condition the connection listener uses. A popping route is outside the navigator's present set, so the settings route does not block it.
The share tests now wait frame by frame on their own condition instead of a fixed 2-second window, and the persistence checks were re-proven to fail with persist: false.
Correct a stale comment: the Experimental unlock is on the Device Info Build row, not About.
Agent: BrightDog (session 38fb0e08)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A radio that will not connect is exactly when a user needs the log, and
the only way to it ran through device Settings, which needs a connected
radio. The scanner now has a settings icon that opens an app-only
settings screen: App Settings, Debug (Share logs, the logging switch,
both log viewers) and About.
Navigation only. How logs are written is untouched: Share logs calls the
same LogExport.shareLogs the log screens use, on the same on-disk file.
The device Settings screen keeps every category. Its About pane and the
app-level Debug rows moved into AboutView and DebugLogTiles, which both
screens now share; Device CLI, Serial capture and Mesh topology need the
radio and stay in device Settings only.
Export failures now persist until dismissed and are logged: "No log
available to export" was a 4-second snackbar, and a share or save that
threw had no handler at all. New owner-approved string:
debugLog_exportFailed. Other locales fall back to English per
untranslated.json.
Tests pin both sides with the radio disconnected: Share logs hands the
on-disk file to the share sheet, About shows the version, no device
category or radio row appears, both error messages persist, and device
Settings still has everything. Each check was made to fail against a
deliberately broken build first.
Part of Epic #693.
Agent: BrightDog (session 38fb0e08)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The companion "CLI console" entry was gated only on the target being a
companion. A pre-1.18 radio, including Offband before the absorb, refuses a
type-3 send: companion-v1.17.1 CMD_SEND_TXT_MSG accepts only plain and
CLI_DATA and answers anything else with ERR_CODE_UNSUPPORTED_CMD
(companion-v1.18.0 adds CLI_COMMAND). The connector only logs error
frames, so the command waited out its mesh timeout and the console showed
the #891 row, which blames the target for a limit of the user's own radio.
- Gate: DeviceCliScreen.offersRemoteConsole requires a companion target
AND a connected radio that speaks the 1.18 CLI (allowsCliFrame, the same
check that gates the local Device CLI; type-3 send and frame 66 shipped
together in 1.18). Disconnected or unclassified offers nothing. The chat
menu uses it.
- Fail fast: RemoteCliTransport fails the command at once with
CliConsoleUnsupported when the radio refuses the send. The window arms
only when the text frame is written (the onAttempt hook, after the path
update) and closes on the command's SENT, which on 1.18 carries an
expected-ack of 0. So an unrelated unknown-command refusal before the
write, or a DM's SENT, cannot be pinned on this command. Dispose
releases a command still waiting.
- Console: a refused send shows "<command>: not sent. Your radio's
firmware doesn't support remote CLI." (owner-approved), not the timeout
row.
Tests: the gate (positive and negative across populations, roles, and
disconnected); fail-fast on the refusal, ignoring other codes, errors
after the radio accepted the send, a DM's SENT, an error before the write,
and dispose; the console row.
Reviewed by a one-off Sonnet adversarial pass (Gemini budget down). Its
Medium finding, that the window armed at run() before the write, is fixed
here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A companion that has not granted us remote CLI queues our command as a
plain message and never answers, so from the console's side the silence
is as likely a permission answer as a lost packet. The console showed the
same bare "no reply in N s" row it uses for the local device, which reads
as "the radio is down".
The remote console now shows: "<command>: no reply in N s. This radio may
not allow remote CLI from you, or is unreachable. Not retried." The local
console keeps its plain frame-timeout row. The send itself was already a
single attempt (#999), so "Not retried" states what happened.
- device_cli_screen: the timeout row picks the remote string when the
console targets a contact. A transportOverride test seam lets a test
drive a deterministic timeout; the screen owns and disposes it.
- l10n: deviceCli_remoteNoReply (owner-approved wording).
Tests: the remote timeout renders the full interpolated string; the local
timeout renders its exact string and never the remote permission hint.
Reviewed by a one-off Sonnet adversarial pass; its test gaps are fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend the one CLI console (device_cli_screen, F2 #883/#884) to target a
permitted companion over the mesh (TXT type 3, #888/#889), reusing the
console rather than adding a screen or a chat-borne command path. Opened
from a "CLI console" action on a companion contact; command and reply
both live in the console.
- cli_console_transport.dart: CliConsoleTransport with a local and a
remote implementation, and one CliConsoleTimeout the console catches.
The remote transport sends with retries: 1 (no auto-retry - an
unpermitted companion queues the command and never replies, so a retry
only spams the mesh) and correlates the reply via the receivedFrames
listener, gated to CLI_DATA so a chat message or inbound command from
the same contact can't complete it (Sonnet review).
- device_cli_screen: optional remoteContact; "Remote CLI" + contact name.
- chat_screen: companion-only "CLI console" entry (Contact.isCompanion).
Also corrects #890: CLI and chat are separate surfaces. The receive
pipeline filed every contact frame into the conversation regardless of
TXT type, so a companion's CLI reply (type 1) and an inbound command
(type 3) leaked into the chat thread. A guard now drops CLI-typed
messages from the message pipeline - the console is their only surface -
and #890's in-chat command bubble is removed.
Review (Sonnet, one-off, Gemini budget down): redact secret reply text
in the remote path's late/unmatched log, matching LocalCliService;
dispose cancels the subscription; document that remote truncation is not
detectable post-reassembly.
Tests: transport round-trip / sender-filter / timeout / no-retry /
CLI_DATA gate; Contact.isCompanion; remote console title; and the
pipeline keeping CLI (type 1 and 3) out of the conversation while a plain
message still enters.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Upstream 1.18 lets a permitted contact send a remote-CLI command (TXT
type 3) to run on our radio. Before this, _parseContactMessage only knew
plain (0) and CLI_DATA (1), so a type-3 frame was warn-dropped as an
unknown type and never surfaced.
- meshcore_connector: accept txtTypeCliCommand in _parseContactMessage,
skip SMAZ decode for it (like CLI_DATA), and flag the Message
isCliCommand. Add @visibleForTesting parseContactMessageForTest.
- message model: new isCliCommand field threaded through the
constructor and copyWith.
- message_store: persist and read isCliCommand; skip SMAZ on read for it.
- chat_screen: label an inbound command bubble "Command for your radio"
and exclude it from the incoming-translate action.
- l10n: chat_remoteCliCommand.
test/connector/inbound_cli_command_test.dart: type-3 accepted+flagged,
type-1 isCli-not-command, plain-neither.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On 2026-10-25 the client retried an unreachable T1000-E about every
14 s for 7.7 hours, and no other connect could start meanwhile (#995).
- connect() reset the attempt counter at the start of every automatic
attempt, so the backoff never grew and nothing gave up. A
ReconnectPolicy now owns the count: 5 attempts or 3 minutes, and only
a user connect, a manual disconnect or a successful link resets it.
- A connect the user starts, BLE, USB or TCP, abandons an automatic
attempt in flight instead of being refused. A generation check after
each await in the BLE connect stops an abandoned attempt before it
writes shared state.
- Refusals are logged and shown, never silent (the USB screen dropped
taps without a trace).
- The scanner status bar shows the attempt with a Stop button, and
"Couldn't reach" with Retry once the retry gives up.
Tests watched failing first: the attempt count (1, expected 2), the
give-up, the TCP refusal, the silent BLE refusal, and the three screen
cases. Full suite 1719 pass, analyze clean.
Epic #996, design on #995.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three defects turned a 13-hop 3-byte-hash message into a 39-hop badge:
- log-RX ingress stored the width-stripped hop count; now stores the raw packed path-len byte, the same encoding fromFrame keeps
- the repeat merge substituted the path BYTE length into the packed field; mergePathLenRaw now compares decoded hop counts and never sees a byte length
- fromFrame read the V3 path_len field signed, so 3-byte-width values (>= 0x80) collapsed into the flood sentinel; now unsigned with 0xFF kept as the direct marker
Rendering now groups path hashes by the packet's own declared width (ChannelMessage.effectivePathHashWidth), with the radio's device-wide mode only as the legacy fallback, so the path screen, chat via-line and route-reply all agree with the badge.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Task 750.4 of the contact-naming plan: the UI. Rename sits on the per-contact sheet, above the destructive Block tile, and the sheet shows what the node calls itself whenever a custom name is set.
The dialog shows the node's own name at the moment of the decision, and only while it differs from what is typed, so the user can see the name they are overriding without having to remember it and the same string never appears twice. It also says plainly that the rename is local and that adverts keep the node's own name up to date, so nobody has to guess what renaming costs them.
Empty and whitespace-only are normalized to a clear in the dialog as well as in the connector and the store. Three layers enforce it independently so none is load-bearing and the dialog never hands a blank downstream to be cleaned up.
A 32-character cap keeps tiles readable. Counted in characters, not bytes: a custom name never crosses the wire, so #636's grapheme truncation does not apply and a byte cap would mean 'shorter for CJK' for no reason.
Thirteen tests. T29 and T30 came from the pre-PR review and I had them wrong first: they accepted an empty string, which IS the defect the review found, so they would have passed against a broken save path. Tightened to assert null strictly, then falsified: reverting the normalization makes both fail where before they passed.
Gates: analyze --fatal-infos --fatal-warnings clean, dart format 0-changed, 1335 tests passed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>