Repository navigation
Native chat keeps scrolling to bottom - #20898
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThe change propagates transcript visibility from chat views to Merge Risk: ⚪ Minimal · up to The available review context identifies no concrete merge-blocking behavior risk. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description includes the required headings but provides no substantive content. The ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Notes, and Checklist sections remain incomplete. Resolution Complete each required section. Add a high-level explanation, detailed change summary, rationale, a linked issue after “Fixes #”, visual proof or
✨ Finishing Touches📝 Generate docstrings
Warning Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — the visibility gating and the reveal-time offset restore are both sound. One test-fidelity note inline.
Reviewed changes
- Auto-scroll suppressed while hidden —
NativeChatMessageListthreads a newisVisibleprop into both transcript hooks;scrollToEndandsyncScrollStateearly-return while the pane is hidden, so a retaineddisplay:nonepane can no longer be yanked to the bottom by appends it never paints. - Detached offset restored on reveal — the scroll hook records the reader's offset while detached and replays it on the
false→truevisibility edge through the virtualizer's newrestoreScrollOffset, preserving the reading position across a hide/show. A reader who was still following is re-pinned to the end instead. - Call sites —
NativeChatResolvedViewandNativeChatStructuredSessionboth forward their pane visibility; these are the only two production renderers of the list, so the prop'struedefault is safe. - Tests — a new
use-native-chat-transcript-scrollunit test, three windowing cases, anisVisibleknob on the sharedstubLayoutharness, and an e2e hidden-update spec.
I traced scrollToOffset/getOffsetForAlignment in the pinned @tanstack/[email protected]: it writes the offset verbatim into scrollTop, so passing the captured raw scrollTop is consistent with the existing retired-measurement compaction call. No cross-session stale-offset issue was reachable either — NativeChatResolvedView keeps the list mounted across a session rebind, but syncScrollState re-records the offset as soon as the new content settles.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
63723bb to
3338b38
Compare
There was a problem hiding this comment.
ℹ️ No critical issues — one dead prop in the extracted status component.
Reviewed changes
Since the prior pullfrog review, the branch was rebased and one refactor commit landed (3338b38). Reviewed the delta:
- Extracted the growth/append windowing suite — the
transcript follow ownership across growth and appendsblock moved verbatim into a newNativeChatMessageList.growth-windowing.test.tsx, leaving the hidden-scroll-root cases (plus sharedpaint/settleVirtualizerhelpers) inNativeChatMessageList.windowing.test.tsx. - Extracted
NativeChatStructuredSessionStatus— the error line and background-tasks strip were pulled out ofNativeChatStructuredSessioninto a new always-mounted component that now owns thestopping/expandedstate; the parent keeps renderingNativeChatDeliveryRetryandNativeChatLaunchRetryitself. - Made the hidden-pane stub model
display:none—stubLayout's retainedscrollTopstorage is now dropped on the visible→hidden edge, so a reveal can only read a reader's place back through production'srestoreScrollOffset;list()gained anisVisibleknob. - Added a visibility-forwarding test —
NativeChatStructuredSession.test.tsxnow asserts the pane'sisVisiblereaches the message list for both values.
I re-checked the prior inline note about reveal assertions not discriminating: with the restoreScrollOffset call removed, both hidden-update windowing cases now fail (expected +0 to be 2000), where the old harness left them green. The extracted suite is otherwise a faithful move, and all 53 tests across the touched files pass locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior pullfrog review (3338b38), one refactor commit landed (5aa5a4d), reviewed here:
- Removed the unreachable retry branch from
NativeChatStructuredSessionStatus— dropped theretryableOutboxEntry/onRetryprops and the retry markup they gated. That branch could never render (its only call site passednull) and duplicatedNativeChatDeliveryRetry, which the parent still mounts atNativeChatStructuredSession.tsx:289, so delivery retry is untouched. - Left the status component's
stopping/expandedstate in place — it remains inNativeChatStructuredSessionStatus, which the parent mounts unconditionally, so its state still survives the transient unmounts of the inner tasks strip exactly as the moved-out comment described.
The delta is a pure 35-line deletion across two files with no test or behavior surface; I verified every caller and confirmed no reference to the removed props remains.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Stop following new messages to bottom when the chat view is not visible (e.g., in an inactive tab). Restore scroll position when the transcript becomes visible again.
When a reader scrolls away from the latest messages and the chat tab becomes hidden, save their scroll position. If messages arrive while the tab is hidden, don't auto-scroll. When the tab is revealed, restore the saved offset instead of jumping to latest, preserving their reading context across hide/reveal cycles.
Move transcript growth/append test suite to dedicated growth-windowing.test.tsx file for better organization. Extract status rendering logic (errors, retry, background tasks) from NativeChatStructuredSession into NativeChatStructuredSessionStatus. Fix scroll offset preservation in test harness when transcript visibility toggles.
Remove unused retry functionality for failed message delivery from the native chat status component. The retryableOutboxEntry state is no longer managed, so the retry button and associated handling can be safely removed.
5aa5a4d to
4885f4a
Compare
main's tip fails `typecheck` and `static analysis` on `NativeChatMessageList.windowing.test.tsx`: #20898 moved the growth/append suite into its own file and took the last use of `NativeChatMessage` with it, leaving the import. Every open PR reds both jobs through the merge ref, so this rides the first branch that has to merge main in.
* feat(session-search): add ranked history panel search and consent * test: wait for initial session indexing before refreshing results * fix(lint): drop the type import #20898 left behind in the windowing test main's tip fails `typecheck` and `static analysis` on `NativeChatMessageList.windowing.test.tsx`: #20898 moved the growth/append suite into its own file and took the last use of `NativeChatMessage` with it, leaving the import. Every open PR reds both jobs through the merge ref, so this rides the first branch that has to merge main in.
* fix(native-chat): prevent auto-scroll when transcript is hidden Stop following new messages to bottom when the chat view is not visible (e.g., in an inactive tab). Restore scroll position when the transcript becomes visible again. * fix(native-chat): preserve reader scroll offset when transcript is revea When a reader scrolls away from the latest messages and the chat tab becomes hidden, save their scroll position. If messages arrive while the tab is hidden, don't auto-scroll. When the tab is revealed, restore the saved offset instead of jumping to latest, preserving their reading context across hide/reveal cycles. * refactor(native-chat): extract growth-append tests and status component Move transcript growth/append test suite to dedicated growth-windowing.test.tsx file for better organization. Extract status rendering logic (errors, retry, background tasks) from NativeChatStructuredSession into NativeChatStructuredSessionStatus. Fix scroll offset preservation in test harness when transcript visibility toggles. * refactor(native-chat): remove retry UI Remove unused retry functionality for failed message delivery from the native chat status component. The retryableOutboxEntry state is no longer managed, so the retry button and associated handling can be safely removed.
…lyai#20580) * feat(session-search): add ranked history panel search and consent * test: wait for initial session indexing before refreshing results * fix(lint): drop the type import stablyai#20898 left behind in the windowing test main's tip fails `typecheck` and `static analysis` on `NativeChatMessageList.windowing.test.tsx`: stablyai#20898 moved the growth/append suite into its own file and took the last use of `NativeChatMessage` with it, leaving the import. Every open PR reds both jobs through the merge ref, so this rides the first branch that has to merge main in.

ELI5
What Changed
Why
Linked Issue
Fixes #
Visual Proof
Testing
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)