attachments: inline PDF chip cannot be opened after send
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Kotlin
- スター
- 146
- フォーク
- 35
- 平均マージ
- 7時間 41分
- マージ済み PR(30日)
- 221
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode-android のほかの issue
-
F-droid releaseオープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
anomalyco/opencode-android#345 ·
メンテナーはふだん 1 日以内に返信
-
Crash: IllegalStateException in AppContext.getLiveValue対応中かも @Tarquinen が 1 日前に担当しました。 オープンcrash crash-triaged
難易度 3/5 半日 初心者へのやさしさ 65/100
anomalyco/opencode-android#343 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
crash crash-needs-human crash-triaged
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
anomalyco/opencode-android#341 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
crash crash-needs-human crash-triaged
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
anomalyco/opencode-android#340 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponse対応中かも @Tarquinen が 3 日前に担当しました。 オープンcrash crash-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
anomalyco/opencode-android#320 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode-android の issue をすべて見る
似ている issue
-
[Request]: Kylleneオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
ScoopInstaller/Extras#19589 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
difficulty: beginner documentation help wanted networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
feature request needs decision
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
tswistak/Battery-Monitor#207 ·
メンテナーはふだん 1 日以内に返信