You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "myxtype (via GitHub)" <gi...@apache.org> on 2026/09/14 05:49:26 UTC

[I] bug(desktop): pasting a Finder folder stages it as a file and makes send fail [maka]

myxtype opened a new issue, #5279:
URL: https://github.com/apache/maka/issues/5279

   ### What happened
   
   On macOS, copying a directory in Finder and pasting it into the Desktop composer creates a normal file-attachment chip. The chip looks sendable, but submitting the message fails with the generic send-failure toast ("Failed to send" / "Please try again").
   
   Expected behavior: a pasted directory should either become the existing Host-bound folder reference used by **Reference folder**, or be rejected during paste with a clear localized explanation. It must not be staged as a normal file attachment that can only fail during submission.
   
   This should not recursively upload or eagerly enumerate the directory.
   
   ### How to reproduce
   
   1. Open Maka Desktop and an agent session with no turn running.
   2. In macOS Finder, select a folder and press Cmd+C.
   3. Focus the Desktop composer and press Cmd+V.
   4. Observe that the folder appears as a normal file attachment.
   5. Enter any text if needed and click Send.
   6. Observe that submission fails with the generic send-failure toast.
   
   ### Environment
   
   - Maka version or commit: observed in a downstream Desktop build at `3fe9ec9`; source inspection confirms the same path is still present in upstream `main` at `f109ccde9`
   - OS and version: Darwin 25.6.0 (macOS, arm64)
   - Surface: Desktop
   - Electron: 43.4.1
   - Chrome: 150.0.7871.224
   - Node.js: 24.18.1
   - Locale: zh-CN
   
   ### Logs, screenshots, or additional context
   
   The visible toast is:
   
   - Title: `发送失败`
   - Description: `消息暂时无法发送,请稍后重试。`
   
   The diagnostic report does not include the underlying renderer/preload exception. The source path explains why the folder first appears valid and only fails at send time:
   
   - `packages/ui/src/composer.tsx`: `onInputFiles` forwards every clipboard `File` to `onAttachFilePaths` without distinguishing a directory.
   - `packages/ui/src/use-composer-attachments.ts`: `sniffFileMimeType` catches a failed `file.slice(...).arrayBuffer()` read and still stages the item as an attachment.
   - `apps/desktop/src/renderer/attachment-preflight.ts`: preflight checks only count and byte size, so a directory-shaped `File` is not rejected.
   - `apps/desktop/src/preload/attachment-ingest-payload.ts`: submission later calls `file.arrayBuffer()` without mapping an unreadable/directory source to an expected attachment error, so the exception falls through to the generic send failure.
   
   Related but not duplicate:
   
   - #3994 defined directory context behavior.
   - #4097 added the explicit **Reference folder** picker and Host-bound directory references, but the Finder paste path still goes through ordinary attachment ingestion.
   - #4188 covered pasted images while a turn is running, not pasted directories.
   
   A focused regression test could paste a directory-shaped clipboard item and assert that it is never staged as an ordinary attachment or allowed to reach `encodeIngestItems` as a file.
   
   AI assistance: OpenAI Codex inspected the source paths, searched existing Issues and PRs, and drafted this report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] bug(desktop): pasting a Finder folder stages it as a file and makes send fail [maka]

Posted by "Totoro-qaq (via GitHub)" <gi...@apache.org>.
Totoro-qaq commented on issue #5279:
URL: https://github.com/apache/maka/issues/5279#issuecomment-5660851135

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] bug(desktop): pasting a Finder folder stages it as a file and makes send fail [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #5279: bug(desktop): pasting a Finder folder stages it as a file and makes send fail
URL: https://github.com/apache/maka/issues/5279


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org