Skip to content

fix(dashboard): restore native chat text selection#21955

Open
eric-senyao wants to merge 5 commits into
NousResearch:mainfrom
eric-senyao:fix-dashboard-selection-copy
Open

fix(dashboard): restore native chat text selection#21955
eric-senyao wants to merge 5 commits into
NousResearch:mainfrom
eric-senyao:fix-dashboard-selection-copy

Conversation

@eric-senyao

@eric-senyao eric-senyao commented May 8, 2026

Copy link
Copy Markdown

Summary

  • Preserve the TUI mouse-tracking runtime default during config hydration so Dashboard Chat can keep terminal mouse reporting disabled.
  • Run the dashboard-embedded TUI in inline/primary-buffer mode and give the browser xterm native scrollback, so wheel scrolling and drag-to-edge text selection work like a normal terminal surface.
  • Use a non-virtualized inline transcript pane in inline mode so oversized spacer rows do not pollute xterm scrollback or copied selections.
  • Keep native CLI/fullscreen TUI behavior on the existing virtualized alternate-screen path.

Test plan

  • git diff --check upstream/main...HEAD — passed
  • git diff --check — passed
  • scripts/run_tests.sh tests/hermes_cli/test_dashboard_chat_native_scrollback.py tests/hermes_cli/test_web_server.py tests/test_tui_gateway_server.py -q — 314 passed, 184 warnings (existing DeprecationWarning noise)
  • cd ui-tui && NODE_ENV= npm test -- --run src/__tests__/useConfigSync.test.ts — 33 passed
  • cd ui-tui && NODE_ENV= npm run build — passed
  • cd web && npm run build — passed (Vite large chunk warning only)
  • cd web && npx eslint src/pages/ChatPage.tsx — 0 errors, 1 existing react-hooks/exhaustive-deps warning

Manual verification

  • In Dashboard Chat, mouse selection works inside the visible transcript.
  • Dragging the selection beyond the top/bottom edge auto-scrolls the transcript and extends the selection into off-screen history.
  • Copying the resulting selection returns the selected transcript text rather than layout spacer rows.

Notes

  • This supersedes the earlier native DOM copy event-only approach: the root issue was first restoring native text selection.
  • The fix is intentionally scoped to Dashboard Chat's embedded xterm/TUI path; it does not change ordinary CLI fullscreen behavior.

@eric-senyao eric-senyao marked this pull request as ready for review May 8, 2026 16:18
@eric-senyao eric-senyao marked this pull request as draft May 8, 2026 17:14
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels May 9, 2026
@eric-senyao eric-senyao changed the title fix(dashboard): handle native copy for chat selections fix(dashboard): preserve TUI mouse tracking runtime default May 9, 2026
@eric-senyao eric-senyao marked this pull request as ready for review May 9, 2026 04:00
@eric-senyao eric-senyao force-pushed the fix-dashboard-selection-copy branch from 475ff2b to e15a47b Compare May 10, 2026 07:11
@eric-senyao eric-senyao marked this pull request as draft May 11, 2026 05:59
Render Dashboard inline transcripts without the ScrollBox virtual spacers so xterm primary-buffer scrollback does not capture large blank gaps after refresh or resume. Add a regression check that inline mode preserves real transcript rows without virtualized primary-buffer spacer output.
@eric-senyao eric-senyao marked this pull request as ready for review May 11, 2026 16:03
@eric-senyao eric-senyao changed the title fix(dashboard): preserve TUI mouse tracking runtime default fix(dashboard): restore native chat text selection May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants