uttrflow / uttrflow/uttrflow-swift
The menu bar's Dictation and Clipboard switches only change their tick: the shortcut still dictates and copies are still recorded
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
The menu bar menu has a "Turn on and off" section with three ticked items: Dictation, Clipboard and AI Suggestions (`Sources/UttrflowUX/MenuBarPresentation.swift:494-505`). `MenuBarFeatures` is documented as "each switched on and off without touching the others" (`:64`).
Only AI Suggestions does anything. In `AppDelegate`:
```swift
// Sources/Uttrflow/AppDelegate.swift:1253-1254
/// The menu bar's three switches; only suggestions has a stored setting behind it, so the other two hold for this launch.
private var menuSwitches = MenuBarFeatures()
...
// :1278-1281
case .setFeature(let feature, let isOn):
menuSwitches = menuSwitches.setting(feature, isOn: isOn)
if feature == .suggestions { apply(.toggle(.suggestionsEnabled, isOn: isOn)) }
refreshMenuBar()
```
`menuSwitches` is read in exactly one other place, to draw the menu (`:1248`). Unticking **Dictation** greys out the menu's own Start Dictation item (`MenuBarPresentation.canStartDictation`, `:518-519`) and nothing else: the shortcut and the floating button still dictate. Unticking **Clipboard** greys out the menu's Clipboard item (`:458`) and nothing else: the clipboard watcher started at launch keeps recording every copy (`AppDelegate.swift:214`, `:658`), and ⇧⌘V is still registered and still opens the panel (`startWatchingForClaimedShortcuts`, `:688-718`, checks no switch). Both ticks come back on every launch.
## Why it matters
- Someone who unticks Clipboard before copying a password, bank detail or client document reasonably believes copies are no longer being kept. They are, in `clipboard` history on disk.
- Someone who unticks Dictation during a meeting or a screen share still has a live dictation shortcut and floating button.
- A switch that silently does nothing makes the other working switches untrustworthy too.
## How to reproduce
1. Open the menu bar menu and untick Clipboard.
2. Copy some text in another app, then press ⇧⌘V: the panel opens and the new copy is at the top.
3. Untick Dictation and hold the dictation shortcut: dictation runs.
4. Quit and relaunch: both are ticked again.
## Acceptance criteria
- Turning Dictation off stops the dictation shortcut and hides or disables the floating button; turning Clipboard off stops recording copies and releases ⇧⌘V (so it reaches the frontmost app again).
- Both choices are stored in `Settings` like `suggestions.isEnabled`, so they survive a relaunch, and Settings shows the same state.
- If either is not wanted as a real switch, the item is removed from the menu instead (product call).
- Tests cover `setFeature` for each feature changing what the app watches; `MenuBarPresentationTests` keeps covering the drawing.
Contributor guide
Research direction
Start in Sources/Uttrflow/AppDelegate.swift at menuSwitches, setFeature, the clipboard watcher, and startWatchingForClaimedShortcuts; compare these with Sources/UttrflowUX/MenuBarPresentation.swift and the Settings state. Run the relevant existing tests, including MenuBarPresentationTests. Done means Dictation and Clipboard switches control their shortcut, button, watcher, and panel behavior, persist across relaunches, and have coverage for setFeature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 57/100