Skip to content

fix: avoid stale dashboard TUI rebuild loop#21098

Closed
CCClelo wants to merge 1 commit into
NousResearch:mainfrom
CCClelo:fix/dashboard-tui-ink-stale-check
Closed

fix: avoid stale dashboard TUI rebuild loop#21098
CCClelo wants to merge 1 commit into
NousResearch:mainfrom
CCClelo:fix/dashboard-tui-ink-stale-check

Conversation

@CCClelo

@CCClelo CCClelo commented May 7, 2026

Copy link
Copy Markdown
Contributor

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.json builds src/entry-exports.ts into dist/entry-exports.js, but _hermes_ink_bundle_stale() was checking the legacy dist/ink-bundle.js compatibility artifact. Since that legacy file is not refreshed by npm run build --prefix packages/hermes-ink, installs that still have an old ink-bundle.js can repeatedly consider hermes-ink stale.

That makes Dashboard Chat synchronously rebuild the TUI during /api/pty startup, 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.js and adds a regression test proving an old/missing legacy ink-bundle.js no 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 -q

Local reproduction/verification on an affected install:

  • Before: _resolve_chat_argv() took ~32s and /api/pty WebSocket opening handshake timed out.
  • After: _resolve_chat_argv() took ~0.03s and /api/pty opened normally.

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels May 7, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #20951 (identical fix: ink-bundle.js → entry-exports.js in _hermes_ink_bundle_stale). Also overlaps with #20686 which is a superset fix including auto-resume.

@teknium1

Copy link
Copy Markdown
Contributor

Closing as stale — the code path this addresses no longer exists on main.

Triage notes (high confidence):
Function _hermes_ink_bundle_stale and _tui_build_needed are gone on main; replaced by _tui_need_rebuild at hermes_cli/main.py:1209. The ink-bundle.js/entry-exports.js stale-check path the PR patches no longer exists.

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.)

@teknium1 teknium1 closed this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants