fix(tui): replace ink-bundle.js with entry-exports.js and auto-resume session on /chat reconnect#20686
Open
yigenhuobah wants to merge 2 commits into
Open
Conversation
…ession - _hermes_ink_bundle_stale: check entry-exports.js instead of ink-bundle.js - _tui_ink_bundle_exists: check entry-exports.js instead of ink-bundle.js - _tui_build_needed: skip 'packages' directory to avoid redundant staleness walk into packages/hermes-ink/src/ - _resolve_chat_argv: auto-resume most recent TUI session when no resume param is passed (fixes broken input after navigating away from /chat) - tests: update bundle filename references and add coverage
7f43917 to
39d5dc6
Compare
Collaborator
|
Related: superset of #20322 (same ink-bundle.js → entry-exports.js fix, plus adds auto-resume on /chat reconnect). |
This was referenced May 7, 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.
Problem
PR #20322 added staleness detection for the @hermes/ink bundle, but used the
wrong output filename (
ink-bundle.js). The esbuild config actually outputsentry-exports.js, making the stale-check always trigger a rebuild.Additionally, when a user navigates away from the /chat page in the dashboard
and comes back, the WebSocket PTY connection spawns a new TUI process without
a session resume ID, causing the embedded chat to show "forging session…" and
refuse keyboard input.
Changes
Replace all
ink-bundle.jsreferences withentry-exports.jsin_tui_ink_bundle_existsand_hermes_ink_bundle_stale.Add
"packages"to the os.walk skip set in_tui_build_neededso itdoesn't redundantly walk into
packages/hermes-ink/src/— stalenessfor that sub-package is already handled by
_hermes_ink_bundle_stale.In
_resolve_chat_argv(web server PTY handler), auto-resume the mostrecent TUI session when no explicit resume ID is provided. Uses the
existing
_resolve_last_session(source="tui")helper.Update tests: rename helpers to use
entry-exports.js, add coverage forthe bundle-present case.
How to test
hermes dashboard --tui