uttrflow / uttrflow/uttrflow-swift
A clipboard panel paste that the app never takes says nothing: the panel is closed and the confirmation's answer is only logged
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 286
Description
## What happens
Choosing a text clip closes the panel first and then inserts through the dictation coordinator (`Sources/Uttrflow/AppDelegate.swift:850-855`, `:1075-1087`):
```swift
let method = try await clipInserter.insert(text, richText: richText)
Self.log.info("clip inserted by \(String(describing: method), privacy: .public)")
```
`insert` returns an `InsertionAttempt` that carries the paste confirmation's answer (`TextInsertionCoordinator.swift:35-36`). A dictation reads that answer and draws "Inserted — not confirmed" when the paste gave up (`Docs/insertion.md`, "The answer is the return value, not a log line"). The panel path writes the attempt into a log line and nothing else. When every strategy refuses, the `catch` at `:1082-1085` also only logs.
So when the frontmost app ignores the synthetic ⌘V, the user sees nothing at all. Apps that do this include ones holding secure keyboard entry, games, windows that forward key presses to another machine, a read-only page, and a list with no editable field. The panel has gone, no text appeared, and nothing says the clip is on the clipboard to paste by hand.
#582 is the same silence on the picture path (`insertImage`, `AppDelegate.swift:1028-1045`). This is the text path, which is the common one.
## Why it matters
"I picked a clip and nothing happened" is the failure a clipboard manager has to explain. The words are on the clipboard in every case, and one sentence would turn a mystery into a ⌘V. The dictation path already tells users this; the panel path does not.
## How to reproduce
1. Open a window with no editable field focused (for example a read-only preview), or a window that ignores synthetic key presses.
2. Open the clipboard panel and choose a text clip.
3. The panel closes, nothing appears, and no notice is shown. Log stream: `log stream --predicate 'subsystem == "com.uttrflow.Uttrflow"' | grep "clip inserted"` shows the method only.
## Acceptance criteria
- A `.unconfirmed` arrival, or a thrown insertion, from the panel path produces a short notice where the user is looking (the floating button's notice, since the panel has closed), such as "Copied — press ⌘V". This reuses the dictation outcome's wording rather than inventing a new one.
- `.confirmed` and `.notReported` stay silent, matching dictation.
- The decision (attempt in, notice out) lives in `UttrflowUX` next to `PanelInsertion` so it is testable outside `AppDelegate`, with a test for each arrival.
- #582's picture path uses the same function.
Contributor guide
Research direction
Start in Sources/Uttrflow/AppDelegate.swift at the text insertion path around lines 850-855 and 1075-1087, then read TextInsertionCoordinator.swift and Docs/insertion.md for the arrival meanings. Locate UttrflowUX beside PanelInsertion and add tests covering each arrival, including thrown insertion; done means unconfirmed panel text and picture insertions show the existing notice while confirmed and unreported results stay silent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100