From 521c870a05a928a6dcb8abde64859c5bc2a5e538 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Sat, 23 May 2026 14:18:56 -0500 Subject: [PATCH] docs(tui): clarify scrollbox subscription signals Document that ScrollBox subscribers are notified for renderer-computed viewport and content bound changes, not only imperative scrolls. --- .../packages/hermes-ink/src/ink/components/ScrollBox.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx b/ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx index 15e896cb9c5..4f2604be0ec 100644 --- a/ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx +++ b/ui-tui/packages/hermes-ink/src/ink/components/ScrollBox.tsx @@ -48,10 +48,10 @@ export type ScrollBoxHandle = { */ isSticky: () => boolean /** - * Subscribe to imperative scroll changes (scrollTo/scrollBy/scrollToBottom). - * Does NOT fire for stickyScroll updates done by the Ink renderer — those - * happen during Ink's render phase after React has committed. Callers that - * care about the sticky case should treat "at bottom" as a fallback. + * Subscribe to scroll viewport changes. Fires for imperative scroll changes + * (scrollTo/scrollBy/scrollToBottom) and for renderer-computed scroll bounds + * changes such as content growth or terminal resize. Callers use this to + * keep virtualized ranges aligned with the currently visible viewport. */ subscribe: (listener: () => void) => () => void /**