Skip to content

fix(desktop): keep composer usable during reconnect - #45488

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-33e48346
Jun 13, 2026
Merged

fix(desktop): keep composer usable during reconnect#45488
teknium1 merged 2 commits into
mainfrom
hermes/hermes-33e48346

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Desktop reconnects no longer make the chat composer unusable: after a healthy boot, socket drops keep the textbox editable for drafting while submit/backend actions wait for the gateway to return.

Changes

  • ChatBar: separates input editability from gateway-submit availability during closed/error reconnect states.
  • GatewayConnectingOverlay: limits the full-screen CONNECTING overlay to initial boot, so post-boot reconnects do not block chat/settings.
  • Tests: covers editable reconnect drafts and post-boot socket drops staying out of the modal overlay.

Validation

Check Result
npx vitest run --environment jsdom src/components/gateway-connecting-overlay.test.tsx src/app/chat/composer/enter-submit-dom-race.test.tsx 2 files / 8 tests passed
npx tsc --noEmit -p tsconfig.json passed
npx eslint ... --quiet passed

Infographic

Desktop reconnect drafting

teknium1 added 2 commits June 12, 2026 17:23
Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-33e48346 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10888 on HEAD, 10887 on base (🆕 +1)

🆕 New issues (1):

Rule Count
unresolved-import 1
First entries
tests/hermes_cli/test_safe_mode.py:17: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`

✅ Fixed issues: none

Unchanged: 5708 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@teknium1
teknium1 merged commit 8cf9d86 into main Jun 13, 2026
29 checks passed
@teknium1
teknium1 deleted the hermes/hermes-33e48346 branch June 13, 2026 09:36

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Overview

Keeps the desktop composer textbox editable during gateway reconnect (state: closed/error), while still blocking submit/backend actions until the gateway is open again. This prevents flaky networks from blocking draft composition.

Changes

  • Introduces reconnecting = gatewayState === 'closed' || gatewayState === 'error' and inputDisabled = disabled && !reconnecting in ChatBar
  • contentEditable is now !inputDisabled (editable during reconnect, blocked during cold start)
  • submitDraft() and drain logic check disabled directly to block submits during reconnect
  • Updates test harness to cover the disabled-during-reconnect scenario

Assessment

  • Correctness: The separation of reconnecting vs cold-start disabled is well-thought-out. The textbox stays contentEditable but submits are gated. The aria-disabled attribute is also set appropriately.
  • Testing: New test case added covering the exact scenario (draft editable, submit blocked during reconnect).
  • No security, performance, or documentation concerns.

Reviewed by Hermes Agent

teknium1 added a commit that referenced this pull request Jun 13, 2026
Since safe mode already landed on main via #45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
AIalliAI pushed a commit to AIalliAI/Hermes that referenced this pull request Jun 14, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
T02200059 pushed a commit to T02200059/hermes-agent that referenced this pull request Jun 18, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
teknium1 added a commit that referenced this pull request Jul 7, 2026
Since safe mode already landed on main via #45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
teknium1 added a commit that referenced this pull request Jul 7, 2026
Since safe mode already landed on main via #45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
Since safe mode already landed on main via NousResearch#45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
donbowman pushed a commit to donbowman/hermes-agent that referenced this pull request Jul 13, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
justemu pushed a commit to justemu/hermes-agent that referenced this pull request Jul 18, 2026
Since safe mode already landed on main via NousResearch#45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
Since safe mode already landed on main via NousResearch#45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
* feat(cli): add --safe-mode troubleshooting flag

Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all
customizations disabled to isolate setup problems from product bugs.

--safe-mode implies --ignore-user-config and --ignore-rules, and
additionally skips plugin discovery (hermes_cli/plugins.py) and MCP
server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE
env bridge.

* fix(desktop): keep composer usable during reconnect
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
Since safe mode already landed on main via NousResearch#45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
Since safe mode already landed on main via NousResearch#45488, reduce this branch to cleanup: centralize env setup, remove duplicated comments, and tighten tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants