fix(desktop): Bots home no longer flashes over the chat during bot switches (salvage #95917) - #96648
Merged
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on 5367549 — fix(desktop): prevent Bots home flash during chat switch
|
This was referenced Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switching bots no longer flashes the Bots home workspace in front of the current chat while the destination bot's canonical chat is still opening. Root cause: passive workspace reconciliation could open Bots home in the pre-open handoff window a bot switch left unguarded (the remaining gap after #92901).
Salvage of #95917 by @helix4u, authorship preserved via cherry-pick.
Changes
apps/desktop/src/plugins/hermes-bots/plugin.js: a bot switch owns the handoff from source preparation until the destination chat succeeds, fails, or is canceled; the guard is generation-scoped so a stale async completion cannot clear a newer switch, and choosing a group or leaving Bot Mode cancels it immediately.apps/desktop/src/plugins/hermes-bots/tests/bots-home.test.mjs: 3 new tests (guard blocks reconciliation, generation scoping, cancel on group/mode exit).Validation
node --test bots-home.test.mjsInfographic