Skip to content

Fix FlowChat tail-follow transitions and delayed shrink jumps - #1908

Merged
wsp1911 merged 2 commits into
GCWing:mainfrom
wsp1911:dev2
Jul 30, 2026
Merged

Fix FlowChat tail-follow transitions and delayed shrink jumps#1908
wsp1911 merged 2 commits into
GCWing:mainfrom
wsp1911:dev2

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improves FlowChat viewport stability across pinned-turn handoff, smooth tail follow, animated card collapse, and delayed virtualizer measurements.

Fixes #

Type and Areas

Type:

Regression fix, performance/stability, test, docs

Areas:

Web UI / FlowChat

Motivation / Impact

FlowChat could fail to transition from a pinned user message into tail follow, visibly jump during smooth follow, or drop when Virtuoso committed a delayed item shrink after collapse protection had been released.

This change:

  • Makes pinned-to-tail handoff depend on real natural-tail geometry.
  • Uses one RAF writer for smooth streaming follow.
  • Detects strict browser shrink-clamp signatures and restores the pre-clamp viewport synchronously.
  • Keeps retained collapse protection valid across subsequent geometry changes without creating per-event timers.
  • Preserves user-scroll and non-clamp behavior.

Verification

  • pnpm run type-check:web
  • pnpm run lint:web
  • pnpm --dir src/web-ui run test:run src/flow_chat/components/modern/FlowChatViewportCoordinator.test.ts src/flow_chat/components/modern/useFlowChatFollowOutput.test.tsx src/flow_chat/components/modern/VirtualMessageList.session-boundary.test.tsx
  • Result: 68 tests passed
  • git diff --cached --check

Reviewer Notes

  • The late-shrink recovery is guarded by physical-bottom geometry, stable viewport height, active streaming tail follow, and absence of user scroll intent.
  • FlowChat diagnostics remain controlled by the existing diagnostic switch.
  • No Virtuoso fork or new per-item observers were introduced.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

wsp1911 added 2 commits July 31, 2026 00:26
- Revert the streamed line-growth smoothing introduced in fa6a727.
- Fix the transition from new-turn pinning to tail-follow mode.
- Prevent severe viewport flickering during streamed output.
- Coordinate pinned-turn handoff with natural viewport-tail geometry.
- Replace competing follow scroll writes with a single smooth RAF loop.
- Recover delayed virtualizer shrink clamps through viewport transactions.
- Preserve collapse anchors across late measurements with generation-based quiet settlement.
- Add regression coverage and document FlowChat scroll stability rules.
@wsp1911
wsp1911 merged commit ae7df95 into GCWing:main Jul 30, 2026
7 checks passed
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.

1 participant