uttrflow / uttrflow/uttrflow-swift
"Reset personalisation" promises a fresh install but leaves waiting recordings, snippets and set-aside copies of the history and clipboard files
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
The row says it "Puts Uttrflow back to a fresh install" (`Sources/UttrflowUX/SettingsPresenter.swift:655-656`). Its level `.everything` removes `[.everyWord, .history, .clipboard, .everySuggestion, .preferences]` (`Sources/UttrflowUX/SettingsReset.swift:41`). The suggestions store is #640. The reset does not reach the following:
- **Recordings.** Audio of dictations that could not become text stays in `Application Support/Uttrflow/recordings/*.wav` (`Sources/UttrflowAudio/RecordingStore.swift:28-33`). No reset target names the recording store. `AppDelegate.forget(after:)` clears only `lastCleaning` and the in-memory diagnostics (`Sources/Uttrflow/AppDelegate.swift:1347-1357`).
- **Snippets.** `SnippetStore.deleteEverything()` (`Sources/UttrflowAI/SnippetStore.swift:88`) has no caller anywhere in `Sources/`.
- **Set-aside files.** When a store file cannot be read or decoded, `LocalStore.read` renames it to `.unreadable-` beside the original (`Sources/UttrflowCore/Support/StoredList.swift:40-56`, `:67-86`). This happens for `history.v1.json`, `clipboard.v1.json`, `saved.v1.json` and the dictionary. Nothing ever deletes these files: the only reference outside `StoredList.swift` is a presence check (`Sources/UttrflowClipboard/ClipboardStore.swift:437`). They hold a complete earlier copy of every transcript or clip. Neither retention nor reset applies to them, and their contents never appear in the app. (#617 covers why a whole file gets set aside; this issue is about the copies never going away.)
- **The AI suggestions consent file.** `predict-consent.v1.json` (`Sources/UttrflowPredictCapture/CapturePreferences.swift:74-75`) is never removed.
The confirmation counts only words and transcripts (`SettingsPresenter.swift:680-688`), so it cannot warn about any of these.
## Why it matters
Reset is what someone uses before handing the Mac to somebody else, or after dictating something they regret. Audio of their voice, their snippets (often addresses, phone numbers and sign-offs) and full old copies of their transcripts and clipboard stay on disk. Nothing in the app can show that those files exist.
## How to reproduce
1. Make a dictation fail so it is kept for retry (for example, stop the speech model mid-load), or put a set-aside file in place: copy `history.v1.json` to `history.v1.json.unreadable-1`.
2. Add a snippet.
3. Settings → Reset personalisation → Reset.
4. `ls ~/Library/Application\ Support/Uttrflow/` still shows `recordings/*.wav`, `snippets.v1.json` and the set-aside file.
## Acceptance criteria
- `.everything` also removes waiting recordings, snippets, every `*.unreadable-*` file of the stores it resets, and the consent file. Alternatively, the copy stops saying "fresh install" and lists what stays.
- Set-aside files get a lifetime (for example, removed after the retention period, or on the next successful write), and it is documented in `Docs/history-store-file.md` / `Docs/clipboard-store.md`.
- Tests in `Tests/UttrflowUXTests` (via `FilePersonalisationStore` on a temporary directory) show that each of these files is gone after `carryOut(.everything)`.
Contributor guide
Research direction
Start with SettingsPresenter.swift, SettingsReset.swift, and FilePersonalisationStore, then inspect RecordingStore.swift, SnippetStore.swift, StoredList.swift, CapturePreferences.swift, and AppDelegate.swift to trace `.everything`. Run the Tests/UttrflowUXTests reset coverage with a temporary directory; done means the specified recordings, snippets, set-aside files, and consent file are removed, with retention behavior documented in the named Docs files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- desktop, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 67/100