Skip to content

fix(site/src/pages/AgentsPage): refuse composer files while a send is pending or read-only - #30641

Closed
DanielleMaywood wants to merge 1 commit into
refactor/agents-remove-chat-inputfrom
fix/agents-send-cleanup-files
Closed

DanielleMaywood wants to merge 1 commit into
refactor/agents-remove-chat-inputfrom
fix/agents-send-cleanup-files

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Collaborator

Follow-up in the #30545 composer refactor stack. Depends on #30639.

The post-send reset clears every chat and workspace file in the draft. Chat files added while a send was pending still attached, then disappeared after the send finished. A read-only composer also accepted chat files through drop, paste, and the file picker.

  • Any file added while a send is pending is refused with "Wait for the current message to finish sending, then add the file again." The text draft is kept.
  • A read-only composer refuses uploads. User-visible: the plus menu hides "Attach file" for read-only chats.
Key decisions
  • The pending-send and read-only checks run first in attachFiles, so the workspace-only pending-send branch is removed.
  • canAttachFiles is false when read-only, which removes paste, picker, and drop wiring. acceptFilePasteWhileDisabled no longer needs its read-only check.
  • The two workspace-only pending-send tests become one table covering drop and paste while pending, plus drop while read-only, with exact toast and draft assertions.

Generated by Coder Agents on behalf of @DanielleMaywood.

@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

CODAGT-1405

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

Closing stack until can be re-prioritized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant