v0.51.187: workspace-preview persistence + scroll-intent window (batchG) - #3271
Merged
Merged
Conversation
…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>
This was referenced May 31, 2026
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.51.187 — Release FG (stage-batchG)
Phase-2 batch of 2 contributor PRs, reviewed + fixed + dual-gated end-to-end.
Included PRs
loadDir('.')on streamdonenow preserves an open preview (was alwaysclearPreview()); 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.mdmissed a file-tree-openedfoo.md→ stale preview) — fixed inline + pinned with a node-driven regression test.Gate results
-p no:xdist, sequential): 7051 passed, 0 failed. (Also fixed a staleopenFile()signature anchor in the pre-existingtest_issue2823_large_markdown_preview.pythat Fix workspace preview closing and stale content on chat completion #3262'sopenFile(path, opts={})extension broke.)_normalizeArtifactPath()canonicalization MUST-FIX was applied and re-verified.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.