uttrflow / uttrflow/uttrflow-swift
Reopening the app doesn't bring back a closed main window while Settings is open
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## What happens
Close the main window while the Settings window stays open, then click the Dock icon (or open the app again from Finder). The main window does not come back.
`AppDelegate.applicationShouldHandleReopen` (`Sources/Uttrflow/AppDelegate.swift:321-326`) only shows the main window when `hasVisibleWindows` is `false`. The open Settings window makes it `true`, so nothing happens.
## Why it matters
The main window is where history, the dictionary and diagnostics live. The only way back in this state is the menu bar item or the Window menu shortcut, which a person who just clicked the Dock icon is not thinking of.
## How to reproduce
1. `make app`, open `dist/Uttrflow.app`.
2. Open Settings (⌘,).
3. Close the main window, leaving Settings open.
4. Click Uttrflow in the Dock. Settings comes forward; the main window does not appear.
## Acceptance criteria
- Reopening the app shows the main window when it is not visible, whatever other windows are open. Settings stays open.
- When the main window is already visible, reopening behaves as today.
- The decision is testable: move it into a small function (for example taking whether the main window is visible) with tests in `Tests/UttrflowTests`, since `AppDelegate.swift` is excluded from coverage.
Contributor guide
Research direction
Start in Sources/Uttrflow/AppDelegate.swift:321-326 at applicationShouldHandleReopen, then inspect the main-window visibility state used there. Move the reopen decision into a small testable function as suggested, and add tests under Tests/UttrflowTests for the main window being hidden or visible while Settings remains open. Done means reopening restores a hidden main window, preserves the current behavior when it is visible, and leaves Settings open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100