fix(tui): correct ink bundle filename in staleness check - #23319
Closed
praveen-ks-2001 wants to merge 1 commit into
Closed
fix(tui): correct ink bundle filename in staleness check#23319praveen-ks-2001 wants to merge 1 commit into
praveen-ks-2001 wants to merge 1 commit into
Conversation
Collaborator
Contributor
|
Automated hermes-sweeper review: this PR's fix is now obsolete on current Evidence:
Thanks for the focused bug report and minimal fix — it matched a real issue in the old launcher, but current |
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.
What does this PR do?
_hermes_ink_bundle_stale()inhermes_cli/main.pychecks forpackages/hermes-ink/dist/ink-bundle.jsto decide whether the @hermes/ink bundle needs rebuilding. Since v0.13.0, the build output isdist/entry-exports.jsinstead. The check now always returnsTrue, which makes_tui_build_needed()always returnTrue, which makes_make_tui_argv()run a fullnpm run buildsynchronously every timehermes --tuior the dashboard's embedded chat (hermes dashboard --tui->/api/pty) starts.For the standalone CLI the impact is mild, extra
npm run buildruns, completes quickly because nothing actually changed. For the dashboard's embedded Chat tab the impact is severe: the rebuild runs synchronously inside the asyncio event loop in the/api/ptyWebSocket handler for 30–60+ seconds. The dashboard becomes unresponsive, the browser typically times out the WebSocket, andChatPage.tsxfalls through to its[session ended]fallback.Why this slipped: between v0.12.0 and v0.13.0,
ui-tui/packages/hermes-ink/package.jsonchanged its build script from--outfile=dist/ink-bundle.jsto--outdir=dist, andindex.jswas updated toexport * from './dist/entry-exports.js'. The staleness check inhermes_cli/main.pywas missed.Fixing the path string is the minimal change; matches what the build now produces and what the wrapper imports.
Related Issue
No existing issue filed, discovered during a downstream version bump (chat works on v2026.4.30, breaks on v2026.5.7 with no other changes).
Fixes #
Type of Change
Changes Made
hermes_cli/main.py:974-> update_hermes_ink_bundle_stale()to look fordist/entry-exports.jsinstead ofdist/ink-bundle.jstests/hermes_cli/test_tui_npm_install.py:29-> update_touch_ink_bundle()test helper to use the same filename so existing tests stay aligned with the actual build outputHow to Test
True(staleness check misfires).False(correct).hermes dashboard --tui, open/chat. Without the PR: 30–60s stall before the TUI appears, or[session ended]if the WS times out. With the PR: TUI loads instantly.Checklist
Code
fix(tui): correct ink bundle filename in staleness check)pytest tests/ -qand all tests passtests/hermes_cli/test_tui_npm_install.pycontinue to pass; the helper rename keeps them aligned with the new filename. Did not add a new dedicated regression test for the renamed-output case — happy to add one if reviewers prefer.Documentation & Housekeeping
cli-config.yaml.examplekeys touchedpathlib.Pathfilename change with no platform-specific semantics; behaves identically on Linux/macOS/WindowsScreenshots / Logs
Reproduction (browser console + dashboard log) on v2026.5.7 before this PR:
WebSocket closed; [session ended]rendered byChatPage.tsxxterm.js fallback._make_tui_argv()enterssubprocess.run([npm, "run", "build"], ...); the dashboard event loop blocks until npm completes (~30–60s), at which point the WS is already closed by the browser.After this PR:
/chatopens the TUI directly with no rebuild step — same fast-path behavior as v0.12.0 / v2026.4.30.