Skip to content

fix(tui): correct hermes-ink bundle filename in staleness check#20951

Closed
AKC777 wants to merge 1 commit into
NousResearch:mainfrom
AKC777:fix/tui-ink-bundle-filename
Closed

fix(tui): correct hermes-ink bundle filename in staleness check#20951
AKC777 wants to merge 1 commit into
NousResearch:mainfrom
AKC777:fix/tui-ink-bundle-filename

Conversation

@AKC777

@AKC777 AKC777 commented May 7, 2026

Copy link
Copy Markdown

Summary

_hermes_ink_bundle_stale() checks for packages/hermes-ink/dist/ink-bundle.js, but the hermes-ink build script (esbuild) outputs dist/entry-exports.js. Since the expected file never exists, _tui_build_needed() always returns True, triggering a full npm run build on every dashboard chat WebSocket connection (~15 seconds of blocking I/O).

This causes the Chat tab in hermes dashboard --tui to time out and show [session ended] immediately.

Fix

Update the expected filename from ink-bundle.js to entry-exports.js to match what esbuild actually produces.

Reproduction

  1. Start hermes dashboard --host 0.0.0.0 --port 9119 --tui --insecure
  2. Open the Chat tab in the browser
  3. Observe [session ended] immediately — the WS handler blocks for ~15s on npm run build

Test Plan

  • Chat tab loads and renders the TUI prompt within ~1 second
  • _hermes_ink_bundle_stale() returns False when entry-exports.js is up-to-date
  • _make_tui_argv() completes in <1 second when no rebuild is needed

_hermes_ink_bundle_stale() checks for ink-bundle.js but esbuild outputs
entry-exports.js. Since the expected file never exists, _tui_build_needed()
always returns True, triggering a full npm run build (~15s) on every
dashboard chat WebSocket connection. This causes the Chat tab to show
[session ended] due to client timeout.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels May 7, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #20322 (identical one-line fix: ink-bundle.js → entry-exports.js). Also a subset of #20686 which fixes the same filename issue and adds auto-resume on /chat reconnect.

@teknium1

Copy link
Copy Markdown
Contributor

Closing as stale — the code path this addresses no longer exists on main.

Triage notes (high confidence):
Function _hermes_ink_bundle_stale and _tui_build_needed no longer exist on origin/main hermes_cli/main.py (only _tui_need_rebuild at line 1209 remains); the code path the PR patches has been refactored away — main already references entry-exports.js at hermes_cli/main.py:1375.

If this PR's intent is still relevant against the current code, please rebase or open a fresh PR.

(Bulk-closed during a CLI PR triage sweep.)

@teknium1 teknium1 closed this May 24, 2026
@AKC777 AKC777 deleted the fix/tui-ink-bundle-filename branch May 24, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants