Skip to content

Show a drop target while a file is dragged over the chat - #633

Merged
mateuscmtropical merged 1 commit into
mainfrom
feat/drop-target
Nov 13, 2026
Merged

mateuscmtropical merged 1 commit into
mainfrom
feat/drop-target

Conversation

@mateuscmtropical

Copy link
Copy Markdown
Owner

Summary

While a file is dragged over the page, a full-page drop target shows. A dashed accent border and "Drop to attach" say the drop will be accepted. A red border and a reason say it will be ignored, either "Wait for the reply to finish" or "Attaching files is off here". The target never takes the pointer. It hides on drop, on leave, on window blur and on the next pointer move.

Closes #632

Type of change

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation
  • Maintenance (tooling, CI, dependencies)

How it was tested

  • pnpm check passes (lint, typecheck, 4171 tests, build).
  • New tests in Composer.test.tsx cover the accepted and refused states, nested enter and leave events, a render in the middle of a drag, and the reset on blur.
  • A separate reviewer found two real problems, a drag counter that reset when the listeners were set up again and an overlay that could stay after a cancelled drag. Both are fixed and the second review found nothing new.
  • Not tried in a real browser with a real file from the desktop. Accepted limit: the cancel with Esc relies on the browser sending a leave or a later pointer move.
  • ChatService.skillReview.test.ts failed twice in full runs of the suite and passes alone and on rerun. It is unrelated to this change.

Checklist

  • pnpm check passes
  • Tests added or updated
  • Docs updated (README, docs/, or CHANGELOG.md for user-facing changes)
  • I read the contributing guide

Closes #632

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mateuscmtropical
mateuscmtropical merged commit ac5dc06 into main Nov 13, 2026
10 checks passed
@mateuscmtropical
mateuscmtropical deleted the feat/drop-target branch November 13, 2026 23:19
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.

Show a drop target while a file is dragged over the chat

1 participant