Skip to content

fix(dashboard): use browser scrollback for chat wheel (#28029)#28584

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-3ad7d98a
May 19, 2026
Merged

fix(dashboard): use browser scrollback for chat wheel (#28029)#28584
teknium1 merged 1 commit into
mainfrom
hermes/hermes-3ad7d98a

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #28029 by @YuanHanzhong.

What: Dashboard chat embedded the TUI with scrollback: 0 (delegating all scroll behavior to the inner Hermes TUI). In practice, mouse-wheel scrollback in the browser felt broken because xterm.js had no buffered history to scroll through.

How:

  • hermes_cli/web_server.py sets HERMES_TUI_INLINE=1 so the embedded TUI runs in inline mode (no alternate-screen buffer hijack).
  • web/src/pages/ChatPage.tsx raises scrollback from 0 to 5000 so xterm.js keeps the transcript history the wheel can scroll.
  • Test added in tests/hermes_cli/test_web_server.py confirms the dashboard scroll env is wired.

Original PR: #28029
Fixes #19084.

@teknium1 teknium1 merged commit afffb8d into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-3ad7d98a branch May 19, 2026 07:07
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-3ad7d98a vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8954 on HEAD, 8952 on base (🆕 +2)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4702 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels May 19, 2026
briandevans added a commit to briandevans/hermes-agent that referenced this pull request May 30, 2026
…eachable

The dashboard chat wheel handler in `web/src/pages/ChatPage.tsx`
unconditionally divided pixel deltas by 50 to compute its scroll step.
For a typical browser mouse-wheel click (`deltaY ≈ 100`, `deltaMode =
DOM_DELTA_PIXEL`) that produces 2 lines per tick.  Combined with the
5000-line `scrollback` introduced by NousResearch#28584, a resumed session ends
up needing ~2500 wheel ticks to reach the top, so users see only the
tail of the conversation and report it as "history is missing"
(NousResearch#32561).

Branch on `deltaMode` instead:

* `DOM_DELTA_LINE` (1) — already in lines, scroll 1:1.
* `DOM_DELTA_PAGE` (2) — scale by `term.rows` for a full-page jump.
* `DOM_DELTA_PIXEL` (0) — divide by ~16 (default xterm cell row
  height), giving ~6 lines per typical 100px click.  Matches the
  browser-native scroll feel and brings a 5000-line scrollback down
  to ~85 wheel ticks (still bounded by xterm's own scrollback cap,
  not by this formula).

Builds on the wheel routing established by NousResearch#28584 (afffb8d) — only
the step calculation changes; `term.scrollLines` continues to drive
the in-terminal scrollback so PTY traffic is unaffected.
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/) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dashboard /chat: wheel scrolling does not reliably scroll transcript history in embedded chat

3 participants