Skip to content

Web mode silently drops image attachments; the button just disappears #142

Closed

Description

@currentbits

Problem

src/App.tsx:605-608 passes undefined for onPickAttachments/onDropAttachmentFiles when isWebMode(); src/components/Composer.tsx:119-131 documents that absence hides the attach button and disables drop entirely. Nothing in the UI explains why.

Impact

README advertises web mode for phone/browser check-ins without noting the limitation. A user who attaches screenshots daily opens the web UI and the feature is simply gone, with no hint it is environment-related rather than a bug.

Fix direction

Show the attach button in a disabled state with a tooltip ("attachments are only available in the desktop app"), or implement upload over the web bridge.

Activity

  1. added
    enhancement
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Aug 16, 2026
  2. currentbits commented on Aug 17, 2026

    @currentbits
    OwnerAuthor

    Fixed: web mode now attaches images instead of hiding the button.

    • pickAttachments in web mode opens a browser <input type=file accept=image/*> (never the host's native dialog) and uploads each pick through the existing attachments:saveImage wire call.
    • dropAttachmentFiles falls back to the same path when webUtils.droppedFilePath is absent (web/dev bridges), instead of returning [].
    • src/App.tsx no longer passes undefined for either prop.

    No new size/mime guard in the renderer — electron/attachments.js saveImage() already validates and caps at 20MB; nulls are filtered.

    Limitation: web can attach images only, not folders (<input type=file> can't pick directories). Desktop is unchanged.

    Test: test/webDegrade.test.tsx drops a File with window.coder deleted and asserts saveImage gets a data: URL for the right thread and the chip renders. 724/724 renderer tests + typecheck green.

  3. added
    plan:done
    and removed
    plan:doing
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions