fix(android): preserve list state identity - #44
Conversation
Key generated lazy-list state by canonical node identity or event slot. Reject negative sentinel handles to avoid slot collisions.
|
Reviewed in lockstep with mob #114's revision on a physical Moto (generated probe from this branch, 8/8 instrumented tests on device incl. the new list-identity test). Approve — merging and releasing. F1 verified fixed with the exact prior repro: id-keyed list retains {0,40} across 20 re-renders (was reset after one), slot-fallback list retains 56-63, two lists on one screen don't cross-contaminate, negative sentinel maps to null key (never SlotKey(255)), no per-frame map growth (Dalvik plateau flat under sustained 25ms re-render load), nav-clear intact. Version skew both ways is sane: this template + mob 0.7.37 degrades to exactly the old slot behavior; the mandatory-lockstep direction is old-template + new-mob, which is mob's changelog's problem and it says so. Two notes for follow-up: (1) Mob's high-level :list DSL drops :id when lowering to lazy_list (lib/mob/list.ex:119), so real apps on :list take the slot-fallback path — proven solid, but the canonical-id path deserves a doc line and the DSL an :id passthrough (filing upstream); (2) the changelog entry dropped the blank line before [0.4.28] — fixed at release. |
Summary
Companion to GenericJam/mob#114.
Testing