uttrflow / uttrflow/uttrflow-swift
With an AI suggestion showing, closing a find bar or dialog with Escape takes three presses
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
While an AI suggestion is showing, closing a sheet, popover or search field with Escape takes three presses.
`KeyRouting.decision` (`Sources/UttrflowPredict/KeyRouting.swift:49-107`):
1. with a ghost drawn, ⎋ → `.dismiss(.minimise)`: swallowed, the dot stays (`:93-94`)
2. with the dot drawn, ⎋ → `.dismiss(.silenceField)`: swallowed again (`:53-55`)
3. only now does ⎋ reach the application.
`Docs/predict-accept.md` ("The escape ladder") documents the ladder and says Escape with *nothing* drawn is not taken. It does not consider that the dot left by the first press is itself something drawn, so the second press is also taken. In a find bar, a URL field, a spotlight-style launcher or a dialog's text field, Escape is how you leave, and the first two presses do nothing the user can see beyond the grey text shrinking to a dot.
## Why it matters
Keyboard-only and VoiceOver users (who cannot see the dot at all, #532) press Escape and nothing closes. They press again, and still nothing closes. It feels like the app is stuck.
## How to reproduce
Code reading above. With a ghost shown in a browser's find bar, press Escape once: the ghost becomes a dot and the bar stays open. Press again: the field is silenced and the bar stays open. Press a third time: the bar closes.
## Acceptance criteria (product decision needed)
- One option: the first ⎋ dismisses the suggestion *and* passes through, or the dot no longer arms ⎋, so at most one press is taken.
- `ArmedKeys` and `KeyRouting` tests in `Tests/UttrflowPredictTests` and `Docs/predict-accept.md` are updated to match.
Contributor guide
Research direction
Start with KeyRouting.decision in Sources/UttrflowPredict/KeyRouting.swift:49-107 and review the existing ArmedKeys and KeyRouting tests in Tests/UttrflowPredictTests. Compare the behavior with the “escape ladder” in Docs/predict-accept.md, then resolve the product decision about whether the first Escape passes through or the dot no longer arms Escape. Done means the Escape behavior takes at most one press and the tests and documentation match it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- accessibility, desktop, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100