You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warn on 1-byte path hash: channel 'Sent with' badge, packet detail and node badge (recommend 2/3-byte) #353
Channel messages show a "Sent with: N-byte" badge (renderSenderPathHashBadge() in public/channels.js, added in #212). The operator wants senders to use a 2- or 3-byte path hash. A 1-byte hash collides often across nodes, so it should read as a warning.
Proposal
For size 1, render a warning variant of the badge. Sizes 2 and 3 stay unchanged and neutral.
Add a modifier class .ch-path-hash-badge--warn.
Colour the text with a new CSS variable --path-hash-warn, defaulting to var(--danger). That variable is already themed for light and dark. Map it in the customizer (THEME_CSS_MAP). No hardcoded colours.
Do not rely on colour alone. Add a small Phosphor warning icon (aria-hidden), plus text for screen readers.
Tooltip: explain the collision risk and recommend 2- or 3-byte. Take the name of the companion setting from the MeshCore firmware/docs (firmware/), not from guesswork.
Hardcode the threshold ("1 = warning") for now. A customizer option for the recommended minimum can come later (AGENTS.md rule 8).
Also in scope (operator decision 2026-10-07)
Apply the same warning, with the same variable, icon and tooltip, wherever a 1-byte path hash is shown:
Packet detail: the "HASH SIZE" row when it is 1 byte (public/packets.js).
Node detail: today the "Multibyte" badge appears only for 2- and 3-byte (renderNodeBadges, public/nodes.js ~335). Add a small warning badge when the node advertises a 1-byte hash, with the same wording.
Reuse one shared helper for "is this size a warning" and the badge markup. Do not add one copy per page (DRY).
Acceptance
Unit tests:
1-byte gets the warn class, the icon and the tooltip;
2- and 3-byte get no warn class;
invalid or missing sizes render no badge, as today.
Kill a mutant, e.g. a warn class on 2-byte.
The same tests for the packet detail row and the node badge.
Browser check of channels, packet detail and node detail in light and dark theme and on mobile. XSS gate clean.
changed the title [-]Channels: show the 'Sent with: 1-byte' path-hash badge as a warning (recommend 2/3-byte)[/-][+]Warn on 1-byte path hash: channel 'Sent with' badge, packet detail and node badge (recommend 2/3-byte)[/+]on Oct 7, 2026
Operator decision (2026-10-07): show 1-byte as a recommendation, not an error. Use an amber/warning tone (--path-hash-warn defaults to the warning palette instead of --danger), with wording like "Recommended: 2- or 3-byte path hash". Apply this everywhere a 1-byte hash is flagged. Reason: 1-byte is the firmware default and the MeshCore FAQ still recommends it for companions.
Activity
[-]Channels: show the 'Sent with: 1-byte' path-hash badge as a warning (recommend 2/3-byte)[/-][+]Warn on 1-byte path hash: channel 'Sent with' badge, packet detail and node badge (recommend 2/3-byte)[/+]fix(lint): declare the #353 path-hash helpers as eslint globals
dborup commentedon Oct 7, 2026
Operator decision (2026-10-07): show 1-byte as a recommendation, not an error. Use an amber/warning tone (
--path-hash-warndefaults to the warning palette instead of--danger), with wording like "Recommended: 2- or 3-byte path hash". Apply this everywhere a 1-byte hash is flagged. Reason: 1-byte is the firmware default and the MeshCore FAQ still recommends it for companions.test(ui): reproduce low warn contrast and an empty Hash Size row (#353)
test(ui): let the #353 axe contrast check wait for fade-ins (#353)
fix(ui): AA contrast for the 1-byte path hash warning; no empty row (#…
test(ui): cover the manual dark toggle on a light OS in the #353 E2E (#…
reviewfix(ui): 1-byte path hash is an amber recommendation, not a red…
Merge round-3 branch work; resolve to the operator's amber recommenda…
Merge pull request #356 from dborup/codex/issue-353-path-hash-1byte-warn
dborup commentedon Oct 8, 2026
Fixed by #356 (merged as
8ef59f2f91ad74e7ef9919d7cf7cac7c3d264ee6).