fix: avoid stale dashboard TUI rebuild loop#21098
Closed
CCClelo wants to merge 1 commit into
Closed
Conversation
Collaborator
This was referenced May 7, 2026
Contributor
|
Closing as stale — the code path this addresses no longer exists on Triage notes (high confidence): If this PR's intent is still relevant against the current code, please rebase or open a fresh PR. (Bulk-closed during a CLI PR triage sweep.) |
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.
Summary
Fix the Dashboard Chat TUI stale check to follow the hermes-ink build output that is actually refreshed by the build script.
ui-tui/packages/hermes-ink/package.jsonbuildssrc/entry-exports.tsintodist/entry-exports.js, but_hermes_ink_bundle_stale()was checking the legacydist/ink-bundle.jscompatibility artifact. Since that legacy file is not refreshed bynpm run build --prefix packages/hermes-ink, installs that still have an oldink-bundle.jscan repeatedly consider hermes-ink stale.That makes Dashboard Chat synchronously rebuild the TUI during
/api/ptystartup, which can block long enough for the browser's WebSocket handshake to time out and render[session ended].This PR changes the stale check to use
dist/entry-exports.jsand adds a regression test proving an old/missing legacyink-bundle.jsno longer forces a rebuild when the current output is fresh.Related: #20739
Test Plan
scripts/run_tests.sh tests/hermes_cli/test_tui_npm_install.py -qLocal reproduction/verification on an affected install:
_resolve_chat_argv()took ~32s and/api/ptyWebSocket opening handshake timed out._resolve_chat_argv()took ~0.03s and/api/ptyopened normally.