fix(macos): match mode applications when Finder shows extensions - #66
Merged
kitlangton merged 1 commit intoSep 3, 2026
Merged
Conversation
The application picker names an app with NSFileManager.displayNameAtPath, which honors Finder's "Show all filename extensions" preference and returns "Ghostty.app", while mode selection compares it with the frontmost application's localizedName, "Ghostty". Modes saved on such a Mac never activated and every dictation fell back to Global. Strip the bundle extension when the picker builds the catalog entry and on both sides of the application comparison, and rewrite already persisted activations on settings load like the other migrations. Record the rule and the released-version defect in the feature map. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
|
Merged, thanks for tracking this down and including the settings migration. I verified 439 passing tests (9 opt-in tests skipped), all 12 keyboard-layout regression scenarios, formatting, and Clippy across all targets and features. The fix is on main and will be included in a future app release. I did not run a live Finder-preference/picker interaction test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer : this has been heavily generated by IA, I am not familiar with Rust but I proof read everything and made sure everything passed.
I found a workaround by closing Hex, removing the ".app" in the settings.json and reopening Hex so this is not urgent.
Problem
A dictation mode that activates on an application never matches when Finder's "Show all filename extensions" preference is enabled. Every dictation falls back to the Global mode.
The application picker names an app with
NSFileManager.displayNameAtPath, which honors that Finder preference and returnsGhostty.app. Mode selection compares that stored name with the frontmost application'sNSRunningApplication.localizedName, which is alwaysGhostty. The comparison incontext.rsis a plain case-insensitive equality, soGhostty.appnever equalsGhostty.Observed on 2.1.13 with
AppleShowAllExtensions = 1:settings.jsonheld"applications": ["Ghostty.app", "Slack.app", ...],live.ndjsonreported"application": "Ghostty", andprocess.logloggedprofile="Global"for every dictation.The existing
finder_has_native_picker_metadata_and_an_icontest also fails on such a machine before this change, becausemetadatareturnsFinder.app.Fix
application_catalog::metadatastrips a trailing.appfrom the picker name, so new activations are stored the way the foreground context reports them.context::application_names_equalstrips the suffix on both sides, so activations written by either form keep matching. The helper is shared.app_settings::load_fromrewrites already persisted.appactivations on load and persists the migration like the existing microphone and transcription migrations, so affected users are repaired without touchingsettings.jsonby hand.docs/features/README.mdrecords the matching rule, the checks, and the released-version defect with its workaround, perAGENTS.md.Checks
cargo fmt --all --checkcargo test --locked --bin voice-control: 439 passed, 0 failed (macOS 26, Xcode 26.6, Apple M4 Pro)cargo clippy --locked --bin voice-control --tests -- -D warningsgit diff --checkNew tests:
application_matching_ignores_finder_bundle_extensions,bundle_extension_stripping_only_removes_a_trailing_suffix,loading_strips_finder_bundle_extensions_from_mode_applications.Not covered: the picker UI still compares
mode.applications.contains(&name)with the catalog name; both sides are now suffix-free, but no GPUI test drives the picker.