Repository navigation
feat(mobile): native chat header with a top-to-bottom message list - #2344
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
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 |
Convert the chat FlatList from inverted to oldest-first on iOS and Android. useFollowLatest now measures the distance from the end, pins streaming growth with one non-animated scroll per frame, keeps maintainVisibleContentPosition on for prepends, and reveals the list only after it has settled at the end. Older history loads from onStartReached, the markdown viewport measures a non-inverted content view, and the working status and history footer swap ends. The chat uses the system stack header: transparent with the automatic scroll edge effect on iOS (no header background colour, no glass on bar items), an opaque Material top app bar on Android. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
Update DESIGN.md's Chat header, list and code-rule bullets and the ios-hig skill's chat edge-effect note, and add the change fragment (placeholder PR number 0000). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
…yboard gap - Header: on iOS the title chip (avatar + name, no state dot) is a native leading bar item beside Back, separated by a zero-width spacing item so UIKit draws a round Back and its own glass capsule; the computer button is a native trailing item and headerTitle is empty. Android keeps a Material top app bar with the chip at the start. - Follow latest: only a drag, the status-bar scroll to top or an explicit hold leave the newest message. Layout-driven scroll events (the automatic inset adjustment, MVCP corrections, batch growth) no longer release following, which left the chat opened at the oldest message. - iOS keyboard frame: the keyboard already covers the home indicator, so take the composer's safe-area padding back out of the keyboard offset. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
010444d to
685b454
Compare
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… drag to dismiss - The default and colour chat backgrounds are the frame's backgroundColor instead of a view in front of the list, so the message list is in the screen's first-subview chain, where UIKit and React Native Screens look for the content scroll view of the header's soft scroll edge. - Cancel UIKit's automatic home-indicator bottom inset on the list while the keyboard is closed; the composer height already carries it. - Dismiss the keyboard by dragging the list: interactive on iOS, on-drag on Android. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
… to dismiss Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
…DM rest Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…at header The computer button and the first-screen back control are native bar buttons with SF Symbols, and the title chip uses the system label colour, so dark mode with Reduce Transparency keeps them legible. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
…-07shzq-native-chat
… and DM header Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1
Captured on the Xiaomi phone (Android 16, HyperOS 3, zh-CN) running a Release build of main d220792, light and dark: the Material chat composer with the keyboard open, the chat header, the Unpair confirmation dialog (cancelled, nothing unpaired) and the message actions menu. The same set is filed under each PR. Status bar, computer names and the keyboard suggestion strip are redacted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Android phone result: PASS (Xiaomi, Android 16 / HyperOS 3, isolated QA Host, deepseek-v4.1-flash), release build of main d220792 Screenshots: 2344-android-hig/phone (commit 73da8de): Generated by Claude Code |
Requested by Vain · project thread
Why the change
Before: the chat page hides the system header and draws its own frosted header over an inverted list. On iOS 26, a transparent native header dimmed the whole inverted list, so the page could not use the system's soft scroll edge.
After: chat uses the native navigation header.
Vain chose the native header ("现在开原型") and approved it from the screenshots ("原生顶栏效果很不错"). The reference is Grok's chat header. Refs #2333.
Special things to note
pnpm lint, mobiletscandoxfmtpass, andvitest apps/mobile/testreports 872 passed, 9 skipped.labelcolour. The re-shoot on 3e5fc42 passes: "Design Room" and the computer icon are dark on the light items. The DM header shows the computer icon alone, with no text label.Change outline
conversation-screen.tsxcustomitem.macwindowbutton.chevron.leftbutton.headerBlurEffect: systemChromeMaterial.follow-latest.tsonStartReachedandmaintainVisibleContentPositionhandle older history.markdown-viewport.ts: the inverted formula is removed.keyboardVerticalOffsetno longer counts the home-indicator padding twice.useListBottomSafeAreacancels UIKit's extra bottom inset, so the end of the list has no 34pt dead zone.ChatHeaderand the frosted pills.chat-title.tsx/channel-title.tsx: these are plain bar items, with systemlabeltext on iOS.iOS 26 Simulator screenshots
🤖 Generated with Claude Code
https://claude.ai/code/session_01Pfa9gqyZUnwgh2fwSFVQQ1