Skip to content

v0.51.187: workspace-preview persistence + scroll-intent window (batchG) - #3271

Merged
nesquena-hermes merged 5 commits into
masterfrom
release/stage-batchG
May 31, 2026
Merged

nesquena-hermes merged 5 commits into
masterfrom
release/stage-batchG

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

v0.51.187 — Release FG (stage-batchG)

Phase-2 batch of 2 contributor PRs, reviewed + fixed + dual-gated end-to-end.

Included PRs

PR Title Author Notes
#3262 Fix workspace preview closing + stale content on chat completion @pamnard loadDir('.') on stream done now preserves an open preview (was always clearPreview()); reloads the open file only when a write/edit tool touched that path during the turn; skips reload while the preview has unsaved local edits. Pre-release Codex gate caught that _normalizeArtifactPath() didn't canonicalize ./ / ~/ prefixes (so ./foo.md missed a file-tree-opened foo.md → stale preview) — fixed inline + pinned with a node-driven regression test.
#3250 Extend upward scroll-intent window 450ms → 2000ms @emanon312 Stops streaming snap-back when a user scrolls up and pauses to read; absorbed with an added regression test pinning the constant + downward-repin independence.

Gate results

  • pytest (-p no:xdist, sequential): 7051 passed, 0 failed. (Also fixed a stale openFile() signature anchor in the pre-existing test_issue2823_large_markdown_preview.py that Fix workspace preview closing and stale content on chat completion #3262's openFile(path, opts={}) extension broke.)
  • Opus advisor: APPROVE — verified unsaved-edits preservation, stale-preview reload, directory-nav clearPreview, and stream auto-follow are all non-regressed.
  • Codex regression gate: SAFE TO SHIP — after the inline _normalizeArtifactPath() canonicalization MUST-FIX was applied and re-verified.
  • Pre-Opus gate: clean (ESLint runtime guard CLEAN, node -c, no merge markers, [Unreleased] empty).

Note: PR #3268 (repaired-sidecar order) was originally staged in this batch but dropped after the Codex gate caught a confirmed message-loss regression (legitimately-repeated user turns dropped); it's held with the empirical repro + fix guidance.

#3250 / #3262 absorbed (recommitted with Co-authored-by) → closed manually with credit post-merge.

emanon312 and others added 5 commits May 31, 2026 16:53
…snap-back

Increase MESSAGE_UPWARD_INTENT_MS from 450ms to 2000ms to fix a race
condition where the user scrolls up during streaming, pauses to read
for >450ms, and then gets snapped back to the bottom.

The root cause: after the 450ms upward-intent window expires, DOM layout
changes from the streaming markdown parser (smd), tool card insertions,
or code re-highlighting can trigger scroll events that the handler no
longer recognizes as user-initiated. When the resulting position lands
inside the 250px near-bottom zone for two consecutive samples, the
hysteresis counter re-pins (_scrollPinned=true) and the next streaming
token's scrollIfPinned() call forces scrollTop to the bottom.

With a 2-second window, the user's upward intent persists through typical
streaming DOM churn. Downward scrolling and the scroll-to-bottom button
are unaffected — movedUp requires top < _lastScrollTop-2 which is false
for downward movement regardless of the intent timeout.

Refs: #1360 (macOS momentum protection), #1731 (direction-aware unpin)
Background file-tree refresh after a response must not call clearPreview();
preserve the open preview while still reloading the directory listing.
Track write/edit tool paths per turn, refresh the open preview on
tool_complete and after preservePreview loadDir on stream done, without
closing preview for unrelated responses or wiping unsaved local edits.
…3262

- Pin MESSAGE_UPWARD_INTENT_MS>=2000ms + intent-helper-uses-constant +
  downward-repin-independence (#3250, co-authored emanon312).
- Update the #2823 large-markdown-preview test's openFile() signature
  anchor for #3262's openFile(path, opts={}) extension.

Co-authored-by: emanon312 <emanon312@users.noreply.github.com>
Pre-release Codex regression gate caught that _normalizeArtifactPath()
did not strip ./ or ~/ prefixes, so a tool arg recorded as ./foo.md did
not match a file-tree-opened foo.md in _turnMutatedPreviewPaths — the
open preview was left stale after an agent edit via a ./-prefixed path.
Strip ~/ and leading ./ before ignore/membership checks. Node-driven
regression test pins foo.md == ./foo.md == ~/foo.md and confirms the
existing ignore-dir / URL / empty rejections still hold.

Co-authored-by: Pamnard <pamnard@users.noreply.github.com>
@nesquena-hermes
nesquena-hermes merged commit 556f5d1 into master May 31, 2026
10 checks passed
@nesquena-hermes
nesquena-hermes deleted the release/stage-batchG branch May 31, 2026 17:10
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
v0.51.187: workspace-preview persistence + scroll-intent window (batchG)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants