Skip to content

perf(tui): stabilize long-session scrolling - #15926

Merged
OutThisLife merged 90 commits into
mainfrom
bb/tui-long-session-perf
Apr 27, 2026
Merged

perf(tui): stabilize long-session scrolling#15926
OutThisLife merged 90 commits into
mainfrom
bb/tui-long-session-perf

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR makes the TUI usable on very long sessions by cutting hot render work out of the scroll path, isolating streaming state, and adding bounded caches/eviction for Ink internals.

Main outcomes:

  • Virtualized transcript rendering now caps mount work during fast wheel/PageUp bursts, preserves coverage for unmeasured rows, and avoids full-range recomputation on every scroll tick.
  • Markdown, width, wrap, and ANSI-slice work is cached or bounded so cold-mounting old transcript rows no longer reparses/scans entire historical messages.
  • Composer typing uses safe direct terminal echo for the hot path, so keystrokes are not paced by React/Ink commits.
  • Streaming output backs off while the user types or scrolls, then relaxes when idle.
  • Turn/UI/overlay state is split into narrow stores/selectors so model deltas do not invalidate the whole app shell.
  • Todo/progress rendering is folded into the transcript flow, with live todos anchored under the latest user message.
  • Ink cache eviction is now explicit under memory pressure and session reset.
  • Added profiling tools and gated diagnostics for future regressions (HERMES_DEV_PERF=1, HERMES_TUI_FPS=1).
  • Follow-up cleanup passes removed noisy scaffolding/comments, stale debug exports, and test-only dead code without changing behavior.

Before / After

CPU profile from a real long-session scroll:

Area Before After
Output.get() self-time 24% 0.3%
sliceAnsi total 18% not in top 25
stringWidth family 14% ~3%
Process idle during scroll profile 60.7% 77.3%

Synthetic PageUp profile harness:

Metric Before After
frame duration p95 ~10ms 4.87ms
frame duration p99 25ms+ 12.80ms
Yoga/layout p99 ~20ms 1.87ms

Idle sanity / typing-while-streaming profiles after fixes:

  • 2 minute idle CPU profile: 99.37% idle
  • Fresh production typing+streaming CPU profile: 96.56% idle over 42.4s
  • GC during production typing+streaming profile: 0.20% self-time
  • Streaming markdown during production typing+streaming profile: effectively noise-level (Streaming* ~0.05% inclusive, markdown ~0.00-0.01%)
  • Text input during production typing+streaming profile: 0.22% inclusive
  • No observed invisible render loop / timer tax at rest

Key Changes

  • useVirtualHistory now uses deferred range growth, slide caps, quantized scroll snapshots, clamp bounds, pessimistic coverage for unmeasured rows, and typed-array offset reuse.
  • ScrollBox/Ink rendering gained a scroll fast path plus instrumentation to explain declines.
  • stringWidth, wrapText, sliceAnsi, and line-width caches are bounded LRU caches, with shared eviction via evictInkCaches().
  • Output.get() skips ANSI slicing entirely when the line already fits the clip window.
  • Historical transcript rows use bounded render text outside the active reading tail.
  • Streaming markdown reparses only the unstable suffix after the last stable block boundary.
  • Composer input uses optimistic echo, cached line width, direct EOL backspace, coalesced parent changes, and stable composer columns.
  • Turn state is split from UI/overlay state, with selector-based subscriptions for streaming, tools, todos, subagents, and activity.
  • React Compiler is wired into the TUI build as a post-tsc Babel pass, with compiler lint warnings enabled for app code.
  • /details config/completion, /model persistence, resume/exit session handoff, and most-recent session selection were tightened while working through long-session flows.

Validation

Latest local validation after cleanup:

  • npm run fix passed
  • npm run type-check passed
  • npm test passed: 367/367
  • npm run build passed
  • python -m py_compile scripts/profile-tui.py passed

npm run fix currently reports 4 React Compiler warnings in existing singleton/hot-path mutation patterns; no errors.

Notes For Reviewers

The perf diagnostics are opt-in and should be zero-cost when disabled:

  • HERMES_DEV_PERF=1 writes commit/frame rows to the perf log.
  • HERMES_TUI_FPS=1 shows the live FPS overlay.
  • Cache eviction is exposed through @hermes/ink so the TUI can prune hot caches on memory pressure or session reset.

@alt-glitch alt-glitch added type/perf Performance improvement or optimization P2 Medium — degraded but workaround exists comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves long-session UX in the TUI by stabilizing transcript scrolling behavior under burst scroll, reducing composer rewrap jitter, centralizing viewport/input metrics helpers with tests, persisting /model selections across restarts, and adding /details slash completion support in the gateway.

Changes:

  • Add ScrollBox clamp bounds support and hook it into virtual history to prevent scroll bursts from outrunning mounted rows.
  • Centralize viewport snapshot + input layout metrics utilities, refactor consumers, and add unit tests.
  • Persist /model switches by default (via --global) and add /details completions in complete.slash (plus tests).

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui-tui/src/types/hermes-ink.d.ts Extends ScrollBoxHandle typing with setClampBounds.
ui-tui/src/lib/viewportStore.ts Adds shared viewport snapshot + useViewportSnapshot hook for consistent scroll-derived UI.
ui-tui/src/lib/inputMetrics.ts Adds shared cursor wrap parity + composer sizing helpers.
ui-tui/src/hooks/useVirtualHistory.ts Sets ScrollBox clamp bounds based on mounted virtual range to stabilize burst scrolling.
ui-tui/src/components/textInput.tsx Refactors to import shared cursorLayout helper.
ui-tui/src/components/appLayout.tsx Uses shared input metrics to reserve stable composer width/height.
ui-tui/src/components/appChrome.tsx Switches sticky prompt + scrollbar math to useViewportSnapshot.
ui-tui/src/app/useMainApp.ts Uses viewport snapshot helper; makes model picker selection persist via --global.
ui-tui/src/app/slash/commands/session.ts Appends --global to /model by default (without duplicating it).
ui-tui/src/tests/viewportStore.test.ts Adds tests for viewport snapshot normalization/keying.
ui-tui/src/tests/textInputWrap.test.ts Moves cursor layout tests to new helpers; adds input metrics tests.
ui-tui/src/tests/createSlashHandler.test.ts Adds tests asserting /model persistence behavior.
tui_gateway/server.py Adds /details to slash completions and implements /details argument completions.
tests/test_tui_gateway_server.py Adds gateway completion tests for /details.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/lib/inputMetrics.ts Outdated
Comment thread tui_gateway/server.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve TUI “long session” interaction smoothness by stabilizing scrolling/virtualization bounds, reducing composer reflow/jitter during input, and throttling streaming UI updates based on user interaction state. It also extends slash completion and persists /model selections by default.

Changes:

  • Add viewport/input-metric helpers and refactor scroll/viewport consumers to use them (with new tests).
  • Improve virtual transcript burst-scroll stability via ScrollBox clamp bounds and selection-aware scrolling helper.
  • Reduce composer/render churn while typing via coalesced parent updates, optional fast terminal echo, and interaction-mode-based streaming throttling; plus /details completion + default global /model.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ui-tui/src/types/hermes-ink.d.ts Extends ScrollBoxHandle typing with clamp bounds setter.
