fix(swift-ios): add copy and timestamp footers to chat messages - #11252
Open
mackinleysmith wants to merge 5 commits into
Open
mackinleysmith wants to merge 5 commits into
mackinleysmith wants to merge 5 commits into
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The changes are confined to the Swift iOS chat view and an optional timestamp mapping, adding localized copy/edit affordances, timestamps, and accessibility feedback without altering server contracts or processing workflows. The implementation is small and self-contained with no product-default or static-analysis configuration changes. You can add or adjust custom eligibility rules. Learn more. |
4 tasks done
This branch has not been deployed
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.
Copying a full sent message or assistant response in SwiftUI requires the selection menu, while text selection is limited to individual blocks.
What Changed
Add compact copy and timestamp footers to completed, nonempty chat messages. Assistant footers show the copy icon followed by time. Sent-message footers sit outside the bubble, aligned right, with time followed by the copy icon, matching the web layout.
The shared control copies the full message text, retains a 44-point tap target, and briefly shows a checkmark with haptic and VoiceOver feedback. Timestamps use the last-updated time in the phone’s local clock format, falling back to creation time for older cached messages. Queued and failed user messages keep their existing status display.
Copy is available from the long-press menu for user and assistant messages. Eligible sent-message footers include an “Edit from here” arrow between time and copy, using the existing rewind checks and confirmation.
Why
Makes whole-response copying discoverable without changing text selection. This is confined to the SwiftUI chat view; it needs no server, contract, provider, web, desktop, or React Native changes. Related selection work: #6089 and #6110.
Verification
Copy-menu update: Simulator build passed and long-press Copy matched the complete fixture text. The cached offline thread correctly hides Edit from here; enabled rewind was not exercised through the new shortcut.
Sent-message footer: Simulator build passed; verified right-aligned placement, the “Copy message” accessibility label, and exact copied message text.
Updated footer: Debug iOS Simulator build passed, visually checked icon/time layout, and verified the copy icon puts the full Markdown fixture on the clipboard.
In a fresh iPhone 17 Pro simulator on iOS 26.5, tapped Copy and compared the clipboard with the seeded response. All 197 characters matched exactly, including multiple paragraphs, bold Markdown, list items, and a fenced code block.
git diff --checkpassed; commit formatting hook passed.UI Changes
Checklist
Implemented with GPT-6 in the Codex harness through T3 Code.