Root cause of the beta_31 periodic 1-2s freezes with Wi-Fi on: every
received mesh packet pushes an RX-log frame to all connected TCP/WS
companion clients from the loop thread, and writeAllBytes called
WiFiClient::write() unguarded — against a stale peer (phone asleep,
half-open socket) that blocks in the framework's 1s select() retries.
The 120ms app timeout only bounded attempts, not the first call.
- TCP+WS servers: probe writability (zero-timeout select on the client
fd) before every write; lwIP reports writable only with ~2.8KB free,
a whole frame is ~180B, so probed writes complete instantly.
- Reap clients whose writes fail continuously for 10s (half-open
sockets previously stayed "connected" forever, eating the write
budget on every pushed frame).
- Chat-history ring: chunked writer + wider flush spacing (same
treatment saveContacts got in beta_30).
- Stall tracer: 16-entry ring of >=0.2s loop stalls, shown in About.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Take ownership of the 26 files moved out of the core during the fork-minimize:
touch HW drivers (helpers/input/*), touch prefs/SD helpers + companion transport
servers + HTTP-OTA helpers (helpers/esp32/*, helpers/*Ota*.h), LVGL PSRAM
allocator, and touch diag. Three transport headers switched to lib-style
<helpers/...> includes for the new layout. platformio.ini builds them
(helpers/** filters + -I src) and pins MeshCore @ v1.16.0-wada.1 (the slimmed
fork). Both boards build green + size-identical from the published tag.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Kaj Schittecat <kaj@schittecat.com>