ui-tui/src/lib/viewportStore.ts Adds shared viewport snapshot + hook for scroll-driven UI.
ui-tui/src/lib/inputMetrics.ts Centralizes cursor wrap parity + composer width/height helpers.
ui-tui/src/hooks/useVirtualHistory.ts Adds virtual clamp logic to prevent burst scrolling past mounted rows.
ui-tui/src/config/timing.ts Introduces interaction-aware streaming/idle timing constants.
ui-tui/src/config/limits.ts Adjusts wheel scroll step size.
ui-tui/src/components/textInput.tsx Adds fast-echo/coalesced updates and native-cursor behavior.
ui-tui/src/components/appLayout.tsx Reserves stable composer width and sets height from visual wrap.
ui-tui/src/components/appChrome.tsx Refactors sticky prompt + scrollbar to use viewport snapshot hook.
ui-tui/src/app/useSubmission.ts Marks typing, boosts streaming throttle during busy, queues “session busy” submissions.
ui-tui/src/app/useMainApp.ts Uses shared viewport snapshot; factors scroll-with-selection into helper; persists model picks globally.
ui-tui/src/app/turnController.ts Adds interaction-mode-based streaming batching and adjustable delay.
ui-tui/src/app/slash/commands/session.ts Makes /model persist globally by default (avoids dup --global).
ui-tui/src/app/scroll.ts New helper for clamped scrolling that preserves selection snapshots.
ui-tui/src/app/interfaces.ts Expands SelectionApi surface needed by scroll helper.
ui-tui/src/app/interactionMode.ts Adds global interaction mode tracking (typing/scrolling/idle).
ui-tui/src/tests/virtualHistoryClamp.test.ts Tests clamp enable/disable conditions.
ui-tui/src/tests/viewportStore.test.ts Tests viewport snapshot math and keying.
ui-tui/src/tests/textInputWrap.test.ts Moves cursorLayout tests to helpers; adds input metric tests.
ui-tui/src/tests/scroll.test.ts Tests selection-aware scroll clamping behavior.
ui-tui/src/tests/interactionMode.test.ts Tests interaction mode timing/priority.
ui-tui/src/tests/createSlashHandler.test.ts Tests default /model --global persistence behavior.
ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx Refactors scrollBy implementation and supports clamp bounds on element.
ui-tui/packages/hermes-ink/src/ink/components/App.tsx Keeps native cursor visible; adjusts click-disable logic ordering.
tui_gateway/server.py Adds /details command + argument completion in gateway slash completion.
tests/test_tui_gateway_server.py Adds pytest coverage for /details slash completions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/hooks/useVirtualHistory.ts
Comment thread tui_gateway/server.py
Comment thread ui-tui/src/app/turnController.ts
Comment thread ui-tui/src/components/textInput.tsx
Comment thread ui-tui/src/components/textInput.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on improving TUI stability and perceived performance during long sessions by tightening scroll virtualization/clamping, reducing composer reflow/jitter, and throttling streaming updates while the user is actively typing.

Changes:

  • Add viewport/input-metrics helpers (snapshot + cursor/wrap metrics) and refactor consumers to use them, with new unit tests.
  • Improve scroll behavior: virtual-history clamp bounds integration and selection-aware scrolling extracted into a shared helper.
  • Reduce typing/render overhead: coalesce parent input updates, add safe terminal “fast echo” paths, and adjust streaming batching while typing; plus persist /model selections by default and add /details slash completions.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ui-tui/src/types/hermes-ink.d.ts Extends ScrollBoxHandle typing with setClampBounds.
