Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat(ios): drop the paste image chip from the composer

leepokaiee4d45b7b08d
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift
index 9f7f4d92..c8603a5f 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/Composer.swift
@@ -24,9 +24,6 @@ struct Composer: View {
@State private var pickingFiles = false
@State private var pickingPhotos = false
@State private var photoItems: [PhotosPickerItem] = []
- /// The clipboard's `changeCount` last pasted (or passed on), so one copy is offered once.
- @State private var pasteCount = -1
- @State private var clipboardTick = 0
@FocusState private var focused: Bool
/// One line of the field's text, following Dynamic Type: the send button centers on the last line.
@ScaledMetric(relativeTo: .body) private var lineHeight: CGFloat = 22
@@ -106,8 +103,6 @@ struct Composer: View {
HStack(alignment: .bottom, spacing: 8) {
if canAttach { addButton }
VStack(alignment: .leading, spacing: 0) {
- let _ = clipboardTick
- if clipboardOffer { pasteOffer.transition(.move(edge: .bottom).combined(with: .opacity)) }
if !files.isEmpty {
fileChips.transition(.move(edge: .bottom).combined(with: .opacity))
}
@@ -117,10 +112,6 @@ struct Composer: View {
.animation(Motion.layout, value: draft)
}
.animation(Motion.layout, value: files.map(\.id))
- // The clipboard isn't observable: look again when typing starts or the app comes back.
- .onChange(of: focused) { _, _ in clipboardTick += 1 }
- .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in clipboardTick += 1 }
- .onReceive(NotificationCenter.default.publisher(for: UIPasteboard.changedNotification)) { _ in clipboardTick += 1 }
.dropDestination(for: PickedFile.self) { picked, _ in
guard canAttach else { return false }
append(picked.map(\.file))
@@ -241,27 +232,6 @@ struct Composer: View {
.contentShape(Circle())
}
- private var pasteOffer: some View {
- HStack(spacing: 6) {
- Button(action: pasteFiles) {
- Label("Paste image", systemImage: "doc.on.clipboard")
- .font(.footnote.weight(.medium))
- .foregroundStyle(Palette.text)
- .padding(.horizontal, 10)
- .padding(.vertical, 6)
- .background(Palette.surface, in: Capsule())
- }
- .buttonStyle(PressScale())
- Button { pasteCount = UIPasteboard.general.changeCount } label: {
- Image(systemName: "xmark").font(.system(size: 10, weight: .bold)).foregroundStyle(Palette.secondary)
- }
- .buttonStyle(.plain)
- .accessibilityLabel("Don't paste")
- }
- .padding(.horizontal, 10)
- .padding(.top, 8)
- }
-
private var fileChips: some View {
ScrollView(.horizontal, showsIndicators: false) {
HStack(spacing: 6) {
@@ -299,8 +269,7 @@ struct Composer: View {
/// Images (or files) on the clipboard become attachments.
private func pasteFiles() {
- let providers = UIPasteboard.general.itemProviders
- pasteCount = UIPasteboard.general.changeCount
+ let providers = UIPasteboard.general.itemProviders
Task { append(await PickedFile.load(providers)) }
}
@@ -316,11 +285,6 @@ struct Composer: View {
append(picked)
}
- /// A copied image not offered yet: shown as a "Paste image" chip while typing.
- private var clipboardOffer: Bool {
- canAttach && focused && UIPasteboard.general.hasImages && UIPasteboard.general.changeCount != pasteCount
- }
-
private func mention(_ member: Bot) {
guard let at = draft.lastIndex(of: "@") else { return }
draft = String(draft[..<at]) + "@\(member.name) "
diff --git a/docs/design/composer-attachments.md b/docs/design/composer-attachments.md
index 3c1e62c2..ae17ef92 100644
--- a/docs/design/composer-attachments.md
+++ b/docs/design/composer-attachments.md
@@ -8,9 +8,9 @@ ImageIO creates display-sized thumbnails off the main actor; the desktop app
back to the filename chip, as do non-image files. Multiple attachments scroll
horizontally and remain removable individually.
-The iPhone clipboard suggestion is not an attachment: tapping **Paste image**
-loads it into the draft and replaces the suggestion with the thumbnail. Merely
-focusing the composer does not read and attach clipboard contents. Picking a
+On the iPhone a copied image goes in through **Paste** in the + menu; the
+composer never suggests the clipboard on its own, and focusing it does not read
+or attach clipboard contents. Picking a
photo or image file uses the same preview. A draft containing only attachments
shows Send, including when another reply is running (the message is queued).
diff --git a/docs/features/file-attachments.md b/docs/features/file-attachments.md
index 1eea2fa5..15f1fd87 100644
--- a/docs/features/file-attachments.md
+++ b/docs/features/file-attachments.md
@@ -5,8 +5,8 @@ Photos and files sent with a message, from the iPhone and the desktop app.
- Composer: the **+** button left of the message box. iPhone: a menu with Photos (sent as JPEG) and
Files (plus Paste when the clipboard has an image); desktop: an open panel. Files and images can
also be dropped on the box or pasted: ⌘V / Ctrl+V on the desktop takes a copied image or file
- (`apps/desktop/src/renderer/views/thread/Composer.tsx`), and on the
- iPhone a "Paste image" chip appears above the box while typing after an image was copied.
+ (`apps/desktop/src/renderer/views/thread/Composer.tsx`); on the iPhone through Paste in the
+ + menu.
HEIC/TIFF/BMP become JPEG (`OutgoingFile.prepared`, `Thread/Attachments.swift`). Picked files show as chips above
the text and can be removed; a message can be files only. Not in group chats (a group has no
folder of its own). Up to 100 MB per file.