Description
In Hermes Desktop (Windows 10, build from 2026-07-12, version files 0.18.2), when opening a new chat (or switching sessions) and sending the first message:
- The message text from the previous chat remains visible in the composer input field.
- Pressing Enter the first time does nothing — the message stays in the input and is not sent.
- Pressing Enter a second time sends the message and clears the input; after that the chat works normally.
Reproduces 100% of the time on the first message of every new session.
Root cause (from logs + bundle analysis)
desktop.log contains:
[hermes] [renderer console] Uncaught Error: Composer is not available
(file:///.../win-unpacked/resources/app.asar/dist/assets/index-BK_BHFlU.js:4103)
In the renderer bundle, the composer wrapper classes (rCi/iCi thread-composer, aCi edit-composer) throw Composer is not available when _composerApi.getState() returns null. The send()/setText()/reset() methods all guard with if(!t)throw Error("Composer is not available"). On a fresh session the composer API state is null at the moment of the first Enter, so the send is dropped; by the second Enter the composer has mounted and getState() is non-null, so it works. This is a session-switch / mount-timing race in the Desktop UI layer (similar class to issue #46563).
Steps to reproduce
- Open Hermes Desktop.
- Start a new chat (or switch to a different session).
- Type a message and press Enter once.
- Observe: message is not sent, text remains in input.
- Press Enter again -> message sends and input clears.
Expected
First Enter sends the message and clears the input; the input should not retain text from a previous session when a new session is opened.
Environment
- OS: Windows 10
- Hermes: 0.18.2 (version files consistent)
- Desktop build: win-unpacked,
resources/app.asar/dist/assets/index-BK_BHFlU.js
- Already tried: clearing
%APPDATA%\Hermes\Local Storage\leveldb (composer-drafts cache) — did NOT fix it, confirming it is a runtime mount-timing bug, not stale cache.
Possible fix direction
Make the composer wrapper resilient to null state: queue send()/setText() and flush once _composerApi.getState() becomes available, instead of throwing Composer is not available.
Description
In Hermes Desktop (Windows 10, build from 2026-07-12, version files 0.18.2), when opening a new chat (or switching sessions) and sending the first message:
Reproduces 100% of the time on the first message of every new session.
Root cause (from logs + bundle analysis)
desktop.logcontains:In the renderer bundle, the composer wrapper classes (
rCi/iCithread-composer,aCiedit-composer) throwComposer is not availablewhen_composerApi.getState()returnsnull. Thesend()/setText()/reset()methods all guard withif(!t)throw Error("Composer is not available"). On a fresh session the composer API state isnullat the moment of the first Enter, so the send is dropped; by the second Enter the composer has mounted andgetState()is non-null, so it works. This is a session-switch / mount-timing race in the Desktop UI layer (similar class to issue #46563).Steps to reproduce
Expected
First Enter sends the message and clears the input; the input should not retain text from a previous session when a new session is opened.
Environment
resources/app.asar/dist/assets/index-BK_BHFlU.js%APPDATA%\Hermes\Local Storage\leveldb(composer-drafts cache) — did NOT fix it, confirming it is a runtime mount-timing bug, not stale cache.Possible fix direction
Make the composer wrapper resilient to
nullstate: queuesend()/setText()and flush once_composerApi.getState()becomes available, instead of throwingComposer is not available.