uttrflow / uttrflow/uttrflow-swift
A correction can only be seen or undone on the day it was made; after midnight no page shows it
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
The Corrections page lists only changes made today:
```swift
// Sources/UttrflowUX/CorrectionsPresentation.swift:197-199
/// Today only; everything older belongs to the dictation it happened in, which is on History.
static func madeToday(_ snapshot: CorrectionsSnapshot, calendar: Calendar) -> [Correction] {
snapshot.corrections.filter { calendar.isDate($0.when, inSameDayAs: snapshot.now) }
```
History does not show corrections. A History row is an application, a time and the text (`Sources/UttrflowUX/HistoryPresentation.swift:27-44`, drawn by `Sources/Uttrflow/Main/HistoryPageView.swift:30-53`), with no changes badge and no undo. The Dictation page's "2 changes" link (`Sources/UttrflowUX/MainDictationPresentation.swift:232-236`) exists only for today's rows, and it opens Corrections, which is also today only.
So at midnight every correction from the day before disappears from the app: it can no longer be seen or undone, although it is still stored with its dictation for the whole retention period.
The Corrections page's own promises make this worse: "Every word Uttrflow changed today, and why. A product that quietly rewrites what you said owes you this page … and nothing here is permanent." (`:141-146`), and "Undo teaches Uttrflow. Undo a word more often than you keep it and it stops being applied" (`:155-156`). Undo is how a wrong dictionary word is retired, so a mistake noticed the next morning cannot count towards retiring it.
## Why it matters
People notice a wrong substitution when they reread the message or document, often the next day. The one tool for telling Uttrflow a dictionary word is wrong is then out of reach, and the page that says it hides nothing has hidden it. A dictation made at 23:55 has five minutes of undo.
## How to reproduce
Dictate a sentence that triggers a dictionary correction, confirm it on Corrections, then move the Mac's clock past midnight (or build a `CorrectionsSnapshot` in a test with `now` one day after the correction): the page shows "Uttrflow changed nothing you said today", and no other page lists the change.
## Acceptance criteria
- A correction can be seen and undone for as long as its dictation is kept. Either Corrections gains the retention window (a day scope such as Today / Last 7 days, matching the existing scope pop-up), or History rows show their changes with Undo; decide on the issue.
- The comment on `madeToday` matches what the app does.
- Tests in `Tests/UttrflowUXTests/CorrectionsPresentationTests.swift` (and `HistoryPresentationTests.swift` if History gains it) cover a correction from yesterday.
Contributor guide
Research direction
Start with madeToday in Sources/UttrflowUX/CorrectionsPresentation.swift and read the related CorrectionsPresentationTests.swift cases, then inspect the History presentation and tests if choosing to expose changes there. Use the existing scope pop-up and the retention behavior to choose the user-facing approach; done means yesterday’s correction is visible and undoable, the madeToday comment is accurate, and tests cover a correction from yesterday.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100