Files
MeshTerm/meshterm/tools
Jean-Pierre MartineauandClaude Opus 4.8 e07ef3b379 Device state: cache the picker reads that run before each screen
The session cache fixed the reads screens make on open, but opening the
heaviest screens still stalled for seconds — because the pickers and
screen-openers that run *in front of* those screens were still reading the
radio directly. The menu wraps prompt-gathering and execution in one busy
overlay, so a Trace or Chat open pays its picker's slow round-trips before
the (already-cached) screen behind it ever builds, which is why caching the
screens alone showed no improvement.

Route the interactive-open reads through ctx.devstate too:

- Chat's conversation picker read the channel-slot probe *and* the contacts
  table on every open (~5s) — both now come from the cache (channels mapped
  from the cached slots via the new _channels_from_slots, contacts served
  cached). The CLI list/send path keeps reading fresh.
- Trace and TX-optimize target pickers now read contacts from the cache.
- The repeater-admin screen and the channels manager (its slot probe, on a
  local copy so mutations still re-probe the fresh layout after invalidation)
  read through the cache.

Small, session-stable reads (self-info, build_snapshot's tuning/path-hash)
are left as direct reads — they were never the seconds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 22:41:58 -04:00
..