Skip to content

fix(bot-mode): first click on a bot opens its chat — no more landing-page bounce - #92901

Merged
teknium1 merged 1 commit into
mainfrom
fix/bot-open-focus-identity
Aug 23, 2026
Merged

teknium1 merged 1 commit into
mainfrom
fix/bot-open-focus-identity

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

Summary

Clicking a bot now opens its chat on the first click — the Bots home landing no longer bounces over it.
Root cause: 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 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: openBotCanonicalChat returns both identities (registryId + openedId); the $openBotChat claim carries both; releaseStaleOpenBotChat keeps 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

Before After
First click, compressed Bot Chat Bots home landing, second click needed chat opens
Bots home interstitial on every first click outage/empty states only
Plugin suite 470/475 (5 pinned the scalar return) 475/475

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

One click opens the chat

…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.
@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on fa65e56 — fix(bot-mode): first click on a bot opens its chat — the hom

⚠️ Warnings

OSV vulnerability scan · View job

7 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 1m49s vs 2m34s (-29.2%). 1 job(s) slower, 3 faster, 2 unchanged.

  • OSV scan / Scan lockfiles / osv-scan: -4.0s
  • JS & TS checks / JS & TS checks: +3.0s
  • OSV scan / Emit review status: -1.0s
  • Check no committed infographics / check-no-committed-infographics: -1.0s

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) area/sessions Session lifecycle, resume, persistence, history sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Aug 23, 2026
@teknium1
teknium1 merged commit a4c6c6b into main Aug 23, 2026
32 checks passed
@teknium1
teknium1 deleted the fix/bot-open-focus-identity branch August 23, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants