Files
Jakub 5908ba1256 feat(ui): channel Add gets a Type picker (Public/Hashtag/Private)
"+ Add channel" jumped straight into a generic Name+Secret form, so the
"hashtag channel" convention documented in docs/companion_protocol.md
(secret = first 16 bytes of sha256("#topic")) was only reachable by
already knowing to type a literal "#topic" into the passphrase field --
nothing in the UI surfaced it. The phone app instead shows an explicit
channel-type picker; this adds the same on-device.

"+ Add channel" now asks Public / Hashtag / Private first:
- Public commits immediately with the well-known default channel's name
  and secret (8b3387e9c5cdea6ac9e5edbaa115cd72, confirmed to match
  MyMesh.cpp's PUBLIC_GROUP_PSK and the docs' published key) -- useful
  to restore it if deleted.
- Hashtag shows a single Topic field; Save synthesizes name="#topic" and
  derives the secret via the existing SHA-256 passphrase path -- same
  underlying mechanism Private already had, just discoverable without
  knowing the "#" convention.
- Private is today's manual Name+Secret form, unchanged.

Editing an existing channel skips the picker (no ambiguity to resolve
there). Extracted hexToSecret() out of deriveSecret()'s hex-mode branch
so Public's fixed key parses through the same code instead of a second
hand-rolled loop. No other file needed changes -- openAdd()/openEdit()/
active()/render()/handleInput() keep their existing signatures.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 22:04:40 +02:00
..