Skip to content

feat(tips): open post-tip chats with the keyboard up - #524

Merged
bmc08gt merged 2 commits into
mainfrom
feat/tip-chat-open-keyboard
Jul 27, 2026
Merged

feat(tips): open post-tip chats with the keyboard up#524
bmc08gt merged 2 commits into
mainfrom
feat/tip-chat-open-keyboard

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

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.

  • Added a sibling destination tipConversationWithKeyboard(ConversationID) — modelled on the existing currencyInfoForDeposit vs currencyInfo pattern, so the trace stays distinct and the ordinary tipConversation opens are untouched. Only the post-tip navigation (TipFlow.finish) uses it.
  • An openKeyboard flag threads ConversationScreen → 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

  • Flipcash app scheme compiles clean (iPhone 16 Pro sim).
  • Please sanity-check on-device: a fresh post-tip chat opens with the keyboard up, while normal tip-list / push-notification opens stay closed.

Note: touches the same three conversation files as the tip-only minimized send button PR; whichever merges second will have a trivial adjacent-line conflict.

bmc08gt added 2 commits July 27, 2026 16:28
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
bmc08gt merged commit da5a82f into main Jul 27, 2026
@bmc08gt
bmc08gt deleted the feat/tip-chat-open-keyboard branch July 27, 2026 20:39
bmc08gt added a commit that referenced this pull request Jul 27, 2026
* origin/main:
  fix(tests): restore FlipcashTests compilation under Xcode 27 main-actor isolation (#526)
  chore(tips): remove profile photo from tip card setup for now (#522)
  feat(tips): open post-tip chats with the keyboard up (#524)
  feat(tips): use the minimized send button only in tip chats (#525)
bmc08gt added a commit that referenced this pull request Jul 27, 2026
…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
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant