Skip to content

refactor(chat): decide attach close events in one place - #1061

Merged
bmc08gt merged 1 commit into
refactor/chat-attach-card-framefrom
refactor/chat-attach-close-events
Oct 14, 2026
Merged

bmc08gt merged 1 commit into
refactor/chat-attach-card-framefrom
refactor/chat-attach-close-events

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Each host had its own handlers for what takes the attach panel or card down. The bar handled typing, starting an edit and focusing the field. The overlay handled focus loss, backgrounding, the keyboard hiding and the keyboard's window going missing.

AttachEvent.response(in:) now holds that as one exhaustive switch over the event and the host (bar, keyboardWindow, inputView), and ConversationBarModel.handle(_:in:) applies it. The overlay still tears itself down synchronously on a reset, so its container never outlives its content by a frame.

Behaviour is unchanged, including the one asymmetry: the bar's panel stays up when the app goes to the background, and the overlay's comes down. AttachEventTests pins every event/host pair to its current response.

Stacked on #1060.

The bar and the overlay each had their own handlers for what takes the
attach panel or card down. The bar handled typing, edits and focus; the
overlay handled focus loss, backgrounding, the keyboard hiding and its
window going missing.

AttachEvent.response(in:) now holds that table as one exhaustive switch
over the event and the host, and ConversationBarModel.handle applies it.
The overlay still tears itself down synchronously when the response is a
reset. Behavior is unchanged: the bar's panel still stays up when the app
backgrounds.
@bmc08gt bmc08gt self-assigned this Oct 14, 2026
@bmc08gt
bmc08gt added this pull request to stack #1063 October 14, 2026 19:25
@bmc08gt
bmc08gt merged commit 1c6e8a2 into main Oct 14, 2026
2 of 3 checks passed
bmc08gt added a commit that referenced this pull request Oct 14, 2026
* commit '16a24ad1eb3eeac2097eac72d32150ba2c368f18':
  fix(ui): draw UIKit caption in Avenir Medium like SwiftUI (#1064)
  fix(members): host chip and member count label to match Android (#1058)
  chore(chat): log the attach lifecycle the same way in both hosts (#1062)
  refactor(chat): decide attach close events in one place (#1061)
  refactor(chat): measure the attach card's frame once (#1060)
  refactor(chat): read the attach menu rows live over the keyboard (#1059)
  refactor(chat): build the attach actions once for both hosts (#1056)
  fix(chat): render system messages in the transcript (#1054)

# Conflicts:
#	Flipcash/Core/Screens/Conversation/ChatScreenRepresentable.swift
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