uttrflow / uttrflow/uttrflow-swift
Remove five declarations nothing calls: removeFromMenuBar, isFirstWord, observerCount, casesInventingWords and acceptGlyph
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
Each of these is referenced only by its own declaration (or only by its own tests), checked with `git grep -w -- Sources Tests UITests`:
| Declaration | Sources | Tests |
|---|---|---|
| `func removeFromMenuBar()`, `Sources/Uttrflow/MenuBar/MenuBarController.swift:36` | 1 | 0 |
| `var isFirstWord`, `Sources/UttrflowPredict/CompletionToken.swift:12` | 1 | 0 |
| `var observerCount`, `Sources/UttrflowPipeline/StateObservers.swift:30` ("so a test can prove a finished stream is let go of"; no test does) | 1 | 0 |
| `public var casesInventingWords`, `Sources/UttrflowEval/CaseScore.swift:85` | 1 | 0 |
| `var acceptGlyph`, `Sources/UttrflowUX/SuggestionPresentation.swift:137` (the footer builds `acceptKey.glyph` itself) | 1 | 3 |
## Why it matters
A newcomer reading `removeFromMenuBar` ("Without it the item lingers until the process dies") will reasonably look for where it is called on quit, and find nothing. Unused API is also coverage the 95% floor has to carry.
## Acceptance criteria
- Each declaration is either removed, or used where its comment says it should be (for `observerCount`, a test that proves a finished stream is let go of; for `acceptGlyph`, the footer using it). Say which in the pull request.
- Tests that only exercised a removed declaration are removed with it.
- `make verify` passes, including the coverage floor.
## Where to start
- The five files above; `Tests/UttrflowUXTests/SuggestionPresentationTests.swift` holds the `acceptGlyph` tests.
- Read [CONTRIBUTING.md](https://github.com/uttrflow/uttrflow-swift/blob/main/CONTRIBUTING.md) first, and say on this issue that you are taking it.
- Before pushing, run `make verify` (with `DEVELOPER_DIR` pointing at Xcode 26.6 or later). It is the same command CI runs.
**Size:** XS to S, about 1 hour.
Contributor guide
Research direction
Read CONTRIBUTING.md first, then inspect the five declarations in MenuBarController.swift, CompletionToken.swift, StateObservers.swift, CaseScore.swift, and SuggestionPresentation.swift. Check the acceptGlyph tests in Tests/UttrflowUXTests/SuggestionPresentationTests.swift and remove or connect each declaration as appropriate, removing obsolete tests. Run make verify with the required Xcode version; done means the coverage floor and CI-equivalent verification pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100