mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-01 07:01:41 +00:00
test(tui): clarify virtual history resize snapshot
Update the resize regression and comments so the test specifically guards viewport-height changes in the virtual-history snapshot key.
This commit is contained in:
parent
cc61e3be49
commit
d1ad919a44
1 changed files with 3 additions and 5 deletions
|
|
@ -186,11 +186,9 @@ export function useVirtualHistory(
|
|||
}, [scrollRef])
|
||||
|
||||
// Quantized snapshot: same-bin scrolls (most wheel ticks) produce the same
|
||||
// number → React.Object.is short-circuits the commit entirely. sticky state
|
||||
// is folded in via the sign bit so sticky→broken transitions also trigger.
|
||||
// Uses the TARGET (committed + pendingDelta), not committed scrollTop, so
|
||||
// scrollBy notifications immediately remount for the destination before
|
||||
// Ink's drain frames need the children.
|
||||
// key → React.Object.is short-circuits the commit entirely. The key includes
|
||||
// sticky state, target scroll position, and viewport height so resize-only
|
||||
// changes still recompute the mounted transcript window.
|
||||
const subscribe = useCallback(
|
||||
(cb: () => void) => (hasScrollRef ? scrollRef.current?.subscribe(cb) : null) ?? NOOP,
|
||||
[hasScrollRef, scrollRef]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue