Files
wadamesh/deploy
Michael A. CojocariandClaude Opus 5 45447caa7f touch: hand a contact to the node next to you (#321)
The contact action sheet could message, ping, telemetry, range-test, favorite,
share location, reset path, block and delete — but not hand the contact itself
to anyone. The plumbing was already there and only the companion protocol could
reach it: shareContactZeroHop() has backed CMD_SHARE_CONTACT all along.

So this is a button and a wrapper. uiShareContact() sits next to
uiResetContactPath() and looks the contact up in the live table the same way;
actionSheetShareContactCb mirrors actionSheetResetPathCb exactly — fetch by
index, close the sheet before acting, toast the result. No refreshContactsList():
unlike Reset path and Delete this does not touch the contact table, it only puts
a packet on the air.

Zero-hop, deliberately. Flooding a third party's advert spends the whole mesh's
airtime on a packet nobody asked for, and it re-advertises someone else's node
well beyond the room you are standing in. Zero-hop is what the companion command
already does and keeps the action to "hand this to whoever is next to me". A
flood variant is a different airtime trade-off and does not ride along with this.

Gated on !from_map like Share my loc and Block, so the map-marker sheet stays
compact, and placed after Reset path so Block and the full-width Delete keep the
bottom of the sheet.

grid_items goes 6 -> 7 for the non-from_map case. That is housekeeping, not the
fix — as the #306 note at the bottom of the function says, scrollability is
decided from the height the buttons actually reached, and that is untouched. The
#266 Share my loc row is still missing from the same tally; fixing it here would
widen the diff into behaviour this issue put out of scope.

Three new strings across the thirteen language files (Contact gone already
existed), inserted in sorted position and translated in each file's own style for
its neighbours — Contact added for the success toast, Send failed / Save failed
for the failure one, Share QR / Share channel for the button. i18n_builtin.h is
regenerated, not hand-edited; it costs ~2 KB of .rodata, which the V4 feels most.

Audit clean on all thirteen (1034 -> 1037 keys). T-Deck and Heltec V4 TFT build.
Not yet checked on hardware: a second node in direct range actually adding the
contact, and the smallest panel at the largest UI scale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 15:24:32 -04:00
..

wadamesh.com infrastructure

Distribution stack for wadamesh: a VPS nginx origin behind Cloudflare.

tiles.wadamesh.com     →CF (HTTP, edge-cached) →  nginx → OpenStreetMap / OpenTopoMap
firmware.wadamesh.com  →CF (cache bins)        →  nginx → /srv/wadamesh/firmware
flasher.wadamesh.com   →CF (HTTPS)             →  301 → wadamesh.com
wadamesh.com           →CF (HTTPS)             →  nginx → /srv/wadamesh/site

Map tile styles. The default /{z}/{x}/{y}.jpg route serves OpenStreetMap (the firmware default). An opt-in OpenTopoMap topographic style is served from /opentopo/{z}/{x}/{y}.jpg (explicit OSM alias at /osm/...); the device requests it only when the user enables Map → Options → Topographic map. Legal: OpenTopoMap map tiles are © OpenTopoMap (CC-BY-SA) over © OpenStreetMap contributors (ODbL) + SRTM — the touch UI shows that attribution when topo is active, and the 14-day disk cache keeps each tile hitting OpenTopoMap at most once per fortnight (their tile-usage policy asks for a contactable UA + caching, both of which the transcode service provides). Deploying the topo routes = update tiles.wadamesh.com.conf + tile-transcode.py, then systemctl restart wadamesh-tile-transcode && nginx -t && systemctl reload nginx and purge the Cloudflare cache for tiles.wadamesh.com/opentopo/*.

The firmware fetches tiles + the update-check over plain HTTP (on-device HTTPS isn't viable — mbedTLS needs ~30 KB heap, only ~5 KB is free post-Wi-Fi), so the tile + firmware hosts must stay reachable over HTTP. Cloudflare provides the edge cache, HTTPS for the flasher, and hides the origin IP (so no IP lives in this repo or the firmware).

1. VPS (origin)

sudo apt install nginx
sudo mkdir -p /srv/wadamesh/firmware/releases/TOUCH /var/cache/nginx/wadamesh-tiles
sudo cp deploy/nginx/tiles.wadamesh.com.conf    /etc/nginx/sites-available/
sudo cp deploy/nginx/firmware.wadamesh.com.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/tiles.wadamesh.com.conf    /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/firmware.wadamesh.com.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

2. Cloudflare

  • DNS: A/AAAA records for tiles, firmware, flasher, @ → the VPS IP, all Proxied (orange cloud).
  • SSL/TLS: mode Flexible (CF↔origin HTTP) is enough since the origin is HTTP-only. Do NOT enable "Always Use HTTPS" on tiles. or firmware. — the firmware needs plain HTTP there.
  • Cache Rules:
    • tiles.wadamesh.com/* → Eligible for cache, Edge TTL ~14d.
    • firmware.wadamesh.com/releases/*/*.bin → cache, Edge TTL ~1d.
    • firmware.wadamesh.com/releases/TOUCH (the listing) → short TTL (~60s) or Bypass, so new releases appear promptly.

3. Publishing a release

From a wadamesh checkout (builds both boards, refreshes the listing, rsyncs up):

WADAMESH_VPS=user@your-vps scripts/release.sh beta_2

The on-device check GETs http://firmware.wadamesh.com/releases/TOUCH, finds the highest beta_<N>, and (once OTA-over-Wi-Fi is re-enabled) pulls …/releases/TOUCH/beta_<N>/<board>.bin.

Done

  • Web flasher ✅ — the guided install page at wadamesh.com, served from deploy/site/ and published by scripts/deploy-site.sh (esp-web-tools / Web Serial, per-board install buttons + .bin downloads, manifests generated per release by scripts/build/gen-flasher-meta.py into the /latest/ and /latest-beta/ feeds that release.sh refreshes each publish).
  • flasher.wadamesh.com 301-redirects to the apex (see deploy/nginx/flasher.wadamesh.com.conf) — it is an alias, not its own page.
  • deploy/flasher/ is the original standalone flasher page. No deploy script publishes it — deploy-site.sh ships deploy/site/ only — so it is effectively an offline/local copy kept in parity by hand. Retire it or wire it into a deploy target; until then, treat deploy/site/index.html as the only install page users can reach.

TODO before public launch

  • Re-enable OTA-over-Wi-Fi in the firmware (currently it version-checks then defers to manual flashing).
  • Flip wadamesh repo public = launch.
  • Decide tile-proxy sharing: dedicated tiles.wadamesh.com (this config) vs reusing the meshcomod proxy.

Never commit the VPS IP, SSH keys, or WADAMESH_VPS. Cloudflare fronts the origin; the deploy target is supplied via the environment at publish time.