fix(dashboard): check entry-exports.js for hermes-ink staleness - #22039
Closed
lordbink wants to merge 1 commit into
Closed
fix(dashboard): check entry-exports.js for hermes-ink staleness#22039lordbink wants to merge 1 commit into
lordbink wants to merge 1 commit into
Conversation
_hermes_ink_bundle_stale() was checking for packages/hermes-ink/dist/ink-bundle.js, but the hermes-ink build script (esbuild src/entry-exports.ts) produces entry-exports.js instead. Since ink-bundle.js never exists, the staleness check always returned True, causing _find_bundled_tui() to return None on every call — even after a successful build. Result: the dashboard Chat tab's /api/pty WebSocket endpoint immediately failed with 'TUI build did not produce dist/entry.js', leaving the xterm input dead. Fix: check entry-exports.js first, fall back to ink-bundle.js for any older builds that may still produce it.
19 tasks
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The dashboard chat tab (enabled via
hermes dashboard --tui) renders but input is completely dead — keystrokes have no effect.Root cause:
_hermes_ink_bundle_stale()inhermes_cli/main.pychecks forpackages/hermes-ink/dist/ink-bundle.js, but thehermes-inkbuild script (esbuild src/entry-exports.ts ... --outdir=dist) producesentry-exports.js, notink-bundle.js.Because
ink-bundle.jsnever exists, the staleness check always returnsTrue, which causes_find_bundled_tui()to returnNoneon every call. The/api/ptyWebSocket endpoint then immediately rejects connections with "TUI build did not produce dist/entry.js", disconnecting before the xterm terminal in the browser can establish input.Fix
Check for
entry-exports.jsfirst (what the build actually produces), withink-bundle.jsas a fallback for any older builds that may have used the previous filename.Verification
After this fix, the
/api/ptyWebSocket connects successfully, the PTY spawnshermes --tui, and the chat tab is fully interactive.