fix(bot-mode): first click on a bot opens its chat — no more landing-page bounce - #92901
Merged
Merged
Conversation
…er bounces over it The Bots home landing appeared on EVERY first click of a bot whose canonical Bot Chat had been compressed; only a second click got through. openRosterBot claimed the center with the durable registry id, but the session-focus edge fired by the open itself reports the compression- lineage TIP. releaseStaleOpenBotChat compared tip !== registry id, declared the claim stale, released it, and the home reasserted over the freshly opened chat. The second click worked only because the tip was already focused — no new focus edge fired to sabotage it. openBotCanonicalChat now returns both identities (registryId + openedId); the claim carries both; a focus edge matching EITHER keeps it. Foreign sessions still release, and the legacy no-id draft claim is unchanged.
Contributor
૮ >ﻌ< ა ci reviewran on fa65e56 — fix(bot-mode): first click on a bot opens its chat — the hom
|
13 tasks
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
Clicking a bot now opens its chat on the first click — the Bots home landing no longer bounces over it.
Root cause:
openRosterBotclaimed the center with the durable registry id, but the session-focus edge fired by the open itself reports the compression-lineage TIP;releaseStaleOpenBotChatcompared tip ≠ registry id, declared the fresh claim stale, released it, and the home reasserted over the just-opened chat. Every bot with a compressed canonical Bot Chat hit it; a second click "worked" only because the tip was already focused so no new focus edge fired.Changes
plugin.js:openBotCanonicalChatreturns both identities (registryId+openedId); the$openBotChatclaim carries both;releaseStaleOpenBotChatkeeps the claim when the focused id matches EITHER. Foreign sessions still release; the legacy no-id draft claim is unchanged.tests/bot-open-focus-identity.test.mjs(new): executable release-logic test (tip focus keeps the claim, registry focus keeps it, foreign session releases, legacy draft releases) — sabotage-verified: fails 3/3 without the fix.tests/canonical-chat-registry.test.mjs,tests/remote-routing-races.test.mjs: updated to the two-identity return contract (5 pinning tests).Validation
Reported live by Teknium (image14 repro: every bot's first click showed the landing). The landing itself ships unchanged — it remains the outage/retry and no-selection surface from #91134.
Infographic