uttrflow / uttrflow/uttrflow-swift

The Dictionary's empty state says "Nothing is pre-loaded", and its caption counts retired words as words it knows

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

Description

## What happens

The Dictionary page's wording predates the words the app now ships with (#154, `ShippedWords` seeded at launch by `PersonalDictionaryStore.seedShippedWords`, `Sources/UttrflowDictionary/PersonalDictionaryStore.swift:84-94`). Three sentences in `Sources/UttrflowUX/DictionaryPresentation.swift` are now wrong:

1. **Empty-state footnote** (`:343-346`): "Nothing is pre-loaded. An empty dictionary means Uttrflow has not yet changed a single word of yours." Every install starts with the shipped words, so the page is only ever empty after the user deleted them, and deleted shipped words "stay deleted" (the page's own footnote, `:224`). Both sentences are false at that moment.
2. **Empty-state title** (`:336`): "No words of your own yet" is shown to someone who just deleted every word, including their own.
3. **Caption** (`:208-211`): "N words Uttrflow knows and a general model does not" counts every entry, including shipped words and retired words that are no longer applied (`snapshot.entries.count`).

## Why it matters

A user who clears the dictionary to start over is told nothing was ever there, and the count on a populated page includes words that are switched off. The Dictionary is where people learn what Uttrflow will change in their text, so its wording should be exact.

## How to reproduce

- `DictionaryPresenter.page(for: DictionarySnapshot(now: .now))` returns the footnote "Nothing is pre-loaded…".
- With one active and one retired entry, the caption says "2 words Uttrflow knows…".

## Acceptance criteria

- The empty state no longer says nothing is pre-loaded, and its title fits someone who emptied the dictionary (for example "Your dictionary is empty"). Keep the existing explanation of how words arrive.
- The caption counts only words that are applied, or says how many are retired (for example "24 words, 2 retired").
- Tests updated: `Tests/UttrflowUXTests/DictionaryPresentationTests.swift:43` (caption), `:235` and `:237` (empty state), plus a case with a retired entry.

## Where to start

- `Sources/UttrflowUX/DictionaryPresentation.swift:200-216` and `:326-347`. `DictionaryEntry.isTrustworthy` tells retired words apart (see `row(for:locale:)`).
- Run `make verify` (export `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer` first) and read CONTRIBUTING.md.

**Size:** XS, under an hour.

Contributor guide

Open the contributing guide

Research direction

Start in Sources/UttrflowUX/DictionaryPresentation.swift at lines 200-216 and 326-347, then inspect DictionaryEntry.isTrustworthy and row(for:locale:) to distinguish applied from retired entries. Update the dictionary caption and empty-state wording, and revise the cases at Tests/UttrflowUXTests/DictionaryPresentationTests.swift:43, :235, and :237, adding the retired-entry case. Run make verify with the specified DEVELOPER_DIR and read CONTRIBUTING.md.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
desktop
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
92/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.