Declare speech recognition usage description#4992
Conversation
|
@christophsturm is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
@codex review |
📝 WalkthroughWalkthroughThe PR declares NSSpeechRecognitionUsageDescription in Info.plist and localized strings, adds a UI test source to the Xcode project, and implements a bundle test that asserts the speech recognition usage string is present in the app bundle. ChangesSpeech Recognition Permission Declaration and Validation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 17 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (17 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
To use Codex here, create a Codex account and connect to github. |
@christophsturm I have started the AI code review. It will take a few minutes to complete. |
|
To use Codex here, create a Codex account and connect to github. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get PR details and files changed
gh pr view 4992 --repo manaflow-ai/cmux --json title,body,files,headRefName,baseRefName
echo "---FILES CHANGED---"
gh pr diff 4992 --repo manaflow-ai/cmuxLength of output: 10171
✅ Positives
|
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the change is a minimal Info.plist addition with full localization coverage and a targeted regression test. The change correctly declares NSSpeechRecognitionUsageDescription in both the base Info.plist and the xcstrings catalog, covers all 18 locales already present in the catalog, and the author manually verified the fix end-to-end. The accompanying test is locale-independent and checks the bundle at runtime. No production logic is modified. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant App as CLI App (in cmux)
participant OS as macOS Privacy Framework
participant Bundle as cmux App Bundle
App->>OS: Request speech recognition
OS->>Bundle: Read NSSpeechRecognitionUsageDescription
Bundle-->>OS: Localized usage string (from InfoPlist.xcstrings)
OS-->>App: Show permission dialog with usage description
App-->>App: Speech recognition authorized
Reviews (8): Last reviewed commit: "Normalize privacy usage test project ind..." | Re-trigger Greptile |
Greptile SummaryThis PR declares
Confidence Score: 3/5The core fix is correct and necessary, but the new xcstrings entry is incomplete — all 17 non-English locales the catalog already supports are absent, so non-English users will see a raw English permission prompt. The NSSpeechRecognitionUsageDescription key is correctly wired into Info.plist and verified by the new test. The gap is that InfoPlist.xcstrings only carries an English translation while every other usage-description key in the same catalog has up to 17 additional locale entries; shipping without those translations means a degraded permission experience for a large portion of users until the gap is filled. Resources/InfoPlist.xcstrings needs translated entries for all locales already present in the catalog (ja, zh-Hans, zh-Hant, ko, de, es, fr, it, da, pl, ru, bs, ar, nb, pt-BR, th, tr). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App in cmux requests speech recognition] --> B{NSSpeechRecognitionUsageDescription present in bundle?}
B -- No --> C[macOS silently denies permission]
B -- Yes --> D[macOS shows permission prompt]
D --> E{System locale?}
E -- English --> F[Shows English string ✓]
E -- ja / zh / de / es / fr / ko / other 17 locales --> G[Falls back to English string ⚠ missing translations]
Reviews (1): Last reviewed commit: "Declare speech recognition usage descrip..." | Re-trigger Greptile |
| "NSSpeechRecognitionUsageDescription": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "A program running within cmux would like to use speech recognition." | ||
| } | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Missing translations for all supported locales
The new NSSpeechRecognitionUsageDescription entry is only provided in English, but the catalog already carries translations for NSMicrophoneUsageDescription (the most structurally similar key) in ja, zh-Hans, zh-Hant, ko, de, es, fr, it, da, pl, ru, bs, ar, nb, pt-BR, th, and tr. Users running cmux on a device set to any of those locales will see the raw key or the English fallback instead of a translated permission prompt — which on macOS Ventura+ typically surfaces as an untranslated string in the system privacy dialog. The same applies to NSBluetoothAlwaysUsageDescription (ja) and NSCameraUsageDescription (ja), so at minimum a Japanese translation is required to match the baseline set by every other key in this file.
Rule Used: Flag production user-facing text that is not fully... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| B3575000000000000000000A /* PiVaultAgentPersistenceTests.swift in Sources */, | ||
| D0B10008A1B2C3D4E5F60001 /* PortalTabDragRoutingTests.swift in Sources */, | ||
| F4100000A1B2C3D4E5F60718 /* PortScannerTests.swift in Sources */, | ||
| C0DEF5000000000000000001 /* PrivacyUsageDescriptionBundleTests.swift in Sources */, |
There was a problem hiding this comment.
This line has one fewer level of indentation than its neighbours in the Sources build phase list, which will cause Xcode to regenerate the project file and produce noisy diffs on the next project save.
| C0DEF5000000000000000001 /* PrivacyUsageDescriptionBundleTests.swift in Sources */, | |
| C0DEF5000000000000000001 /* PrivacyUsageDescriptionBundleTests.swift in Sources */, |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Greptile SummaryThis PR adds
Confidence Score: 4/5The core fix — declaring the plist key — is correct and unblocks speech recognition for CLI programs running inside cmux. The string catalog entry needs translations for the 17 non-English locales the app already ships. The plist and test changes are straightforward and correct. The only gap is that InfoPlist.xcstrings only includes an English translation, while comparable entries like NSMicrophoneUsageDescription carry 18 locales. Every non-English user who encounters a speech-recognition permission prompt will see the English string instead of a localized one. Resources/InfoPlist.xcstrings — needs translations added for ja, zh-Hans, zh-Hant, ko, de, es, fr, it, da, pl, ru, bs, ar, nb, pt-BR, th, and tr. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CLI program inside cmux\nrequests speech recognition] --> B{NSSpeechRecognitionUsageDescription\npresent in Info.plist?}
B -- No --> C[macOS silently denies access\nor crashes]
B -- Yes --> D[macOS shows permission dialog\nwith usage description string]
D --> E{User locale}
E -- en --> F[Translated string shown ✓]
E -- ja / zh / ko / de / fr\n/ es / it / da / pl / ru\n/ bs / ar / nb / pt-BR\n/ th / tr --> G[Fallback to English string\nor missing — needs translation]
|
| "NSSpeechRecognitionUsageDescription": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "A program running within cmux would like to use speech recognition." | ||
| } | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Missing translations for all supported locales
The new NSSpeechRecognitionUsageDescription entry is only translated into English, but the catalog already carries 17 other locales for comparable keys like NSMicrophoneUsageDescription: ja, zh-Hans, zh-Hant, ko, de, es, fr, it, da, pl, ru, bs, ar, nb, pt-BR, th, tr. Users running cmux under any of those system languages will be shown the English fallback instead of a localized permission prompt. Per the full-internationalization rule, every locale already present in the touched catalog must be covered by a new entry.
Rule Used: Flag production user-facing text that is not fully... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| B3575000000000000000000A /* PiVaultAgentPersistenceTests.swift in Sources */, | ||
| D0B10008A1B2C3D4E5F60001 /* PortalTabDragRoutingTests.swift in Sources */, | ||
| F4100000A1B2C3D4E5F60718 /* PortScannerTests.swift in Sources */, | ||
| C0DEF5000000000000000001 /* PrivacyUsageDescriptionBundleTests.swift in Sources */, |
There was a problem hiding this comment.
The new Sources entry is indented with one fewer tab than every surrounding line, breaking the consistent five-tab indent level used throughout this section of the project file.
| C0DEF5000000000000000001 /* PrivacyUsageDescriptionBundleTests.swift in Sources */, | |
| C0DEF5000000000000000001 /* PrivacyUsageDescriptionBundleTests.swift in Sources */, |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Resources/InfoPlist.xcstrings`:
- Around line 152-162: The new InfoPlist localization key
NSSpeechRecognitionUsageDescription currently only has an English entry; add
fully translated entries for every locale already present in this localization
catalog (i.e., mirror the set of locale keys used elsewhere in this
Resources/*.xcstrings catalog), not placeholders or en fallbacks. For each
locale add the same structure as the "en" block (include "stringUnit" with
"state": "translated" and a proper translated "value") so the key is present and
marked translated for all supported locales; ensure the key name
NSSpeechRecognitionUsageDescription matches exactly across entries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2d47f4e6-1cd5-479d-875d-756789b2e73e
📒 Files selected for processing (4)
Resources/Info.plistResources/InfoPlist.xcstringscmux.xcodeproj/project.pbxprojcmuxTests/PrivacyUsageDescriptionBundleTests.swift
| "NSSpeechRecognitionUsageDescription": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "A program running within cmux would like to use speech recognition." | ||
| } | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Add full locale coverage for the new usage-description key.
NSSpeechRecognitionUsageDescription is added with only en, but this catalog/project already supports multiple locales. Please add translated entries for each existing locale in this catalog (not placeholders or copied English fallbacks).
As per coding guidelines, “Every new Swift localization key must be backed by a matching Resources/*.xcstrings entry with translated values for every locale already supported by that catalog.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Resources/InfoPlist.xcstrings` around lines 152 - 162, The new InfoPlist
localization key NSSpeechRecognitionUsageDescription currently only has an
English entry; add fully translated entries for every locale already present in
this localization catalog (i.e., mirror the set of locale keys used elsewhere in
this Resources/*.xcstrings catalog), not placeholders or en fallbacks. For each
locale add the same structure as the "en" block (include "stringUnit" with
"state": "translated" and a proper translated "value") so the key is present and
marked translated for all supported locales; ensure the key name
NSSpeechRecognitionUsageDescription matches exactly across entries.
c24195c to
aa4dbba
Compare
|
https://github.com/coderabbitai review |
@christophsturm I have started the AI code review. It will take a few minutes to complete. |
Summary
add NSSpeechRecognitionUsageDescription
command line apps that use speech recognition did not work with cmux
Testing
i have a test suite that uses speech recognition in its e2e test that works on ghostty and did not work on cmux and with this change it works
i also added a test case
verified manually that my test suite now works with cmux
Checklist
note there are already 2 prs that would also fix this but none of them has test coverage and it did not look like they were going to be merged soon.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by cubic
Added NSSpeechRecognitionUsageDescription to the app bundle so programs using speech recognition work under cmux and show the correct macOS permission prompt.
Written for commit bd1223e. Summary will update on new commits.
Summary by CodeRabbit
New Features
Tests