ui-tui/src/lib/viewportStore.ts Introduces viewport snapshot + subscription hook for scroll consumers.
ui-tui/src/lib/inputMetrics.ts Centralizes cursor layout/wrap metrics and stable composer column calculation.
ui-tui/src/hooks/useVirtualHistory.ts Hooks virtual-history range into ScrollBox clamp bounds to prevent spacer-only frames on burst scroll.
ui-tui/src/config/timing.ts Adds new timing constants for streaming cadence and typing/scrolling idle thresholds.
ui-tui/src/config/limits.ts Adjusts wheel scroll step.
ui-tui/src/components/textInput.tsx Adds fast-echo + coalesced parent updates, native cursor usage, and cached width logic.
ui-tui/src/components/appLayout.tsx Reserves stable composer width/gutter and uses new input metric helpers.
ui-tui/src/components/appChrome.tsx Refactors sticky prompt + scrollbar computations to use useViewportSnapshot.
ui-tui/src/app/useSubmission.ts Damps streaming while typing; queues “session busy” submits instead of surfacing errors.
ui-tui/src/app/useMainApp.ts Uses shared selection-aware scrolling helper; persists model picker changes via --global; removes progress freezing.
ui-tui/src/app/turnController.ts Makes streaming batch delay adjustable (idle vs typing).
ui-tui/src/app/slash/commands/session.ts Ensures /model changes persist by default by appending --global.
ui-tui/src/app/scroll.ts New shared scrollWithSelectionBy helper with clamped deltas.
ui-tui/src/app/interfaces.ts Expands SelectionApi to support selection-aware scroll shifting/capture.
ui-tui/src/app/interactionMode.ts Adds shared idle/typing/scrolling mode tracking with timers.
ui-tui/src/app/createGatewayEventHandler.ts Streams legacy thinking.delta into reasoning state updates.
ui-tui/src/tests/virtualHistoryClamp.test.ts Tests clamp gating logic for sticky vs manual scroll.
ui-tui/src/tests/viewportStore.test.ts Tests viewport snapshot math + keying includes pending delta.
ui-tui/src/tests/textInputWrap.test.ts Moves wrap parity tests to new helpers; adds tests for composer metrics.
ui-tui/src/tests/scroll.test.ts Tests selection-aware scrolling clamping behavior.
ui-tui/src/tests/interactionMode.test.ts Tests idle timeout and typing priority behavior.
ui-tui/src/tests/createSlashHandler.test.ts Tests default /model --global behavior and avoids duplication.
ui-tui/src/tests/createGatewayEventHandler.test.ts Tests legacy thinking delta feeding reasoning state.
ui-tui/packages/hermes-ink/src/ink/ink.tsx Adds selection drag auto-scroll support and integrates selection bounds tracking.
ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx Refactors scrollBy implementation into a reusable internal function and adds clamp bounds setter.
ui-tui/packages/hermes-ink/src/ink/components/App.tsx Keeps native cursor visible; adjusts mouse click disabling behavior.
tui_gateway/server.py Adds /details command + argument completions in complete.slash.
tests/test_tui_gateway_server.py Adds tests for /details slash completion and arguments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/app/slash/commands/session.ts
Comment thread ui-tui/src/components/textInput.tsx Outdated
Comment thread tui_gateway/server.py
Comment thread ui-tui/src/components/appLayout.tsx
Comment thread ui-tui/src/app/useSubmission.ts
OutThisLife added a commit that referenced this pull request Apr 27, 2026
- remove the temporary -c MRU logic and companion test from this branch so PR #15926 stays focused on TUI perf work
- keep the resume-ordering change isolated in the dedicated follow-up PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets long-session TUI performance and responsiveness by reducing render work on scroll/stream/typing hot paths, adding bounded caches + eviction in @hermes/ink, and isolating frequently-updating turn state from the broader UI shell.

Changes:

  • Add virtualization/scroll improvements, including wheel acceleration, viewport snapshots, and virtual height estimation + caching.
  • Introduce bounded/LRU caching + explicit eviction for expensive Ink internals (stringWidth, ANSI slicing, wrapping) plus perf/FPS instrumentation hooks.
  • Refactor TUI streaming/progress/todo rendering and state subscriptions (selector-based turn store) to avoid broad invalidations.

Reviewed changes

