Skip to content

fix(web): show agent messages immediately regardless of scroll position - #228

Merged
tiann merged 1 commit into
tiann:mainfrom
ElderDoge:fix/web-agent-message-pending-delay
Feb 27, 2026
Merged

fix(web): show agent messages immediately regardless of scroll position#228
tiann merged 1 commit into
tiann:mainfrom
ElderDoge:fix/web-agent-message-pending-delay

Conversation

@ElderDoge

Copy link
Copy Markdown
Contributor

When the user was scrolled up from the bottom, all incoming messages (including AI responses) were queued in the pending buffer and only flushed when the user scrolled back down or sent a new message.

This caused AI replies to appear delayed by N turns: each user message sent would flush one pending AI response rather than triggering a real response, creating the illusion that the AI was lagging 3 sentences behind.

Fix: in ingestIncomingMessages, bypass the atBottom gate for agent messages so they are always merged into the visible window immediately. User messages from other clients remain in the pending queue to avoid disrupting scroll position during history review.

#226

When the user was scrolled up from the bottom, all incoming messages
(including AI responses) were queued in the pending buffer and only
flushed when the user scrolled back down or sent a new message.

This caused AI replies to appear delayed by N turns: each user message
sent would flush one pending AI response rather than triggering a real
response, creating the illusion that the AI was lagging 3 sentences behind.

Fix: in ingestIncomingMessages, bypass the atBottom gate for agent
messages so they are always merged into the visible window immediately.
User messages from other clients remain in the pending queue to avoid
disrupting scroll position during history review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • None.

Summary

  • No issues found in added/modified lines. Residual risk: scroll + pending UX; manual verify when not at bottom.

Testing

  • Not run (automation).

@tiann
tiann merged commit da71d23 into tiann:main Feb 27, 2026
2 checks passed
SeeFlowerX pushed a commit to SeeFlowerX/hapi that referenced this pull request Apr 1, 2026
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.

2 participants