Skip to content

Keep main window hidden during dictation#668

Draft
altic-dev wants to merge 4 commits into
mainfrom
B/fix-631-hidden-window-dictation
Draft

Keep main window hidden during dictation#668
altic-dev wants to merge 4 commits into
mainfrom
B/fix-631-hidden-window-dictation

Conversation

@altic-dev

Copy link
Copy Markdown
Owner

Description

Keeps the main FluidVoice window hidden when dictation starts after Command-H, while restoring it on intentional app activation.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #631

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 27.0
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally: FI build/install and live Command-H, minimize, close, and reopen checks

Screenshots / Video

  • No UI/visual changes; screenshots/video are not applicable.

Notes

Preserves standard minimize, close, and intentional reopen behavior.

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR keeps the main FluidVoice window hidden during dictation after Command-H. The main changes are:

  • Tracks the main window hidden by an app-hide action.
  • Suppresses launch-time window reveals while the app remains hidden.
  • Restores the captured window on intentional activation.
  • Preserves login-item, minimize, close, and reopen behavior.

Confidence Score: 5/5

This looks safe to merge.

  • The launch retry continues until a hidden main window can be captured.
  • Internal reopen handling preserves the hide state.
  • Intentional activation clears suppression and restores the captured window.
  • No blocking issues were found in the changed code.

Reviews (4): Last reviewed commit: "fix: distinguish system-hidden login lau..." | Re-trigger Greptile

Comment thread Sources/Fluid/AppDelegate.swift Outdated

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

Copy link
Copy Markdown

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: 254ab69332

ℹ️ 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".

Comment thread Sources/Fluid/AppDelegate.swift Outdated
func applicationWillHide(_ notification: Notification) {
// A nonactivating recording panel can make AppKit unhide the process. Remember
// the visible main window so the panel does not restore it along with itself.
self.didRevealMainWindowOnLaunch = true

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 Do not mark a hidden login launch as fully bootstrapped

When macOS starts a login item hidden, applicationWillHide can run before the delayed openMainWindowOnLaunch() attempts. Setting didRevealMainWindowOnLaunch here makes every retry return at its guard, so the silent-login path never calls bootMainWindowHiddenIfPresent() to realize ContentView; the menu bar and services that its startup initializes may remain unavailable until the user manually reopens the app. Track completion of the launch boot separately from suppressing a reveal after Command-H.

Useful? React with 👍 / 👎.

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

Copy link
Copy Markdown

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: e6455931db

ℹ️ 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".

guard self.didRevealMainWindowOnLaunch == false else { return }

if revealWindow {
let shouldRevealWindow = revealWindow && !self.shouldSuppressMainWindowLaunchReveal

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor show-at-login after an initially hidden launch

When macOS delivers applicationWillHide before the delayed launch attempts and showMainWindowAtLoginLaunch is enabled, this condition makes shouldRevealWindow false, so the code takes bootMainWindowHiddenIfPresent(), marks launch complete, and never reveals the window requested by the preference. Although the hidden boot now completes, the newly retained shouldSuppressMainWindowLaunchReveal branch is fresh evidence that the enabled-preference path remains bypassed; distinguish an explicit Command-H from the system's initially hidden login launch before suppressing the reveal.

Useful? React with 👍 / 👎.

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

Copy link
Copy Markdown

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: b806f9a3f7

ℹ️ 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".

// A nonactivating recording panel can make AppKit unhide the process. Remember
// the visible main window so the panel does not restore it along with itself.
self.shouldSuppressMainWindowLaunchReveal = true
self.mainWindowHiddenByAppHide = NSApp.windows.first {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Track every visible main window during hide

When multiple FluidVoice windows are visible—supported by the WindowGroup declared in Sources/Fluid/fluidApp.swift:25—this first records only one of them. applicationDidHide therefore orders out only that window, so when the recording panel unhides the process, the other main windows can reappear despite Command-H; retain and order out all matching visible main windows instead.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

FluidVoice PR build ready

Download FluidVoice-PR-668-b806f9a3f77f

The artifact contains the ad-hoc-signed app ZIP, Xcode archive, build manifest, and installation instructions. It expires 5 days after the build.

Install the app

  1. Extract the downloaded artifact, then extract FluidVoice-PR-668.app.zip.

  2. Move FluidVoice Keep main window hidden during dictation #668.app into the /Applications folder.

  3. Open Terminal and remove the download quarantine marker:

    xattr -dr com.apple.quarantine "/Applications/FluidVoice #668.app"
    
  4. In Applications, Control-click FluidVoice Keep main window hidden during dictation #668.app and choose Open.

  5. If macOS still blocks it, open System Settings → Privacy & Security, click Open Anyway, and confirm.

This build has its own app identity, so its permissions are separate from the release version of FluidVoice.

View workflow run

@altic-dev
altic-dev marked this pull request as draft July 21, 2026 01:20
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] App screen opens when pressing hotkey to speak

1 participant