Skip to content

Integrate #69: drag-and-drop file attachments - #91

Merged
milind-soni merged 2 commits into
mainfrom
codex/pr-69-integration
Aug 14, 2026
Merged

Integrate #69: drag-and-drop file attachments#91
milind-soni merged 2 commits into
mainfrom
codex/pr-69-integration

Conversation

@milind-soni

Copy link
Copy Markdown
Owner

Closes #69.

This preserves the original contribution as a merge parent and integrates it with the current composer.

Review fixes included:

  • persist file chips with the correct bot or room draft
  • safely encode quotes, ampersands, angle brackets, tabs, and line breaks in file paths
  • preserve drop order while resolving browser-only text files
  • cancel late async drop updates when the composer changes
  • keep pending approvals, dictation, queued sends, and long-paste behavior intact
  • validate persisted file attachments and cover file drops, path encoding, and conversation isolation with tests

Local verification:

  • 206 tests passed; 7 skipped
  • production build passed
  • Electron syntax checks passed

guilimasp and others added 2 commits August 13, 2026 14:35
There is no way to hand a bot a file today: you copy the path out of
Finder by hand, or you do not send it at all. Dropping one on the window
did something worse — Electron navigated the window to the file and the
app went blank.

Dropping a file anywhere on the window now attaches it. The overlay says
so while you drag; the file becomes a chip beside any pasted text, and on
send it folds into the message as <attached-file path="…" />.

By path rather than by content, on purpose: every driver here is an agent
that can open a file itself, so a 200 MB video, a PDF, and a CSV all work
the same way, in one line of prompt, for providers that have no attachment
protocol at all. Only the preload can name a dropped file — Electron 32
removed File.path — so the bridge exposes webUtils.getPathForFile.

A drag out of a web page carries no file on disk: small text lands as a
pasted chip instead, anything else says so rather than attaching a path
that does not exist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0197wYuWWpF21iBeNgHZ8n3X
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@milind-soni, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2395ed42-518a-42b2-a86c-2ea5651578e6

📥 Commits

Reviewing files that changed from the base of the PR and between 74e38be and ba7d391.

📒 Files selected for processing (7)
  • electron/preload.cjs
  • server/composer-attachments.test.ts
  • server/drafts.test.ts
  • src/components/Composer.tsx
  • src/components/ComposerAttachments.tsx
  • src/lib/composer-attachments.ts
  • src/types/ogb.d.ts

Comment @coderabbitai help to get the list of available commands.

@milind-soni
milind-soni merged commit 6f7f3b8 into main Aug 14, 2026
5 checks passed
@milind-soni
milind-soni deleted the codex/pr-69-integration branch August 14, 2026 03:56
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