Copilot reviewed 97 out of 100 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ui-tui/src/types/hermes-ink.d.ts Extends Ink typings for frame callbacks, fast-path stats, cache eviction, and ScrollBox additions.
ui-tui/src/types.ts Adds todo types/fields on messages and session info fields for status display.
ui-tui/src/lib/wheelAccel.ts Implements wheel-scroll acceleration heuristics with host detection and env overrides.
ui-tui/src/lib/virtualHeights.ts Adds message height keying + height estimation for virtualization.
ui-tui/src/lib/viewportStore.ts Adds viewport snapshot/store keyed for stable subscriptions.
ui-tui/src/lib/todo.ts Adds todo glyph/tone helpers for consistent transcript rendering.
ui-tui/src/lib/todo.test.ts Unit tests for todo glyph/tone behavior.
ui-tui/src/lib/text.ts Adds bounded render text helpers, thinking cleanup, tool duration formatting, and related utilities.
ui-tui/src/lib/perfPane.tsx Adds opt-in perf logging for React commits and Ink frame events.
ui-tui/src/lib/messages.ts Routes transcript appends through tool-shelf merging logic.
ui-tui/src/lib/messages.test.ts Tests transcript append behavior for tool shelves.
ui-tui/src/lib/memoryMonitor.ts Evicts Ink caches under memory pressure before heap dump/exit.
ui-tui/src/lib/liveProgress.ts Adds tool shelf merging + todo state helpers for live progress rendering.
ui-tui/src/lib/liveProgress.test.ts Tests tool shelf merge behavior and todo completion checks.
ui-tui/src/lib/inputMetrics.ts Factors cursor layout + composer sizing helpers out of TextInput.
ui-tui/src/lib/fpsStore.ts Adds opt-in FPS tracker store fed from Ink onFrame.
ui-tui/src/gatewayTypes.ts Extends tool events to include todos and completion durations.
ui-tui/src/entry.tsx Wires Ink onFrame to perf logging + FPS tracking when enabled.
ui-tui/src/domain/details.ts Adjusts details-mode layering with a command override path.
ui-tui/src/config/timing.ts Adds separate streaming batch timings and typing idle threshold.
ui-tui/src/config/limits.ts Adds render tail limits and reduces base wheel scroll step to keep scroll fast path viable.
ui-tui/src/config/env.ts Adds INLINE_MODE + SHOW_FPS flags and shared truthy parsing.
ui-tui/src/components/todoPanel.tsx Adds interactive/collapsible todo rendering panel.
ui-tui/src/components/thinking.tsx Bounds full reasoning render, threads commandOverride into section visibility, and displays tool durations.
ui-tui/src/components/textInput.tsx Adds stdout-based fast echo paths + coalesced parent updates and stable cursor/layout behavior.
ui-tui/src/components/streamingMarkdown.tsx Adds incremental streaming markdown renderer split by stable block boundary.
ui-tui/src/components/streamingAssistant.tsx Splits streaming assistant rendering and adds live todo anchoring panel.
ui-tui/src/components/messageLine.tsx Adds streaming markdown path, history render bounding, todo trail rendering, and tool injection support.
ui-tui/src/components/markdown.tsx Adds theme-keyed, bounded cross-instance markdown parse cache (LRU).
ui-tui/src/components/fpsOverlay.tsx Adds opt-in FPS overlay component.
ui-tui/src/components/appLayout.tsx Refactors layout to PerfPane-wrapped sections, adds inline mode, stable composer sizing, and live todo anchoring.
ui-tui/src/components/appChrome.tsx Switches to selector-based turn state + viewport snapshots; enriches model label rendering.
ui-tui/src/components/agentsOverlay.tsx Switches overlay to selector-based subagent subscriptions.
ui-tui/src/app/useSubmission.ts Adds typing-driven streaming backoff/relax behavior; improves queued submit behavior; tweaks session-busy errors.
ui-tui/src/app/useSessionLifecycle.ts Adds active-session file writing + Ink cache eviction on reset/resume paths.
ui-tui/src/app/useMainApp.ts Adds virtual height caching, transcript append merging, selector-based turn reads, and updated model persistence behavior.
ui-tui/src/app/useLongRunToolCharms.ts Moves to selector-based tool reads and avoids rerenders from unrelated turn updates.
ui-tui/src/app/useInputHandlers.ts Adds wheel acceleration and scroll-driven streaming backoff behavior.
ui-tui/src/app/useConfigSync.ts Clears detailsModeCommandOverride on config sync.
ui-tui/src/app/uiStore.ts Adds detailsModeCommandOverride to UI state.
ui-tui/src/app/turnStore.ts Adds selector hook, todo state, and end-of-turn todo archival helpers.
ui-tui/src/app/slash/commands/session.ts Makes /model persist globally by default; avoids duplicate --global.
ui-tui/src/app/slash/commands/ops.ts Removes unused transcript pager helper usage.
ui-tui/src/app/slash/commands/core.ts Threads detailsModeCommandOverride semantics through /details.
ui-tui/src/app/scroll.ts Extracts selection-aware scrolling into a reusable helper.
ui-tui/src/app/interfaces.ts Extends SelectionApi and narrows AppLayoutProgressProps to showProgressArea.
ui-tui/src/app/createGatewayEventHandler.ts Records reasoning deltas/todos; supports tool duration/todos and inline-diff tool completion flow.
ui-tui/src/tests/wheelAccel.test.ts Tests wheel acceleration state machine behavior.
ui-tui/src/tests/virtualHistoryClamp.test.ts Tests virtual history clamping decisions.
ui-tui/src/tests/virtualHeights.test.ts Tests stable keying and height estimates.
ui-tui/src/tests/viewportStore.test.ts Tests viewport snapshot normalization and key behavior.
ui-tui/src/tests/useSessionLifecycle.test.ts Tests active-session file writing helper.
ui-tui/src/tests/turnStore.test.ts Tests todo archiving and collapse toggling behavior.
ui-tui/src/tests/textInputWrap.test.ts Moves cursorLayout tests to inputMetrics and adds composer sizing tests.
ui-tui/src/tests/text.test.ts Adds tests for bounded render text, tool duration formatting, and thinking formatting changes.
ui-tui/src/tests/streamingMarkdown.test.ts Tests stable boundary detection for incremental streaming markdown.
ui-tui/src/tests/stateIsolation.test.ts Tests UI subscriber isolation from high-frequency turn updates.
ui-tui/src/tests/scroll.test.ts Tests selection-aware scroll clamping behavior.
ui-tui/src/tests/reasoning.test.ts Adds tests for cleaning thinking/status ticker noise.
ui-tui/src/tests/messages.test.ts Adds regression test ensuring resume preserves tool-call rows.
ui-tui/src/tests/details.test.ts Tests details mode layering with command overrides.
ui-tui/src/tests/createSlashHandler.test.ts Tests /model persistence default and details override behavior.
ui-tui/scripts/profile-tui.mjs Adds a profiling harness script for synthetic streaming/layout scenarios.
ui-tui/packages/hermes-ink/src/utils/sliceAnsi.ts Adds bounded LRU caching + eviction helpers for ANSI slicing.
ui-tui/packages/hermes-ink/src/ink/wrap-text.ts Adds bounded memoization and eviction for wrapping/truncation logic.
ui-tui/packages/hermes-ink/src/ink/termio/osc.ts Minor refactors/formatting in clipboard emission logic.
ui-tui/packages/hermes-ink/src/ink/terminal.ts Adds xterm.js key support, diff-write telemetry (bytes/backpressure/drain timing), and return values.
ui-tui/packages/hermes-ink/src/ink/stringWidth.ts Adds bounded memoization + eviction for string width calculation.
ui-tui/packages/hermes-ink/src/ink/render-node-to-output.ts Adds fast-path diagnostics counters for scroll DECSTBM optimization.
ui-tui/packages/hermes-ink/src/ink/output.ts Adds clip fast path to avoid ANSI slicing when line fits.
ui-tui/packages/hermes-ink/src/ink/lru.ts Introduces shared LRU eviction helper for Ink caches.
ui-tui/packages/hermes-ink/src/ink/line-width-cache.ts Converts line-width cache eviction to LRU and exposes eviction/size helpers.
ui-tui/packages/hermes-ink/src/ink/ink.tsx Adds frame drain/backpressure telemetry and selection auto-scroll during drag selection.
ui-tui/packages/hermes-ink/src/ink/frame.ts Extends FrameEvent phases to include write telemetry and optimized patch count.
ui-tui/packages/hermes-ink/src/ink/events/input-event.ts Refactors special-sequence input normalization (space/return/escape).
ui-tui/packages/hermes-ink/src/ink/events/cmd-shortcuts.test.ts Adds tests for modified Enter parsing sequences.
ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx Tracks last manual scroll timestamp and exposes it on handle.
ui-tui/packages/hermes-ink/src/ink/components/App.tsx Adjusts focus/mouse handling behavior and terminal mode toggles.
ui-tui/packages/hermes-ink/src/ink/cache-eviction.ts Adds unified eviction API for Ink’s bounded caches.
ui-tui/packages/hermes-ink/src/entry-exports.ts Exposes cache eviction, isXtermJs, and scroll fast-path stats.
ui-tui/packages/hermes-ink/index.d.ts Exposes cache eviction API from package typings.
ui-tui/package.json Adds React Compiler build step + Babel tooling and compiler lint plugin.
ui-tui/eslint.config.mjs Wires react-compiler lint rule (warn in app code; off in tests).
ui-tui/babel.compiler.config.cjs Adds Babel config for the React Compiler post-tsc pass.
tui_gateway/server.py Improves config cache invalidation, session resume/history lineage display, tool todos, and /details completions.
tests/test_tui_gateway_server.py Adds gateway tests for tool-call preservation, resume lineage display, and /details completion.
tests/test_hermes_state.py Adds tests for ancestor-inclusive conversations and de-duping replayed prompts.
tests/hermes_cli/test_tui_resume_flow.py Ensures TUI launches set NODE_ENV=production and exit summary prefers active-session file.
tests/hermes_cli/test_resolve_last_session.py Adds tests for “most recently active” session selection logic.
skills/software-development/hermes-agent-skill-authoring/SKILL.md Adds documentation skill for authoring in-repo skills.
skills/software-development/debugging-hermes-tui-commands/SKILL.md Adds documentation skill for debugging TUI slash commands end-to-end.
hermes_state.py Adds ancestor-inclusive conversation loading, replay de-duping, and last_active support in session search.
hermes_cli/web_server.py Ensures NODE_ENV=production for embedded TUI launches and standardizes env passing.
hermes_cli/main.py Uses last_active-based session resolution and active-session file to improve exit/resume flows.
Files not reviewed (1)
  • ui-tui/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@OutThisLife
