fix(tui): update _hermes_ink_bundle_stale to check for entry-exports.js - #21630
Closed
fiikf wants to merge 1 commit into
Closed
fix(tui): update _hermes_ink_bundle_stale to check for entry-exports.js#21630fiikf wants to merge 1 commit into
fiikf wants to merge 1 commit into
Conversation
Collaborator
Commit 2d3d1d9 changed the hermes-ink build script from --outfile=dist/ink-bundle.js to --outdir=dist (producing dist/entry-exports.js), but _hermes_ink_bundle_stale was never updated to match. This caused _tui_build_needed to always return True, triggering a 20+ second npm run build on every /api/pty WebSocket connection, which blocked the asyncio event loop and caused the WebSocket handshake to time out (HTTP 502 via nginx). Fixes: the dashboard 'Chat' tab being permanently broken after any restart. See: commit 2d3d1d9 ("fix(tui): use --outdir instead of --outfile") See: PR NousResearch#15351 which originally added the stale check
fiikf
force-pushed
the
fix/ink-bundle-stale-check
branch
from
May 8, 2026 02:29
54731cf to
0d7b36e
Compare
Author
|
Closing as duplicate. Superseded by #20686 which includes the same ink-bundle → entry-exports fix plus auto-resume functionality. |
This was referenced May 8, 2026
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.
Bug Description
The dashboard "Chat" tab is permanently broken after any server restart.
/api/ptyWebSocket connections hang and eventually return HTTP 502 via nginx (upstream prematurely closed connection).Root Cause
Commit
2d3d1d973changed the@hermes/inkbuild script from--outfile=dist/ink-bundle.jsto--outdir=dist(producingdist/entry-exports.js), but_hermes_ink_bundle_stale()was never updated to match. It continues to check for the old filenamedist/ink-bundle.js, which never exists.This causes
_tui_build_needed()to always returnTrue, triggering a synchronousnpm run build(~21 seconds) on every/api/ptyWebSocket connection. Thesubprocess.run()call blocks the asyncio event loop, preventing the WebSocket 101 handshake from being flushed to the client, resulting in a timeout.Fix
One-line change in
hermes_cli/main.py:975:Also updates the test helper
_touch_ink_bundleintests/hermes_cli/test_tui_npm_install.pyto use the correct filename.How to Verify
ui-tui/packages/hermes-ink/dist/entry-exports.jsexists and is up-to-date_tui_build_needed()returnsFalseonce the bundle is present:Test Plan
test_tui_npm_install.pypass/api/ptyWebSocket connects in <1s (was timing out at 5s)Risk Assessment
Low — single-line string change matching the actual esbuild output filename. Both filenames refer to the same bundled artifact; the check logic is unchanged.