From dbca7a4f028ed185fdab9ba193ded0dc7e0262ba Mon Sep 17 00:00:00 2001 From: Thomas Bekkers Date: Wed, 26 Aug 2026 20:39:37 -0400 Subject: [PATCH] fix(hermes-bots): keep the Cronjobs tile registered while it holds focus in Bot Mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking the Cronjobs tile shifts focus onto the tile itself, momentarily dropping bot-chat workspace ownership — syncRoutinesPane then unregistered the pane out from under the user's own click, with no way back. Keep the tile while Bot Mode is on screen and the tile is the focused surface; leaving Bot Mode still unregisters as designed. Live-verified. --- apps/desktop/src/plugins/hermes-bots/plugin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/desktop/src/plugins/hermes-bots/plugin.js b/apps/desktop/src/plugins/hermes-bots/plugin.js index 39271541ea..0dab6d76b7 100644 --- a/apps/desktop/src/plugins/hermes-bots/plugin.js +++ b/apps/desktop/src/plugins/hermes-bots/plugin.js @@ -15924,6 +15924,13 @@ export default { if (botChatOwnsWorkspace()) { unregisterRoutines ??= registerRoutinesPane() } else if (unregisterRoutines) { + // Clicking the Cronjobs tile moves focus onto the tile itself, which + // drops bot-chat workspace ownership for a beat. While Bot Mode is + // still on screen and the tile is the one holding focus, keep it — + // a pane must never unregister itself out from under its own click. + // Leaving Bot Mode ($botsPaneVisible false) still unregisters. + const $self = host.paneVisibility(`${ID}:routines`) + if ($botsPaneVisible.get() && $self && typeof $self.get === 'function' && $self.get()) return unregisterRoutines() unregisterRoutines = null }