OutThisLife force-pushed the bb/tui-long-session-perf branch from 24744c8 to 3e16649 Compare April 27, 2026 03:53
Update nix/tui.nix npmDeps hash to match the current ui-tui package-lock inputs so nix builds and CI lockfile checks pass.
@OutThisLife
OutThisLife merged commit e63929d into main Apr 27, 2026
11 of 12 checks passed
@OutThisLife
OutThisLife deleted the bb/tui-long-session-perf branch April 27, 2026 04:10
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
- remove the temporary -c MRU logic and companion test from this branch so PR NousResearch#15926 stays focused on TUI perf work
- keep the resume-ordering change isolated in the dedicated follow-up PR
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…ession-perf

perf(tui): stabilize long-session scrolling
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
- remove the temporary -c MRU logic and companion test from this branch so PR NousResearch#15926 stays focused on TUI perf work
- keep the resume-ordering change isolated in the dedicated follow-up PR
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
…ession-perf

perf(tui): stabilize long-session scrolling
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
- remove the temporary -c MRU logic and companion test from this branch so PR NousResearch#15926 stays focused on TUI perf work
- keep the resume-ordering change isolated in the dedicated follow-up PR
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…ession-perf

perf(tui): stabilize long-session scrolling
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
- remove the temporary -c MRU logic and companion test from this branch so PR NousResearch#15926 stays focused on TUI perf work
- keep the resume-ordering change isolated in the dedicated follow-up PR
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…ession-perf

perf(tui): stabilize long-session scrolling
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/) P2 Medium — degraded but workaround exists type/perf Performance improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants