fix(ui-tui): clear sticky prompt when follow snaps to bottom

Renderer-driven follow-to-bottom was restoring the viewport to the tail without notifying ScrollBox subscribers, so StickyPromptTracker could stay stale-visible. Notify on render-time scroll/sticky changes and treat near-bottom as bottom for prompt hiding.
This commit is contained in:
Brooklyn Nicholson 2026-04-23 14:19:32 -05:00
parent c8ff70fe03
commit aa47812edf
4 changed files with 15 additions and 2 deletions

View file

@ -761,6 +761,7 @@ function renderNodeToOutput(
// active text selection by the same delta (native terminal behavior:
// view keeps scrolling, highlight walks up with the text).
const scrollTopBeforeFollow = node.scrollTop ?? 0
const stickyBeforeFollow = node.stickyScroll
const sticky = node.stickyScroll ?? Boolean(node.attributes['stickyScroll'])
@ -863,6 +864,10 @@ function renderNodeToOutput(
scrollDrainNode = node
}
if ((node.scrollTop ?? 0) !== scrollTopBeforeFollow || node.stickyScroll !== stickyBeforeFollow) {
node.notifyScrollChange?.()
}
scrollTop = clamped
if (content && contentYoga) {