Skip to content

Customer chat: mixed accepted/rejected attachments block sending the valid files #1369

Description

@marassteiner

Follow-up from #1297 (not a merge blocker).

Evidence

src/screens/chat.screen.tsx:423 (addFiles): a batch with one accepted and one rejected file still calls setSelectedFiles for the accepted files and setError(fileTypeError). canSend at line 523 requires !error.

A customer who drops scan.pdf together with notes.txt therefore sees a valid chip but cannot send that file-only message. The rejected file has no chip, so there is nothing to remove. Typing in the composer clears the error (handleChange at line 468), which is an accidental workaround rather than a designed recovery.

Tests only cover all-accepted and all-rejected batches (src/__tests__/chat.screen.test.tsx).

Suggested fix

Either reject the mixed batch atomically, or keep the accepted files and show the type error as a non-blocking warning that does not disable send.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions