Skip to content

Fix startup focus retry stealing focus#316

Merged
altic-dev merged 1 commit intomainfrom
B/fix-startup-focus-retry
May 2, 2026
Merged

Fix startup focus retry stealing focus#316
altic-dev merged 1 commit intomainfrom
B/fix-startup-focus-retry

Conversation

@altic-dev
Copy link
Copy Markdown
Owner

Description

Stops delayed startup foreground retries from reactivating FluidVoice after the user has already clicked into another app. The initial launch foreground behavior remains, but later retries now bail when FluidVoice is no longer active/frontmost.

Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update

Related Issues

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS 26.3
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Built locally: sh build_incremental.sh

Notes

  • Release notes updated locally under RELEASE_NOTES_1.5.13-beta.1.md; file is gitignored by design.
  • SwiftFormat also normalized two self. references in HotkeyShortcut.swift.

Screenshots / Video

Not included; behavior verified by local build/install/launch.

@altic-dev altic-dev merged commit b2e9af7 into main May 2, 2026
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42148e7e78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

for delay in [0.0, 0.12, 0.35, 1.0, 2.0, 4.0] {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) { [weak self] in
guard let self else { return }
guard delay == 0.0 || self.shouldContinueLaunchForegroundRetry() else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep launch retries running until activation settles

The new guard delay == 0.0 || self.shouldContinueLaunchForegroundRetry() can prematurely stop all delayed foreground attempts even when the user has not switched apps, because NSApp.activate(ignoringOtherApps:) does not make NSApp.isActive true synchronously and frontmostApplication can still briefly report the previous app. In the common case where the main window is not yet created at 0.0s, the 0.12s retry may bail due to this transient state and the remaining retries are skipped, regressing the original startup behavior where retries were meant to wait for late window creation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐞 BUG]

1 participant