Skip to content

fix: reject folder attachments that silently block chat send - #1097

Merged
govindavashishtha merged 2 commits into
mainfrom
govinda/age-2547-folder-attachments-silently-block-message-submission-in
Oct 19, 2026
Merged

govindavashishtha merged 2 commits into
mainfrom
govinda/age-2547-folder-attachments-silently-block-message-submission-in

Conversation

@govindavashishtha

@govindavashishtha govindavashishtha commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fixes AGE-2547: drag-dropped folders were accepted as pending attachments, then send failed with NotFoundError and no UI feedback.
  • trueForgeAttachmentAdapter.add now probes the file blob and rejects directories before they enter the composer.
  • Composer drop handling detects folders via webkitGetAsEntry, skips attachment analytics for folder-only drops, and toasts that folders cannot be attached.

Test plan

  • Drag a folder into TrueForge chat → toast appears, folder does not show as an attachment, message still sends with text only
  • Drag a mix of files + a folder → files attach, folder is rejected with toast, send works
  • Drag normal files / use the file picker → unchanged
  • Attach an empty file (0 bytes) → still accepted
  • pnpm test:assistant-ui-runtime and pnpm test:trueforge-ui (or the focused attachment/composer tests)

Made with Cursor


Note

Low Risk
Localized to chat attachment add/drop handling with explicit user errors; no auth, data, or API contract changes.

Reviewed by Cursor Bugbot for commit 80beecc. Bugbot is set up for automated code reviews on this repo. Configure here.

Folders were accepted as pending attachments then failed on send with
NotFoundError and no UI feedback. Reject them at add time and toast on drop.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 80beecc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge-assistant-ui-runtime Patch
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@govindavashishtha
govindavashishtha enabled auto-merge (squash) October 19, 2026 12:07
@govindavashishtha
govindavashishtha merged commit aa58442 into main Oct 19, 2026
16 checks passed
@govindavashishtha
govindavashishtha deleted the govinda/age-2547-folder-attachments-silently-block-message-submission-in branch October 19, 2026 12:14
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.

2 participants