Phase 7 of docs/multiple-profiles.md. Small, because the forget sequence was
built right.
Sign out of a read-only identity and "forget this key" for a bare key both
run ForgetIdentity and then the tail -- re-list, clear the default since
Phase 3, show the selector with what remains or Landing if nothing does --
and that is the right behaviour with several profiles as well; nothing in
the sequence changes. A profile with a wallet attached answers
WalletAttached from Phase 1 and is offered neither exit: its sign-out row
stays the pending route, for the reason both sign-in plans gave, and it is
now also the only way such a profile can leave, since the repair would
write its credential back. What changes is that the user is no longer stuck
behind it -- "switch profile" is the row above.
The not-found screen learns about the others. It offers "try again" and,
for a read-only identity, "use a different key", which forgets it; with
another profile on the device it now offers "switch profile" as well, for
every kind, pushing the switcher -- which has a back button, so the screen
is still there if the user changes their mind. The identity that was not
found stays listed; forgetting it remains a separate decision. The nav host
passes the callback only when the listing holds more than one.
Tests: ReadOnlyEntrancesJvmTest -- with another profile on the device the
not-found state offers the switch beside the read-only exit and it calls
through once; a signing identity that was not found gets it above the
set-up form; with one profile there is nothing to switch to.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pulled-From: curated/curated@9bb340042d