hermes-agent/apps/desktop/src/lib
Brooklyn Nicholson 0138282f97 perf(desktop): keep oversized messages from freezing the chat
A multi-MB message (logged bundle, huge tool dump) froze the renderer
before any paint: Streamdown runs `preprocess` + `marked` lex over the
whole string synchronously in a useMemo, an uninterruptible long task
that no try/catch or content-visibility can help (our JS runs before the
browser ever skips layout). Tiered fix:

- Message gate: past 200KB, bypass markdown entirely and render the raw
  text in `content-visibility:auto` line-chunks — synchronous work is
  bounded to a string split, the browser virtualizes layout natively,
  and every line stays in the DOM (selectable, find-in-page).
- Code-block budget: past 3k lines / 150KB, skip Shiki (which emits a
  span per token) and render plain, chunked the same way.
- Collapse/expand: a reusable ExpandableBlock clamps code blocks and the
  huge-text fallback to a 120px preview with a gradient + chevron,
  expanding to 300px. The inner element is always a scroll container so
  the content-visibility chunks stay lazily laid out in both states.

No content is ever dropped; the copy button (card header) always yields
the full block.
2026-06-17 08:25:52 -05:00
..
keybinds feat(desktop): open new sessions in compact windows 2026-06-15 20:59:57 -05:00
ansi.test.ts fix(desktop): triage batch of GUI quality-of-life fixes (#37536) 2026-06-02 16:33:22 -04:00
ansi.ts desktop: registry-driven slash commands + first-class /resume & /handoff (#42351) 2026-06-11 01:49:24 +00:00
chat-messages.test.ts fix(desktop): coalesce interleaved reasoning/content stream parts 2026-06-15 17:48:35 -05:00
chat-messages.ts refactor(desktop): unify stream-part coalescing into one helper 2026-06-15 18:13:52 -05:00
chat-runtime.test.ts fix(desktop): render optimistic image thumbnails from in-hand base64 2026-06-09 17:03:42 -05:00
chat-runtime.ts fix(desktop): refresh session model metadata on switch (#43977) 2026-06-11 10:05:32 -04:00
clipboard.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
commit-changelog.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
commit-changelog.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
completion-sound.ts feat(desktop): add curated completion cue for agent turn completion (#42480) 2026-06-14 00:21:40 -05:00
desktop-fs.test.ts fix(desktop): scope remote workspace defaults 2026-06-11 09:41:35 -07:00
desktop-fs.ts feat(desktop): worktree-aware sidebar grouping + composer/sidebar UX fixes 2026-06-12 18:18:39 -05:00
desktop-slash-commands.test.ts feat(desktop): allow /browser connect on a local gateway (#47245) 2026-06-16 09:03:43 -05:00
desktop-slash-commands.ts feat(desktop): allow /browser connect on a local gateway (#47245) 2026-06-16 09:03:43 -05:00
embedded-images.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
embedded-images.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
external-link.test.tsx fix(desktop): render debug-report paste URLs as real clickable links 2026-06-08 21:35:21 -04:00
external-link.tsx fix(desktop): render debug-report paste URLs as real clickable links 2026-06-08 21:35:21 -04:00
gateway-events.test.ts fix(desktop): don't drop the focused chat's own stream when unscoped (#42359) 2026-06-08 15:24:15 -05:00
gateway-events.ts fix(desktop): don't drop the focused chat's own stream when unscoped (#42359) 2026-06-08 15:24:15 -05:00
gateway-ws-url.test.ts fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure 2026-06-04 01:11:34 -07:00
gateway-ws-url.ts feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
generated-images.test.ts fix(desktop): keep generated images in the tool slot, not inline 2026-06-13 02:42:15 -05:00
generated-images.ts fix(desktop): keep generated images in the tool slot, not inline 2026-06-13 02:42:15 -05:00
haptics.ts feat(desktop): drag sessions into chat as @session links + spawn loader 2026-06-04 19:41:51 -05:00
icons.ts feat(desktop): native OS notifications with per-type toggles 2026-06-14 00:31:03 -05:00
incremental-external-store-runtime.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
katex-memo.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
local-preview.ts feat(desktop): wire remote filesystem browsing 2026-06-11 09:41:35 -07:00
markdown-code.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
markdown-code.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
markdown-preprocess.ts perf(desktop): keep oversized messages from freezing the chat 2026-06-17 08:25:52 -05:00
media.remote.test.ts fix(desktop): open remote-gateway artifacts via authenticated download (#46895) 2026-06-15 23:50:19 -05:00
media.ts fix(desktop): open remote-gateway artifacts via authenticated download (#46895) 2026-06-15 23:50:19 -05:00
model-status-label.test.ts fix(desktop): honor pre-session model pick + restore global reasoning/speed defaults (#47447) 2026-06-16 16:22:09 -05:00
model-status-label.ts fix(desktop): honor pre-session model pick + restore global reasoning/speed defaults (#47447) 2026-06-16 16:22:09 -05:00
mutable-ref.ts chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
preview-targets.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
preview-targets.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-color.ts feat(desktop): long-press a rail profile to pick its color 2026-06-04 20:12:37 -05:00
provider-setup-errors.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
provider-setup-errors.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
query-client.ts feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00
remend-tail.test.ts perf(desktop): incremental markdown rendering during streams 2026-06-12 21:07:36 -05:00
remend-tail.ts perf(desktop): incremental markdown rendering during streams 2026-06-12 21:07:36 -05:00
runtime-readiness.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
runtime-readiness.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
session-export.ts fix(desktop): route profile session reads 2026-06-11 18:09:24 -05:00
session-search.test.ts Show platform sources in desktop sessions 2026-06-07 23:44:04 -07:00
session-search.ts Show platform sources in desktop sessions 2026-06-07 23:44:04 -07:00
session-source.ts fix(desktop): local-only recents, per-platform sidebar sections, and Ctrl+N regressions (#42537) 2026-06-09 14:24:25 +00:00
speech-text.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
statusbar.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
storage.test.ts fix(desktop): keep recents sorted unless manually reordered (#45404) 2026-06-13 00:38:10 -05:00
storage.ts fix(desktop): keep recents sorted unless manually reordered (#45404) 2026-06-13 00:38:10 -05:00
todos.test.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
todos.ts feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
tool-result-summary.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
tool-result-summary.ts fix(desktop): triage batch of GUI quality-of-life fixes (#37536) 2026-06-02 16:33:22 -04:00
update-copy.test.ts fix(desktop): name the update target in the overlay; honest no-changelog copy 2026-06-08 08:58:26 -07:00
update-copy.ts fix(desktop): name the update target in the overlay; honest no-changelog copy 2026-06-08 08:58:26 -07:00
use-enter-animation.ts fix(desktop): prevent IME Enter from splitting messages and viewport resize from disarming scroll anchor (#38333) 2026-06-03 20:14:52 +00:00
utils.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
voice-playback.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
yolo-session.ts feat(desktop): Shift+click the status-bar zap to toggle YOLO globally (#41666) 2026-06-07 20:57:08 -05:00