Group AppContext fields into cohesive sub-structs (S1820)
Reorganize the AppContext shared-context struct from ~29 flat data members into 13:
keep the 7 injected hardware references and the appState/prevState FSM cursor at top
level, and group the session/config state into four cohesive nested sub-structs —
display (activity + dim/off timing), vault (masterKey / unlock / autolock /
bleCredential), menu (credential + TOTP lists + selection), and boot (bootCount /
rtcAvailable). Re-path every ctx access across main.cpp, the state handlers, the
extracted controllers/views, and the debug console accordingly.
Pure data reorganization, behavior-preserving: no logic, timing, or FSM change; the
security-critical goToSleep wipe (secureWipe masterKey -> bleCredential.wipe ->
vaultUnlocked=false -> credListLoaded=false) is byte-identical, only re-pathed. Drops
AppContext under the Sonar S1820 (<20 fields) threshold.
Verified: native 1168/1168, pio check clean, guards, full fleet -Werror (9 variants +
debug).
Claude-Session: https://claude.ai/code/session_01Y7Cy1HetRp6TZAUAeekN8X