uttrflow / uttrflow/uttrflow-swift
"Insert Again" on the Dictation page aims at Uttrflow's own window and says nothing about what happened
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
Every row on the Dictation page has an "Insert Again" button (`Sources/UttrflowUX/MainDictationPresentation.swift:239-241`). Pressing it runs `AppDelegate.insert(_:richText:used:)` (`Sources/Uttrflow/AppDelegate.swift:1547`, `:1075-1087`), which asks the insertion coordinator to put the text "where the caret is".
At that moment the frontmost app is Uttrflow itself, since the user has just clicked inside its window. The coordinator's strategies then behave like this (`Sources/UttrflowInput/TextInsertion.swift:15-22`):
1. Accessibility insertion writes into whatever text field is focused (`AccessibilityTextInsertionEngine.canInsert`, `Sources/UttrflowInput/AccessibilityTextInsertionEngine.swift:13-15`). Nothing excludes Uttrflow's own window, so if the page's search field has focus it is the field this route targets.
2. The paste route refuses because Uttrflow is frontmost (`PasteboardTextInsertionEngine.canInsert`, `Sources/UttrflowInput/PasteboardTextInsertionEngine.swift:28`).
3. The clipboard route puts the text on the clipboard.
Whatever happens, the page says nothing. A failure is only logged (`AppDelegate.swift:1082-1084`), and a clipboard-only outcome is not reported at all. "Copy" on the same row is silent too (`putOnClipboard`, `:1099-1103`).
The clipboard panel already handles this exact case. `PanelInsertion` detects `.uttrflowInFront` (`Sources/UttrflowUX/PanelInsertion.swift:29`) and says "Copied — click where you want it, then press ⌘V" (`:66-69`).
## Why it matters
"Insert Again" reads as "put these words back into the document I was writing". What it actually does from this page is, at best, a silent copy; with the search field focused, the route aims at Uttrflow's own field instead. The user gets no hint that they now need to switch apps and paste.
## How to reproduce
1. Dictate something into any app so it appears on the Dictation page.
2. Open Uttrflow, click on the page outside the search field, point at the row and press Insert Again: nothing visible happens; the text is now on the clipboard.
3. Repeat with the search field focused and note where the text goes (not verified on a running app for this report; the route is read from the code above).
## Acceptance criteria
- From the main window, "Insert Again" either returns to the app the dictation went into (the row knows its application) and inserts there, or is renamed to what it does (for example "Copy to paste elsewhere"). Product call on which; the choice goes in `Docs/insertion.md`.
- It never writes into Uttrflow's own fields.
- Copy and any clipboard-only outcome show a short confirmation, worded like the panel's notices (and announced to VoiceOver, see #551).
- A presenter-level test covers the outcome wording, in the style of `PanelInsertion`'s tests.
Contributor guide
Research direction
Start with MainDictationPresentation.swift, AppDelegate.swift, and the insertion engines named in the report, then compare their behavior with PanelInsertion.swift and its tests. Resolve the Insert Again behavior and document the choice in Docs/insertion.md. Done means Uttrflow fields are never targeted, copy-only outcomes are announced, and a presenter-level test covers the wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- accessibility, desktop, documentation, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100