fix(android): key sheet presentation state - #43
Conversation
Give each stable sheet identity independent presentation state so replacing a sheet cannot reuse dismissal state from its predecessor.
|
Adversarially reviewed and device-verified against a mob tree including #114. Approve — merging now, independent of #114's revision. The review proved the dependency is SOFT: the template consumes only opaque positive handle ints, both mismatched pairings behave sanely (this template + current mob = the keying fix fully works, with only the narrower status-quo-ante dismiss race remaining; old template + future mob = fine), so there is no release-ordering hazard. Note #114 itself went back for revision (it breaks the lazy-list handle-stability contract this same bridge documents at MobBridge.kt.eex:295-302 — worth folding a stable-:id keying for lazyListStates into your next revision here or a companion PR, since the two PRs currently disagree about what the handle contract is). Evidence highlights: master-baseline reproduction of the inherited-state bug first (sheet B never presents after A's drag-dismiss on 0.4.28); on this branch all five scenarios pass on the emulator — fresh present + exactly-once across ids, replacement isolation with zero spurious predecessor dismissals, sheet stable through 20 re-renders (frame-hash: zero motion), no-id/integer-id/ABA forms as documented, drag+scrim each exactly-once; 7/7 instrumentation tests ran on-device; 348 mix tests and all static gates clean; canonicalization verified injective across JSON id forms including falsy ('' , 0, false, null all distinct from absent). Suggestions carried forward: the 'stable node identity' wording slightly overstates (it's slot+id — a tree-position move still resets, same as before); iOS parity gap filed as mob#115; ghost refutations in project_generator_test.exs:900-901 worth a cleanup comment. Changelog lands with the release bump. |
Summary
This prevents a replacement sheet from inheriting hidden or already-dismissed state from its predecessor.
Depends on GenericJam/mob#114 for stale native event-handle rejection.
Testing