fix(mobile): ChatScreen 加 KeyboardAvoidingView 防 iOS 软键盘盖 Composer - #1746
Merged
Conversation
iOS 软键盘弹出时盖住底部 Composer 输入框,用户无法看到正在打字的内容与发送态。用 KeyboardAvoidingView behavior=padding 包裹 ChatScreen 主布局,Android 不设 behavior(走原生 windowSoftInputMode)。 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
|
Caution Review failedAn error occurred during the review process. Please try again later. 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
移动端 ChatScreen 底部是 Composer(TextInput),iOS 软键盘弹出会盖住输入框,无法看到正在打字的内容/发送态。
KeyboardAvoidingView/Platform.OS在 app/mobile-rn/src 零命中。变更
app/mobile-rn/src/screens/ChatScreen.tsx:ChatScreen 主布局从<View>改为<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : undefined}>,iOS 软键盘弹出时 Composer 上移可见;Android 不设 behavior(走原生windowSoftInputMode)。证据
real_tested=false:typecheck + 351 单测全绿;未在真机/模拟器验证键盘交互。corepack pnpm --filter agenthub-mobile-rn typecheck(clean)+corepack pnpm --filter agenthub-mobile-rn test(351 passed)全绿。关联
审计 P0-3:mobile 全栈缺 KeyboardAvoidingView。