Skip to content

Composer: persist long pastes as per-conversation attachment chips - #89

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

Composer: persist long pastes as per-conversation attachment chips#89
milind-soni merged 3 commits into
mainfrom
codex/pr-68-integration

Conversation

@milind-soni

Copy link
Copy Markdown
Owner

Integrates #68 with the per-conversation draft and approval/dictation behavior now on main.

  • turn long pastes into removable, keyboard-accessible chips
  • send or queue attachment-only messages correctly
  • preserve pasted attachments independently for each bot and room, including across remounts
  • keep text and attachment storage separate so typing does not reserialize large pasted payloads
  • compute UTF-8 size and line count once at paste time
  • preserve native selection-replacement behavior for long pastes
  • prevent Arrow Up from editing history when a chip makes the composer non-empty
  • add utility and per-conversation persistence tests

Local verification: 204 tests passed (7 platform-specific skips), typecheck, Electron syntax checks, and production build.

Closes #68

guilimasp and others added 3 commits August 13, 2026 13:27
Pasting a stack trace, a log, or a page of code into the composer buries
the input: the textarea grows to its cap, the send button drifts away,
and what you were writing scrolls out of sight.

Past ~900 characters or 12 lines, a paste becomes a chip above the input
instead — the first lines fading out, the size beside them, an x to drop
it. Shorter pastes are untouched and still land as text.

On send the chips fold back into the message as <pasted-text> blocks:
tagged rather than fenced, because pasted code and markdown carry fences
of their own and nesting them loses the boundary. Nothing crosses the
server, so every driver still receives a plain prompt.

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

- the send control keyed off typed text alone, so a chip on its own could
  only be sent with Enter — the mouse got a microphone instead
- the remove button used `hidden` until hover, which took the only way to
  drop a chip out of the keyboard's reach; opacity plus focus-visible
  keeps the same look and puts it back in the tab order
- the chip labelled UTF-16 code units as bytes, reading a third under on
  accented text. Measured in UTF-8 now, once at paste time rather than on
  every re-render

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: 13 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: c92a61e8-bb0e-49ec-8d12-d4216363187e

📥 Commits

Reviewing files that changed from the base of the PR and between 5f3af33 and b513a5b.

📒 Files selected for processing (6)
  • server/composer-attachments.test.ts
  • server/drafts.test.ts
  • src/components/Composer.tsx
  • src/components/ComposerAttachments.tsx
  • src/lib/composer-attachments.ts
  • src/lib/drafts.ts

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

@milind-soni
milind-soni merged commit dd91358 into main Aug 14, 2026
5 checks passed
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