Copying a selection out of messages doesn't work properly #9

Open
opened 2026-10-04 20:21:56 +00:00 by robocub · 1 comment
Owner

Report

Selecting part of someone's message and copying it doesn't work the way it does in Discord or a browser.

What the code does today

  • Desktop: the timeline is wrapped in a SelectionArea (room_timeline_widget.dart, around line 90), but its contextMenuBuilder returns an empty Container. So you can drag-select, but right-click shows no Copy menu; only Ctrl+C works, and nothing in the UI says so.
  • Mobile: there is no SelectionArea at all. The only option is "Copy" in the message menu, which copies the whole message (timeline_event_menu.dart, plainTextBody). You can't copy part of a message.
  • The timeline is a lazily-built, reversed list. Flutter selections that span many messages tend to break when items scroll out and get disposed, and can pull in sender names, timestamps or reactions. Needs checking.

Needed

  • Which platform, and what exactly goes wrong: no menu, nothing copied, wrong text copied, or selection jumps or vanishes?

Likely fixes

  1. Desktop: a real context menu with Copy (and Select all in this message) when a selection exists.
  2. Mobile: long-press to select within a message, via a per-message selectable region, with the system Copy toolbar. Keep the long-press message menu reachable, for example through a separate gesture or a menu entry.
  3. Multi-message selections copy clean text: message bodies only, one per line, optionally prefixed with the sender, no UI chrome.

Acceptance

On Linux, Windows and Android you can select a few words inside a message, copy them, and paste exactly those words elsewhere.


Filed with LLM assistance. This is a fork-only issue; never refile it on Commet's tracker.

## Report Selecting part of someone's message and copying it doesn't work the way it does in Discord or a browser. ## What the code does today - **Desktop:** the timeline is wrapped in a `SelectionArea` (`room_timeline_widget.dart`, around line 90), but its `contextMenuBuilder` returns an empty `Container`. So you can drag-select, but **right-click shows no Copy menu**; only Ctrl+C works, and nothing in the UI says so. - **Mobile:** there is no `SelectionArea` at all. The only option is "Copy" in the message menu, which copies the **whole** message (`timeline_event_menu.dart`, `plainTextBody`). You can't copy part of a message. - The timeline is a lazily-built, reversed list. Flutter selections that span many messages tend to break when items scroll out and get disposed, and can pull in sender names, timestamps or reactions. Needs checking. ## Needed - [ ] Which platform, and what exactly goes wrong: no menu, nothing copied, wrong text copied, or selection jumps or vanishes? ## Likely fixes 1. Desktop: a real context menu with Copy (and Select all in this message) when a selection exists. 2. Mobile: long-press to select within a message, via a per-message selectable region, with the system Copy toolbar. Keep the long-press message menu reachable, for example through a separate gesture or a menu entry. 3. Multi-message selections copy clean text: message bodies only, one per line, optionally prefixed with the sender, no UI chrome. ## Acceptance On Linux, Windows and Android you can select a few words inside a message, copy them, and paste exactly those words elsewhere. --- _Filed with LLM assistance. This is a fork-only issue; never refile it on Commet's tracker._
Author
Owner

Desktop half implemented on branch feat/desktop-copy-selection (8bc2862), CI green, not merged: when text is selected, the right-click message menu's first item is Copy selection. Mobile (partial selection inside a message) is still open, and the needs-info question stands: which platform is the reported problem on?


Filed with LLM assistance.

Desktop half implemented on branch `feat/desktop-copy-selection` (8bc2862), CI green, not merged: when text is selected, the right-click message menu's first item is **Copy selection**. Mobile (partial selection inside a message) is still open, and the needs-info question stands: which platform is the reported problem on? --- _Filed with LLM assistance._
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
robocub/vommet#9
No description provided.