Skip to content

Desktop: attach dropped source files on desktop instead of refusing them - #9495

Merged
Etherll merged 11 commits into
unslothai:mainfrom
NilayYadav:desktop-drop-text-files
Aug 22, 2026
Merged

Etherll merged 11 commits into
unslothai:mainfrom
NilayYadav:desktop-drop-text-files

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

Dragging a .cs, .php, or .js file onto the desktop app is refused (#8843), even though the + button and paste accept the same file.

Dropped source and text files now attach inline, using the composer attachment queue from #9455. .pdf/.txt/.md still go to the knowledge base.

Depends on #9455 this branch includes its commits until it merges.

@NilayYadav NilayYadav changed the title Desktop drop text files Desktop: attach dropped source files on desktop instead of refusing them Aug 21, 2026
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 490674b945

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Resolve Studio native-drop conflicts by preserving main's isolated composer-document queue, routing source files through it before images, sharing text attachment accept metadata, and retaining Rust MIME and size-policy coverage.
@Etherll

Etherll commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: d7c39826cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

Checked the shared extension list in studio/frontend/src/features/chat/text-attachment-accept.ts against TEXT_ATTACHMENT_EXTS in studio/src-tauri/src/native_path_policy.rs and the drop routing looks right, but most of runtime-provider.tsx here is import reordering and line rewrapping unrelated to dropped files. Could you drop that reformatting and rebase so the branch stops conflicting?

@Etherll

Etherll commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

UI evidence

PR 9495 before and after

Visual result: PASS

  • Scene: the same synthetic C:\ui-evidence\source_drop.py native drag-enter event on both builds, without dropping or reading a host file.
  • BEFORE (cb8e20620, original PR base): Can't use these files — “Drop a .gguf model, or documents to chat with.”
  • AFTER (d7c39826c, tested PR head): Drop to attach file — “Indexed for this chat.”
  • Browser: Chromium, 1500×900 viewport.

The original PR base was used for BEFORE because merge-base e0ae1311a cannot compile its frontend: attachment-content.ts imports two MIME constants that open-document.ts does not export.

This verifies the visible native-drop behavior only. GitHub currently marks the PR as conflicting after main advanced, and the CPU repo-test job is not green (two failures in paths outside this PR's net diff), so this is not a merge-readiness approval.

Resolve the attachment-content import overlap by preserving the shared text accept metadata and the OpenDocument MIME source used by both branches.

@Etherll Etherll left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants