Repository navigation
#951 Clear the declined-drop card when an iOS drag ends - #962
Merged
Merged
Conversation
SwiftUI's drop delegate never reports the end of a drag it declined, so after a "Can't attach this" card the card stayed on the composer until the next drag. Session Chat now takes drops through a UIDropInteraction on the view that hosts the chat, whose sessionDidEnd fires for every drag, declined or not. A small tracker holds the card through one drag and decides the drop operation; it is unit-tested. Android already clears the card in onEnded, so it is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
There was a problem hiding this comment.
Automated review: no finding that 2+ of 3 passes agreed on.
2 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/UI/SessionChat/SessionChatAttachmentDrop.swift:27medium: Returning UIDropOperation.cancel aborts the whole drag where the old code only declined the position (deepseek-v4.1-flash)ios/OpenCode Mobile/OpenCode Mobile/UI/SessionChat/SessionChatAttachmentDrop.swift:151low: Tracker keeps its own summary, so clearing attachmentDropSummary no longer blocks a drop (deepseek-v4.1-flash)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.081
13 tasks done
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.


Summary
Fixes #951
On iOS, the "Can't attach this" card stayed on the Session Chat composer after a declined drag ended, until the next drag. SwiftUI's drop delegate never reports the end of a drag it declined, and
onDropSessionUpdatedneeds iOS 26 (the app supports 17.5).UIDropInteractionon the view that hosts the chat. UIKit callssessionDidEndfor every drag, so the card clears when the drag ends, whether it was declined or accepted.AttachmentDropRouting). A smallSessionChatAttachmentDropTrackerholds the card through one drag and decides the drop operation; it has unit tests.onEnded, so it needs no change.Checks
SessionChatAttachmentDrop.kt).SessionChatAttachmentDropTrackerTestsand the existingAttachmentDropRoutingTestspass.Risks / Follow-ups
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.