attachments: inline PDF chip cannot be opened after send
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Start in feature/session/src/main/kotlin/ai/opencode/feature/session/SessionFeatureAttachments.kt (lines 58-81) and ComposerAttachmentsFeature.kt (lines 170-176), where the staged PDF bytes are read and then discarded. Trace how SessionFeatureOutbox.kt (244-257) and server/.../Payloads.kt (488-513) drop the source, then check UserAttachmentViews.kt (103-130) for the opener. The fix must keep a readable source for the sent attachment and needs a regression test in FileAttachmentTests.kt (265-292) that opens an inline PDF after send.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
For an inline PDF attachment, Android reads the staged bytes and immediately deletes the staged file. The sent transcript row keeps neither those PDF bytes nor a server path. Unless the server returns a media:<hash> reference, the PDF chip has no opener and cannot be read after sending.
Environment
- Android app: reporter's build not provided; behavior confirmed in
v0.8.8(c2311a60337e2a2128baba7c6eccb61b22bdb3f7) anddev(cab26e54c453fbaf8683ec456e628539d64b325f) source. - OpenCode server: version not provided; affects inline PDF responses without
mediaHash. - Device/OS: not provided.
- Terminal/shell: not applicable.
- Active plugins: none required.
Reproduction
- Select a model whose catalog entry advertises PDF input.
- Attach a PDF no larger than 20 MiB.
- Send a prompt containing the PDF.
- Tap the PDF chip in the sent message.
Expected Behavior
The attachment opens in the PDF viewer, and the user can read or save the same PDF that was sent.
Actual Behavior
The chip is display-only and does not respond to taps. There is no click or drag action because the transcript file has no path or mediaViewerReference.
Additional Context
- Inline handling is selected in
feature/session/src/main/kotlin/ai/opencode/feature/session/SessionFeatureAttachments.kt:58-81. ComposerAttachmentsFeature.kt:170-176reads the bytes into memory, emitsAttachmentAdded, then discards the staged copy.- Optimistic transcript projection drops the bytes (
SessionFeatureOutbox.kt:244-257). Server decoding keeps text only for plain text and records no PDF path (server/src/main/kotlin/ai/opencode/server/live/Payloads.kt:488-513). UserAttachmentViews.kt:103-130creates an opener only fromfile.pathorfile.mediaViewerReference; otherwise the chip is inert.- PDF rendering already exists in
feature/media/src/main/kotlin/ai/opencode/feature/media/agentfiles/AgentFileViewerModel.kt:353-359; the missing piece is a readable source reference. FileAttachmentTests.kt:265-292covers inline sending but not opening the sent PDF chip.- Suggested fix: retain a local or server-readable source for the lifetime of the sent attachment, then add a transcript regression test that opens an inline PDF after send.
- Static source reproduction only; no device screenshot or log was provided.
- Vorherrschende Sprache
- Kotlin
- Sterne
- 146
- Forks
- 35
- Ø Merge
- 7 Std. 41 Min.
- Gemergte PRs (30 T.)
- 221
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus anomalyco/opencode-android
-
F-droid releaseOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
anomalyco/opencode-android#345 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Crash: IllegalStateException in AppContext.getLiveValueEvtl. vergeben @Tarquinen hat das vor 1 Tag übernommen. Offencrash crash-triaged
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 65/100
anomalyco/opencode-android#343 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
crash crash-needs-human crash-triaged
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
anomalyco/opencode-android#341 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
crash crash-needs-human crash-triaged
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
anomalyco/opencode-android#340 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponseEvtl. vergeben @Tarquinen hat das vor 3 Tagen übernommen. Offencrash crash-triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
anomalyco/opencode-android#320 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in anomalyco/opencode-android
Ähnliche Issues
-
[Request]: KylleneOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
ScoopInstaller/Extras#19589 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
-
difficulty: beginner documentation help wanted networking
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
feature request needs decision
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
tswistak/Battery-Monitor#207 ·
Maintainer antworten meist innerhalb von 1 Tag