uttrflow / uttrflow/uttrflow-swift

The recording-cap countdown is never shown on the floating button, and says "1 min left" for the whole final minute

Open
#557 0 comments 0 reactions 0 assignees View on GitHub
area:dictation bug P2
Dominant language
Swift
Stars
4
Forks
17
Avg merge
3h 32m
Merged PRs (30d)
277

Description

## What happens

`Docs/stuck-recording.md:103-106` says that at 3 minutes "the menu bar and the floating button count down — 'Listening… 1 min left'", and at 4 minutes the dictation finishes itself.

On main:

- `DictationController.watchTheLimit()` (`Sources/UttrflowPipeline/DictationController.swift:317-333`) sends `.approaching(remaining:)` once, at `warnAfter`, and then sleeps until the cap. Nothing sends a later value, so `RemainingTime.phrase` renders "1 min left" for the entire minute and never reaches "30 sec left" or "10 sec left".
- `DictationPresenter.dock(for: .recording, advice:)` puts that phrase in `secondaryLine` (`Sources/UttrflowPipeline/DictationPresenter.swift:40-48`), but the listening form of the button draws only the mark and the level meter: `DockView.listening()` ignores `primaryLine` and `secondaryLine` ("with no words and no clock", `Sources/Uttrflow/Dock/DockView.swift:156-159`). The phrase reaches only the VoiceOver label, which is not announced (#551), and the menu bar's status line, which is visible only while the menu is open.

So in practice nothing on screen warns before the recording ends itself at 4 minutes.

## Why it matters

The minute of warning exists "so a speaker ends their own sentence rather than having it ended for them". Without it, long dictations (meeting notes, drafts) are cut mid-sentence with no notice.

## How to reproduce

Covered by reading the code above; to see it, hold the shortcut (or double-tap for hands-free) for more than three minutes with the floating button on, and watch the button and the closed menu bar icon.

## Acceptance criteria

- From `warnAfter` the floating button shows the remaining time in its listening form without changing its footprint more than necessary (or the doc is changed to say where the warning is shown instead).
- The countdown updates at least at the steps `RemainingTime` already defines (minutes, then tens of seconds).
- A `ManualClock` test in `Tests/UttrflowPipelineTests/DictationLimitWiringTests.swift` checks that more than one `.approaching` value is sent before `.finishNow`.

Contributor guide

Open the contributing guide

Research direction

Start with DictationController.watchTheLimit() in Sources/UttrflowPipeline/DictationController.swift and the listening form in Sources/Uttrflow/Dock/DockView.swift, then review DictationPresenter.swift and RemainingTime. Run the ManualClock tests in Tests/UttrflowPipelineTests/DictationLimitWiringTests.swift. Done means the floating button visibly shows the countdown and multiple .approaching values arrive before .finishNow.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
accessibility, desktop, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.