fix(happy-app): web chat scroll direction inverted#1048
Conversation
…irection inverted
b72b419 to
b369e56
Compare
Proof — wheel direction now correct on webThe bug: with Side-by-side synthetic demo of the two CSS approaches scrolled with Captured
Capture detailsSynthetic side-by-side because the relevant bug is purely about CSS-level scroll handling — the diff is 1 isolated component, no app-wide state involved. Reproduction page: two |
4880e7a to
0674275
Compare
0674275 to
be03956
Compare
Add ChatList.web.tsx that uses CSS `flex-direction: column-reverse`
instead of React Native's `inverted={true}` FlatList. On web, inverted
FlatList applies `transform: scaleY(-1)` which reverses all scroll
interactions including middle-click auto-scroll and trackpad gestures.
`column-reverse` provides the same visual layout (newest messages at
bottom, scroll up for history) using native browser layout, so all
scroll interactions work correctly.
Fixes slopus#793
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
be03956 to
253c229
Compare

Closes #793.
The bug: On web, mouse wheel, trackpad, and middle-click auto-scroll all scroll in the wrong direction. React Native Web renders
inverted={true}on the FlatList viatransform: scaleY(-1), which flips the entire scroll container — every scroll interaction is mirrored, andmaintainVisibleContentPositionis silently ignored. This PR fixes that by adding a web-onlyChatList.web.tsxthat uses CSSflex-direction: column-reverse(no transform), which gives the same visual layout (newest at bottom) using native browser flexbox; the messages array is already newest-first, matchingcolumn-reverserender order. NativeChatList.tsxis untouched — Expo/Metro auto-resolves.web.tsxfor web builds (same pattern asMultiTextInput.web.tsx,Shaker.web.tsx).Proof
Before / after recordings (mouse wheel + middle-click + trackpad two-finger): video pending — will attach before requesting human review per CONTRIBUTING.md.
Scope
ChatList.web.tsx, +60 LOC), zero existing code modified.