feat(tips): open post-tip chats with the keyboard up - #524
Merged
Conversation
After completing a tip, the chat now opens with the message field focused and the keyboard raised. Added a sibling .tipConversationWithKeyboard destination (matching the currencyInfoForDeposit pattern) used only by the post-tip navigation; the tip list and push-notification opens keep using .tipConversation and stay keyboard-closed. The openKeyboard flag threads down to the composer, which requests focus once on appear after a short delay so the push transition settles first. Mirrors Android #1165.
bmc08gt
added a commit
that referenced
this pull request
Jul 27, 2026
…el (#523) * fix(tips): pad tip code payload reserved bytes with a non-zero sentinel The tip payload left the reserved trailing bytes (17-19) zero. KikCodes.decode strips trailing zero bytes, so a frame whose reserved region (or user id tail) is zero comes back short. Fill the reserved region with incrementing digits (1, 2, 3) on encode so the frame always ends non-zero and round-trips at full length. Decoding still re-pads for legacy zero-trailing frames. Mirrors Android #1163. * fix(chat): restore dropped comma when merging code/main into the tip payload branch The #524 (focusOnAppear) and #525 (isTipDm) conversation-bar params were integrated on main without a separator between them, leaving ConversationScreen and ChatScreenRepresentable non-compiling. Add the missing commas so the tree builds.
bmc08gt
added a commit
that referenced
this pull request
Jul 27, 2026
(#527) The post-tip open (#524) set the composer's SwiftUI @focusstate on appear. That updates SwiftUI's focus state — the caret and the isComposing bar-morph — but never presents the system keyboard, because the composer is hosted inside a nested UIHostingController bridged through UIKit (ChatScreenRepresentable → ChatScreenViewController). A programmatic @focusstate doesn't cross that hosting boundary; only a real becomeFirstResponder does. Taps worked because a tap is a real UIKit responder event. Bumping the .task delay would never have helped — every working focus-on-appear in the app is a pure-SwiftUI screen. Raise the keyboard from the UIKit layer that already owns keyboard behavior: ChatScreenViewController.viewDidAppear (the point the push transition has settled) calls becomeFirstResponder() on the composer field, guarded so it's a strict once-per-open. Removes the @FocusState/.task focus hack and its plumbing through ConversationBottomBar/ConversationComposer. The isComposing morph still works — when the keyboard rises SwiftUI syncs @focusstate and the existing onChange(of: isFocused) fires.
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.
Ports Android #1165 (part 2) to iOS.
What & why
After completing a tip, the chat now opens with the message field focused and the keyboard up. Every other entry point (tips list, deeplinks, push notifications, contact DMs) stays keyboard-closed.
tipConversationWithKeyboard(ConversationID)— modelled on the existingcurrencyInfoForDepositvscurrencyInfopattern, so the trace stays distinct and the ordinarytipConversationopens are untouched. Only the post-tip navigation (TipFlow.finish) uses it.openKeyboardflag threadsConversationScreen → ChatScreenRepresentable → ConversationBottomBar → ConversationComposer, which requests focus once on appear (.task) after a short delay so the push transition settles first (focus requested mid-transition is dropped and the keyboard never rises).Testing
Flipcashapp scheme compiles clean (iPhone 16 Pro sim).