Repository navigation
feat(channels): mark channel messages sent without a region scope (like the 1-byte path-hash recommendation) #480
Copy link
Copy link
Closed
Description
Problem
When a channel message carries a region scope, the Channels meta line shows scope: #dk · area: …. When it carries none, the line shows nothing, so users do not notice that the message was sent without a scope. This follows the same idea as the 1-byte path-hash recommendation (#353 / #356).
Why it matters (firmware)
- Companion.
examples/companion_radio/MyMesh.cppsendFloodScoped(GroupChannel…), around line 514: a channel message is sent with the app's default flood scope. If none is set, or the app explicitly requests it, the message is sent unscoped as a plain FLOOD. There is no per-channel scope yet; the firmware has a TODO for it. - Repeaters.
flood.max.unscopedcaps the hops of unscoped floods. The default is 64, butdocs/cli_commands.mdrecommends a low value such as3, orregion denyf *, to stop noisy neighbours. With0, unscoped packets are dropped at hop 0 (comment insimple_repeater/MyMesh.cppsendFloodReply). - So an unscoped message floods outside the sender's region, and repeaters that limit unscoped traffic may stop it.
Prevalence. On staging, 2026-10-08 … 2026-10-13, 64.5% of 10,386 GRP_TXT transmissions were unscoped (FLOOD) and 35.5% were scoped (TRANSPORT_FLOOD). The marker therefore appears on most messages and must stay compact.
Design (owner-approved)
- Channels message meta line. Where a scoped message shows
scope: #dk, an unscoped message shows⚠ no scopein the same amber recommendation style as the 1-byte path-hash warning (--path-hash-warn/var(--warning)and the Phosphor warning icon, not error red). There is no extra pill and nothing new on scoped messages.- Tooltip / accessible text: "Sent without a scope. The message floods outside your region, and repeaters that limit unscoped traffic (flood.max.unscoped / region denyf) may stop it. Recommended: set a default scope (region) in the companion app."
- Do not claim that a low heard-count is caused by the missing scope. Only state the firmware behaviour.
- Packet detail. Add a Scope row with the same marker and explanation for unscoped GRP_TXT/GRP_DATA. Keep the existing display for scoped packets.
- Detection. Use the transmission's route type. FLOOD means unscoped; TRANSPORT_FLOOD means scoped, whether the name is known or not. Do not use
scope_namealone: a scoped transmission with an unknown name hasscope_name = '', and that is NOT "no scope". DIRECT routes are not flood scope and get no marker. Check the actual API response shapes first (AGENTS.md rule 4) for the channel messages API and the packet detail. - DRY. Add one shared helper, for example in
app.jsnext toisPathHashSizeWarn, that decides "unscoped flood" from a route type. Reuse it in both places.
Tests
- Unit tests for the helper: FLOOD, TRANSPORT_FLOOD with a name, TRANSPORT_FLOOD with an empty name, DIRECT, TRANSPORT_DIRECT, missing or invalid values.
- Frontend render tests for the channel meta line and the packet detail row. A mutant that marks TRANSPORT_FLOOD as unscoped must fail.
- An E2E that checks the marker on an unscoped fixture message and its absence on a scoped one.
- WCAG AA contrast in both themes, as feat(ui): warn on 1-byte path hash in channels, packet detail and node badge (#353) #356 measured.
Acceptance criteria
Unscoped channel messages show the compact amber no scope marker and the explanation. Scoped messages are unchanged. No per-message API calls are added.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
test: scope the #353 neutral 2-byte check to the Hash Size element
dborup commentedon Oct 15, 2026
Fixed by #482 (merged as
412f0dbce2d40bc73269f66de1a7ef8a967fd958).Fixed by #482: unscoped channel messages show a compact amber 'no scope' marker with the firmware-based explanation (APPROVE with nits, CI green).