Three ways the shared-key screen could lose the ceremony it was showing, and
so offer to start one:
- initiate() ran again whenever the screen came back into view, resetting
the state to no ceremony and stacking another set of watchers. It now runs
once per view model.
- five coroutines each read the state, changed one field and wrote it back,
one of them across a suspending query, so an old copy could overwrite a
newer one. The state is now built by one flow and written in one place.
- an approval closed its screen as the button was pressed, cancelling the
view model's scope and with it a publish still in flight. The screen now
closes once the approval has gone out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>