# Ticket 11.11 — Double-Click/Tap to Copy Messages

**Phase**: 11 — UI/UX Polish
**Priority**: Low
**Depends on**: None

## Description

claude-relay supports double-click (or double-tap on mobile) to copy an entire assistant message to the clipboard. This is a quick convenience feature for power users who want to copy a full response without selecting text. conduit has a two-step copy-on-click (click → "Click again to copy" → click → copied) but not double-click.

Add double-click/double-tap as an alternative trigger for the copy action, maintaining the existing two-step click behavior as well.

## Acceptance Criteria

### AC1: Double-clicking copies assistant message text
```gherkin
Given an assistant message is displayed in the chat
When the user double-clicks on the message content area
Then the full text content of that message is copied to the clipboard
```

### AC2: Double-tapping copies on mobile
```gherkin
Given an assistant message is displayed on a mobile device
When the user double-taps on the message content area
Then the full text content of that message is copied to the clipboard
```

### AC3: Visual feedback after copying
```gherkin
Given the user double-clicks or double-taps an assistant message
When the text is successfully copied to the clipboard
Then a "Copied!" toast or inline visual indicator appears briefly
And the indicator disappears after a short duration (e.g. 2 seconds)
```

### AC4: Existing click-to-copy behavior is preserved
```gherkin
Given the existing two-step click-to-copy is implemented
When the user single-clicks the message content area
Then the "Click again to copy" prompt appears as before
And a second click copies the content as before
And this behavior coexists with double-click without interference
```

### AC5: Double-click on code blocks copies code only
```gherkin
Given an assistant message contains a code block
When the user double-clicks on the code block specifically
Then only the code block content is copied to the clipboard
And the surrounding message text is not included
```

## Testable Components

| Component | Test Type | What to Assert |
|-----------|-----------|----------------|
| Double-click handler on assistant messages | E2E | A `dblclick` event on an assistant message triggers clipboard write |
| Clipboard write on dblclick | Unit | Mock clipboard API receives the correct message text on dblclick event |
| Toast/feedback after copy | E2E | A "Copied!" indicator appears in the DOM after double-click copy |
| Code block double-click targets code only | E2E | Double-clicking inside a `<pre><code>` block copies only the code text |
| Coexistence with single-click copy | E2E | Single-click still shows "Click again to copy" without triggering double-click |

## Reference

- claude-relay double-click copy: `../claude-relay/lib/public/app.js` (double-click/double-tap handler)
- Existing copy-on-click: `conduit/src/lib/public/components/chat/AssistantMessage.svelte` (lines 17-18, 160-214)
- Clipboard utility: `conduit/src/lib/public/utils/clipboard.ts`
