fix(tui): rebuild when ink bundle is missing#15351
Merged
OutThisLife merged 1 commit intoApr 25, 2026
Merged
Conversation
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…ssing-ink-bundle fix(tui): rebuild when ink bundle is missing
19 tasks
fiikf
added a commit
to fiikf/hermes-agent
that referenced
this pull request
May 8, 2026
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
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…ssing-ink-bundle fix(tui): rebuild when ink bundle is missing
dannyJ848
pushed a commit
to dannyJ848/hermes-agent
that referenced
this pull request
May 17, 2026
…ssing-ink-bundle fix(tui): rebuild when ink bundle is missing
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ssing-ink-bundle fix(tui): rebuild when ink bundle is missing
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…ssing-ink-bundle fix(tui): rebuild when ink bundle is missing
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?
Repairs a TUI first-launch/update failure where
hermes --tuicould crash after a partial npm install/build.The TUI imports the local workspace package
@hermes/ink, whoseindex.jsre-exportspackages/hermes-ink/dist/ink-bundle.js. If a network failure interrupts setup afternode_modules/@hermes/ink/package.jsonexists but before the bundle is built, the production launch path can think dependencies are installed and the main TUI bundle is current, then crash with:Cannot find module '.../ui-tui/node_modules/@hermes/ink/dist/ink-bundle.js'The normal production build script already rebuilds
@hermes/ink; the missing piece was detecting that the local Ink bundle was absent/stale before deciding whether the TUI build is needed.Related Issue
Fixes #
Type of Change
Changes Made
hermes_cli/main.py: makes_tui_build_needed()return true whenpackages/hermes-ink/dist/ink-bundle.jsis missing or stale.tests/hermes_cli/test_tui_npm_install.py: adds regression coverage for the partial-install state where@hermes/inkappears installed but its bundle is missing.How to Test
ui-tui/packages/hermes-ink/dist/ink-bundle.jswhile keepingui-tui/dist/entry.jsandui-tui/node_modules/@hermes/ink/package.json.hermes --tui.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
python -m py_compile hermes_cli/main.py→ passed./scripts/run_tests.sh tests/hermes_cli/test_tui_npm_install.py -n 4→7 passed./scripts/run_tests.sh tests/ -n 4→ attempted; the current baseline showed broad unrelated failures, then stalled near 98% after cleanup-thread logging errors (ValueError: I/O operation on closed file) and was stopped instead of leaving pytest wedged.