Repository navigation
fix: keep new messages visible after sending (follow-state sync) - #715
Conversation
…port tracking logic
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the diagnosis is sound and removing
followingfrom the deps is the right minimal fix; a couple of rough edges inline.
Reviewed changes
Reviewed the single commit aa0fbfdf across both changed files, focused on the viewport-to-following sync and the prop removal.
followingno longer re-synced from its own changes — the effect inevent-window-controls.tsxnow keys offisAtBottomtransitions only, so a programmaticjumpToLatest()is no longer reverted while the viewport is off-bottom.followingprop removed fromTailFollowIndicator— theconversation-view.tsxcall site no longer destructures or passes it;followingis still returned byuseConversationEventWindowand used to gate live-buffer merging andnewBelow.
ℹ️ No regression test for the follow-state revert
The send-while-scrolled-up case isn't covered anywhere. use-conversation-event-window.test.tsx drives setFollowing directly and never renders TailFollowIndicator, so it can't catch an effect reverting jumpToLatest(). Because the failure is a silent withhold rather than an error, a small component test that stubs useThreadViewport with a mutable isAtBottom would pin the behavior.
Technical details
# Add a TailFollowIndicator regression test
## Affected sites
- `apps/web/src/components/projects/agents/event-window-controls.tsx:160-164` — the effect that regressed.
- `apps/web/src/components/projects/agents/use-conversation-event-window.test.tsx` — exercises the hook only, not the viewport-to-`following` mirror.
## Required outcome
- A test that starts with `isAtBottom: false`, calls `setFollowing(true)` (what `onNew` does), and asserts `following` stays `true` until `isAtBottom` actually changes.
## Suggested approach (optional)
- Mock `useThreadViewport` from `@assistant-ui/react` to read a mutable store value, render `TailFollowIndicator` with a spy `setFollowing`, and assert the spy is not called with `false` after the jump.deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review (aa0fbfdf) — the single new commit 3569e8b across the three PR files — focused on the new jump-driven scroll path.
jumpToLatest()now signals the view —useConversationEventWindowexposes ajumpCountthat increments on everyjumpToLatest(), threaded throughconversation-view.tsxintoTailFollowIndicator.- Sends now scroll to the tail — an effect in
TailFollowIndicatorcallsscrollToBottom({ behavior: "auto" })wheneverjumpCountchanges, and the pill's inline scroll moved into that same effect, so theonNewsend path no longer leaves the viewport behind. A ref seeded with the initial count keeps the mount from scrolling. - Redundant guard dropped — the
lastAtBottomRefcheck was removed from theisAtBottommirror effect, leaving the one-line dependency fix.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
…d fake bridge integration
There was a problem hiding this comment.
Important
The new e2e regression spec cannot pass as written: it seeds follow-up messages into a conversation that is still queued/running, which the API rejects with CONVERSATION_BUSY.
Reviewed changes
Reviewed the delta since the prior pullfrog review (3569e8b) — the single new commit 8a46def across six files.
- Added a new e2e scenario for send-while-scrolled-up —
conversation-follow.spec.tsplus its feature file exercise the regression through the UI against a fake ACP bridge. - Extracted
FakeBridgeinto a shared helper — moved verbatim fromacp-agent-conversations.spec.tstotests/helpers/fake-bridge.ts; the original spec now imports it, with no behavior change. - Added component tests for
TailFollowIndicator— mount-no-scroll, jump-keeps-following while off-bottom, viewport→followingmirror, and click-scrolls-once, directly pinning the regression. - Clarified the mirror/jump comments — comment-only edit in
event-window-controls.tsx, no logic change.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review (8a46def) — the single commit 6226150 across two e2e files — focused on whether the seeding still races the ACP busy guard.
- Added
FakeBridge.sendEvent— streams a{ type: "event", payload: { content: { type: "text", text } } }message so the spec can play the daemon's ownuser_message/agent_message_chunkevents. - Completed each seeded turn before continuing — the loop now consumes
start_turn, streams the user message and reply, reportsfinished, and polls the conversation out ofrunningbefore the next POST, which clears the priorCONVERSATION_BUSYblocker. The final composer send also lands on a terminal conversation, andSendChatMessageresumes ACP conversations in place, so the bridge still receivesstart_turnfor the seededid.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Problem
After sending a message in a conversation, the new user message and the agent's reply sometimes stayed hidden until the page was reloaded.
Cause
useConversationEventWindowwithholds newly arrived events whilefollowingisfalse.TailFollowIndicatormirrored the thread viewport'sisAtBottomintofollowingin an effect that also depended onfollowing. When sending a message callsjumpToLatest()while the viewport is not yet at the bottom,followingflipped totrueand the effect set it straight back tofalse. The sender's message and the reply were then withheld, and the optimistic copy of the message expired after 60s.Changes
event-window-controls.tsx: syncfollowingonly whenisAtBottomactually changes (tracked with a ref), so a programmaticjumpToLatest()is no longer undone.followingprop fromTailFollowIndicatorand its call site inconversation-view.tsx.Testing
tsc -bis clean.vitest run src/components/projectspasses (442 tests).