Commit graph

4962 commits

Author SHA1 Message Date
nesquena-hermes
643eb2e396 test(#4800): make _scheduleRender guard test signature-agnostic
#4800 changed _scheduleRender() -> _scheduleRender(parsed) (parse-result cache).
test_streaming_race_fix's regex hardcoded the empty-arg signature so it couldn't
find the function ('_scheduleRender not found') even though the _streamFinalized
guard it checks is intact (line 3759). Regex now matches any args. Co-authored-by: wlknight
2026-06-23 22:46:49 +00:00
nesquena-hermes
1dbff4e708 Merge branch 'peek-4800' into gate/4800-stream-perf 2026-06-23 22:46:14 +00:00
nesquena-hermes
f04bd9fd8c
Merge pull request #4802 from nesquena/stage/rodboev-4797-4796
Release v0.51.612 — background-tab notifications + profile default workspace (#4753, #4755)
2026-06-23 15:36:43 -07:00
nesquena-hermes
e8b33066ec Merge remote-tracking branch 'origin/master' into stage/rodboev-4797-4796
# Conflicts:
#	CHANGELOG.md
2026-06-23 22:32:36 +00:00
nesquena-hermes
1083239eb2
Merge pull request #4801 from nesquena/stage/4788-json-view
Release v0.51.611 — configurable JSON/YAML code-block default view (#484)
2026-06-23 15:21:06 -07:00
nesquena-hermes
d818b6a68a release: stamp v0.51.612 (#4753 bg-tab notify + #4755 profile default workspace) 2026-06-23 22:19:40 +00:00
nesquena-hermes
edbe676b0d Merge branch 'peek-4796' into stage/rodboev-4797-4796 2026-06-23 22:19:13 +00:00
nesquena-hermes
e26a6e47c0 Merge branch 'peek-4797' into stage/rodboev-4797-4796 2026-06-23 22:19:12 +00:00
nesquena-hermes
8234cd7a98 release: stamp v0.51.611 (#484 configurable JSON/YAML code-block view) 2026-06-23 22:15:10 +00:00
wlknight
20a900be60 fix(perf): eliminate O(DOM) streaming render freeze on long agent answers
Introduce _safeSmdRenderer — a renderer wrapper that hooks smd's set_attr
to validate URL schemes inline as each DOM node is created, eliminating
the per-token _sanitizeSmdLinks(assistantBody) full-DOM scan that caused
progressive freezing on answers of 30,000+ chars (5,000+ DOM nodes).

Also add parse-result caching to _scheduleRender to avoid redundant
_extractInlineThinkingFromContent scans between the token event handler
and the rAF render callback.

Changes:
- New _safeSmdRenderer(el): URL scheme safety inline via set_attr hook
  (identical algorithm to proven _streamFadeRenderer.set_attr, no animation)
- _smdNewParser: non-fade path uses _safeSmdRenderer instead of bare
  default_renderer
- _smdWrite: removed _sanitizeSmdLinks(assistantBody) call — safety now
  handled by renderer's set_attr at node-creation time
- _scheduleRender(parsed): accepts optional cached parse result from
  token handler to avoid duplicate O(n) text scans
- Token handler: passes _parseStreamState() result to _scheduleRender

_sanitizeSmdLinks is preserved at _smdEndParser (stream-end safety net)
and in fallback paths where smd is not available.

All 166 existing tests pass.
2026-06-24 06:09:44 +08:00
nesquena-hermes
8e384548c3 fix(#4788): reword a comment apostrophe that tripped test_smooth_text_fade's brace-matcher
test_smooth_text_fade.py::test_preferences_ui_exposes_and_saves_fade_text_effect
extracts loadSettingsPanel() via a brace-matcher that does NOT skip comments. The
new structured-code wiring added a comment containing 'isn't' + ''auto' mode' —
the apostrophes were mis-read as string delimiters, scrambling the brace depth so
the matcher closed the function early (before the fade-checkbox wiring), failing
the test. Reworded to 'is not' / 'auto mode' (zero behavior change; node -c clean).
The fade feature + the structured-code feature are both unchanged. Co-authored-by: metaember
2026-06-23 21:40:08 +00:00
nesquena-hermes
48663a4af3 Merge branch 'peek-4788' into gate/4788-json-view 2026-06-23 21:19:18 +00:00
Rod Boev
94e25ad494 fix(#4753): notify background desktop tabs without hiding streams 2026-06-23 17:10:03 -04:00
nesquena-hermes
6f39bb6d08
Merge pull request #4795 from nesquena/stage/4656-escape-readonly
Release v0.51.610 — read-only access to escape-target symlinks in the workspace tree (#4582)
2026-06-23 13:54:20 -07:00
nesquena-hermes
952618c648 release: stamp v0.51.610 (#4582 read-only escape-target symlink access) 2026-06-23 20:44:32 +00:00
nesquena-hermes
7db3aa123f Merge branch 'peek-4656' into stage/4656-escape-readonly 2026-06-23 20:43:53 +00:00
nesquena-hermes
5c9c42a944
Merge pull request #4794 from nesquena/stage/4781-worklog-collapse
Release v0.51.609 — collapse the live Compact Worklog mid-stream (#4781)
2026-06-23 13:42:28 -07:00
nesquena-hermes
5a640cd3b7 release: stamp v0.51.609 (#4781 live worklog collapse) 2026-06-23 20:39:22 +00:00
nesquena-hermes
2d6b3c067f Merge branch 'peek-4781' into stage/4781-worklog-collapse
# Conflicts:
#	CHANGELOG.md
2026-06-23 20:27:38 +00:00
nesquena-hermes
d5b2b0e5d9
Merge pull request #4792 from nesquena/stage/4478-dom-recycle
Release v0.51.608 — recycle DOM nodes during virtual-scroll re-renders (#4346)
2026-06-23 13:18:12 -07:00
nesquena-hermes
b3d332c7a9 release: stamp v0.51.608 (#4346 DOM-node recycling in virtual-scroll) 2026-06-23 20:08:25 +00:00
nesquena-hermes
ca368cc166 Merge branch 'peek-4478' into stage/4478-dom-recycle 2026-06-23 20:07:56 +00:00
nesquena-hermes
f1eafdda4f
Merge pull request #4789 from nesquena/stage/4748-empty-skeleton
Release v0.51.607 — empty-profile loading skeleton (#4717)
2026-06-23 12:06:37 -07:00
nesquena-hermes
d3425a4ce5 release: stamp v0.51.607 (#4717 empty-profile loading skeleton) 2026-06-23 19:01:44 +00:00
nesquena-hermes
e617acfc79 test(#4748): stub _recordSessionProfileCount in the #4766 node harness
#4748 added a _recordSessionProfileCount() call inside _applySessionListPayload();
the pre-existing #4766 test isolates that function in node and must stub the new
helper (same pattern as the other stubbed helpers) or it ReferenceErrors. Not a
weakened assertion — the test still verifies old+new payload tab-count coverage.
2026-06-23 17:58:39 +00:00
Charles Bine
dd66640fae
feat(#484): configurable default view for JSON/YAML code blocks
The JSON/YAML tree viewer (#484) hardcoded its default: valid json/yaml
fenced blocks opened in Tree view at 10+ lines (`const showTree=lineCount>=10;`).
Make that default user-configurable while preserving current behavior.

- New settings (persisted via /api/settings -> settings.json):
  - structured_code_default_view: auto | on | off  (default auto)
  - structured_code_auto_tree_lines: int 1..1000    (default 10)
- ui.js: replace the hardcode with a sanitized, unit-testable decision
  helper _structuredCodeShowTree(mode, threshold, lineCount); Tree/Raw
  toggle, Raw <pre><code>, parse-failure fallback, and YAML lazy-load
  are unchanged.
- Appearance settings: 'JSON/YAML code blocks' select + 'Auto threshold
  lines' input (disabled outside auto mode); wired through the existing
  appearance-autosave and explicit-save paths; live re-render on change.
- boot.js seeds window globals; i18n labels added to all 13 locales.
- Default (auto + 10) reproduces the original >=10 behavior exactly.
2026-06-23 13:51:45 -04:00
nesquena-hermes
e89977d270 test(#4748): widen skeleton-flag slice to full _applySessionListPayload body (Codex gate)
#4748 added lines inside _applySessionListPayload() that pushed the
'_sessionListSkeletonActive = false;' assertion past the test's fixed 4000-char
window. Anchor the slice on the next function def (_mergeRenderSessionListOptions)
instead — robust to future additions. Assertion unchanged.
2026-06-23 17:47:43 +00:00
nesquena-hermes
a7eb7de83f Merge remote-tracking branch 'origin/master' into peek-4748
# Conflicts:
#	CHANGELOG.md
2026-06-23 17:43:38 +00:00
nesquena-hermes
46f5fb93fe
Merge pull request #4787 from nesquena/stage/4741-backend-caching
Release v0.51.606 — backend hot-path caching (profile-switch perf #4662 phase 2+3, #4741)
2026-06-23 10:39:11 -07:00
nesquena-hermes
f9a687d01d release: stamp v0.51.606 (#4662 phase 2+3 backend hot-path caching) 2026-06-23 17:27:06 +00:00
nesquena-hermes
18e252d59c test(#4741): update #4766 mock to accept the new redact_enabled kwarg
#4741 added redact_enabled= to _sidebar_session_response_item's call site
(routes.py:2199); the pre-existing #4766 test mocked it with a bare 'lambda row: row'
that rejects the kwarg -> full-suite TypeError. Mock now accepts the keyword-only
arg. Not a weakened assertion — the test still asserts bucket-count omission.
2026-06-23 17:17:17 +00:00
nesquena-hermes
50f7f7fcd3 test(#4741): add two #798 isolation regression guards (Opus gate hardening)
- env-change-with-unchanged-mtime must re-expand (proves the cache stores raw
  un-expanded YAML, not the expanded result -> no stale cross-profile expansion)
- no-cross-serve between two profile config paths (proves the parse cache is
  path-keyed). Both pass on the current impl; locks down the highest-risk
  cross-profile credential-bleed invariant per Opus's non-blocking note.
2026-06-23 17:13:22 +00:00
nesquena-hermes
235bfffaf0 Merge remote-tracking branch 'origin/master' into peek-4741
# Conflicts:
#	CHANGELOG.md
2026-06-23 17:06:17 +00:00
nesquena-hermes
d5f49392b3
Merge pull request #4786 from nesquena/gate/4782-sidebar-trim
Release v0.51.605 — trim hidden/empty rows from sidebar payload (#4775)
2026-06-23 10:01:39 -07:00
nesquena-hermes
337cd95e32 release: stamp v0.51.605 (#4775 trim hidden/empty sidebar payload rows) 2026-06-23 16:56:22 +00:00
nesquena-hermes
98e672551a Merge branch 'peek-4782' into gate/4782-sidebar-trim 2026-06-23 16:46:10 +00:00
nesquena-hermes
d613345887
Merge pull request #4785 from nesquena/stage/livestream-chat-scroll-4778-4777-4780
Release v0.51.604 — live-stream worklog scroll/dedup + mobile session-switch scroll (#4778, #4777, #4780)
2026-06-23 09:41:05 -07:00
nesquena-hermes
198e98ec74 release: stamp v0.51.604 (live-stream worklog scroll/dedup + mobile session-switch scroll) 2026-06-23 16:36:54 +00:00
nesquena-hermes
29ceed3a72 fix(#4778): gate deferred rAF re-restore on still-unpinned (Opus gate)
Opus caught a narrow timing race: if a reader re-pins between the scroll-rebuild
guard engaging and its deferred rAF firing, the stale re-restore would yank them
back off the bottom. Gate the re-restore on _messageUserUnpinned at rAF time; the
minHeight release still always runs. Normal single-render unpinned case unaffected.
2026-06-23 16:19:50 +00:00
Rod Boev
2504eb90d7 fix(#4755): honor profile default workspace on fresh sessions 2026-06-23 12:18:44 -04:00
nesquena-hermes
f4af6d8419 fix(#4778): scroll-rebuild guard must not reclassify a pinned follower as unpinned
Codex regression gate caught: the guard predicate keyed on a raw messagesEl.scrollTop>0,
so a pinned reader transiently at bottomDistance>250 mid-render (assistant body grows
before the anchor scene re-renders) got flipped to _messageUserUnpinned=true/_scrollPinned=false
and lost auto-follow. Require an explicit non-follow signal (_messageUserUnpinned || _scrollPinned===false)
instead. Updated the existing guard test to a genuine unpinned reader + added a pinned-large-growth
regression. Co-authored-by: franksong2702
2026-06-23 16:17:01 +00:00
nesquena-hermes
c6d633fd2c Merge branch 'peek-4777' into stage/livestream-chat-scroll-4778-4777-4780
# Conflicts:
#	CHANGELOG.md
2026-06-23 16:09:00 +00:00
nesquena-hermes
a349b0b7e8 Merge branch 'peek-4780' into stage/livestream-chat-scroll-4778-4777-4780 2026-06-23 16:08:31 +00:00
nesquena-hermes
343cb0737e Merge branch 'peek-4778' into stage/livestream-chat-scroll-4778-4777-4780 2026-06-23 16:08:30 +00:00
Rod Boev
165433fea6 Keep legacy sidebar tests aligned with visible-row filtering 2026-06-23 11:56:25 -04:00
Rod Boev
75016c99f6 test(sidebar): align legacy list checks with visible-session filtering (#4775) 2026-06-23 11:46:37 -04:00
Frank Song
f653b1b8d9 feat: allow live worklog summary collapse 2026-06-23 23:22:16 +08:00
Hermes Agent
ba6349bdcb fix: reset scroll state on session switch to prevent stale unpin blocking scroll-to-bottom 2026-06-23 17:19:50 +02:00
Rod Boev
bd72c785b5 fix(sidebar): reject cached fallback rows from the wrong hidden-filter mode (#4775) 2026-06-23 11:13:33 -04:00
Frank Song
4c8e88ab2d fix: dedupe live compact worklog process prose 2026-06-23 23:03:04 +08:00