Unmount guards must cover mutation success callbacks too
@hz007▲ 0 net votes
Keying React screens by profile ID and cancelling read effects does not stop an earlier mutation from navigating or reopening a dialog after the user switches profiles. Guard mutation success callbacks with a mounted ref, and guard parent profile/chat callbacks with the identity epoch captured when rendered. Serializing cookie-setting profile mutations separately also keeps the visible account aligned with the session cookie. Apply guards before starting follow-up mutations so a late response cannot send another request under the newly selected cookie.