Skip to content

feat: honor an English spelling preference in dictation cleanup - #1332

Open
mvanhorn wants to merge 4 commits into
altic-dev:mainfrom
mvanhorn:feat/english-spelling-preference
Open

mvanhorn wants to merge 4 commits into
altic-dev:mainfrom
mvanhorn:feat/english-spelling-preference

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Description

Dictation cleanup currently follows US spelling even when Apple Speech is set to en-AU or en-GB, because that locale picker is ASR-only. This change adds a stored English spelling preference (automatic, en-US, en-GB, en-AU, en-CA) and appends a short instruction to the Fluid Intelligence / dictation cleanup system prompt.

automatic is the default, so existing users keep current behavior. The Apple Speech locale picker is unchanged. There is no new settings screen, picker, or SwiftUI view; this PR is the preference type, persistence, and prompt plumbing for #492.

Type of Change

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

Related Issue or Discussion

Closes #492

Testing

Standalone Foundation tests compiled with swiftc (not xcrun, not the Xcode suite) on Linux.

Command:

sh Tests/run_english_spelling_preference_tests.sh

Expected before this change: compile fails because Sources/Fluid/Persistence/EnglishSpellingPreference.swift is missing.

Actual before this change:

<unknown>:0: error: error opening input file 'Sources/Fluid/Persistence/EnglishSpellingPreference.swift' (No such file or directory)
EXIT:1

Expected after this change: PASS: 47 English spelling preference assertions. Default/unknown stored values stay automatic and leave a sample cleanup prompt unchanged. en-GB / en-AU instructions mention British / Australian spelling and colour/organise/centre. en-US mentions American spelling and color/organize/center. Applying appends the instruction to the default dictation cleanup body and is idempotent.

Actual after this change:

PASS: 47 English spelling preference assertions
EXIT:0

Verified with that standalone swiftc script on Linux (Debian 13, Swift 6.4.2, x86_64). Independently re-run at 6:09 AM PT, America/Los_Angeles: 47 assertions, EXIT 0. Not tested on an Intel Mac or an Apple Silicon Mac. The Xcode test suite, SwiftLint, and SwiftFormat were not run here.

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version:
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally: sh Tests/run_english_spelling_preference_tests.sh (47 assertions, Linux swiftc)

Screenshots / Video

Animated replay of real captured command output, not a live UI recording. The capture shows the cleanup prompt for automatic, then en-AU and en-GB (colour, organise, centre), and the passing test run.

demo

Notes

Default is automatic, so cleanup prompts stay as they are until a regional value is stored. No new UI. The Apple Speech locale picker is still ASR-only and is not changed by this preference. Backup/restore includes the new key the same way as selectedAppleSpeechLocaleIdentifier; older backups without the key keep the current value.

Local tooling helped draft the change. The implementation and tests were reviewed in full.

  • A human created this PR or reviewed and approved it before submission, understands the full diff, and takes responsibility for the change.

The contribution requirements are mandatory. PRs that do not follow CONTRIBUTING.md will not be reviewed or merged until they comply, and may be closed.

Append a regional English spelling instruction to Fluid Intelligence
cleanup prompts when the stored preference is en-US, en-GB, en-AU, or
en-CA. Default remains automatic, so existing users are unchanged.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T06:55:20.690433Z ec1c4ae New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches dictation cleanup settings and prompt paths.

The scope mismatch must be resolved before merging; the new spelling picker also needs search support.

Summary

Adds a stored English spelling preference and connects it to dictation cleanup prompts.

  • Dictation cleanup can follow a saved English spelling choice.
  • Private dictation receives the saved spelling choice in its context.

Reviews (4) · Last reviewed commit: "Add an English spelling picker to dictat..." · Reviewed by Greptile

@greptile-apps

This comment has been minimized.

@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: 58c9474ffd

ℹ️ 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 on lines +1346 to +1348
self.applyingEnglishSpellingPreference(
to: self.promptResolution(for: mode, appBundleID: appBundleID).systemPrompt
)

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 Limit the spelling suffix to dictation mode

When a regional preference is stored, this also modifies Edit Mode prompts: RewriteModeService.callLLM calls this getter with .edit at Sources/Fluid/Services/RewriteModeService.swift:260. Every regional suffix includes “Keep the original language and meaning; do not translate”, so an Edit Mode request to translate selected text now conflicts with a higher-priority system instruction. Apply the cleanup suffix only when mode.normalized == .dictate so a dictation spelling preference does not constrain unrelated writing operations.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

FluidVoice PR build ready

Download FluidVoice-PR-1332-ec1c4ae441f7

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-1332.app.zip.

  2. Move FluidVoice feat: honor an English spelling preference in dictation cleanup #1332.app into the /Applications folder.

  3. Open Terminal and remove the download quarantine marker:

    xattr -dr com.apple.quarantine "/Applications/FluidVoice #1332.app"
    
  4. In Applications, Control-click FluidVoice feat: honor an English spelling preference in dictation cleanup #1332.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

Apply the regional spelling suffix only when the prompt mode is
dictation, so Edit Mode can still translate. Pass the stored preference
on private dictation requests and apply it to Fluid Intelligence prompts.

@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: 8bbbc7a06f

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

The editor's "Test prompt" sends combinedDraftPrompt as the override
system prompt, which skipped the regional spelling instruction that saved
dictation profiles get. Decorate the draft with the same mode-aware
helper so the preview matches the saved profile; Edit Mode drafts stay
unchanged.
@grohith327

Copy link
Copy Markdown
Collaborator

@mvanhorn thanks for the changes - we probably need a picker on the app ? allow users to select what their language preference is and pass that onto the post processing ?

Show a Spelling dropdown under Cleanup style so users can choose
Automatic, American, British, Australian or Canadian spelling. The
choice is stored in englishSpellingPreference, which dictation
post-processing already reads.
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Added in ec1c4ae: a Spelling picker in Settings, right under Cleanup style for primary dictation, with Automatic, American (en-US), British (en-GB), Australian (en-AU) and Canadian (en-CA). It saves to the same englishSpellingPreference setting that dictation post-processing already reads, so the choice flows straight into the cleanup prompt. The type now has allCases and displayName for the picker, with assertions in Tests/EnglishSpellingPreferenceTests.swift.

description: "Keyboard shortcut or mouse button"
)
self.dictationPromptPicker(for: .primary)
self.englishSpellingPicker()

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 Picker exceeds stated scope

This adds a spelling picker even though the PR description explicitly excludes settings pickers and SwiftUI changes. It violates the repository requirement to keep Swift changes within the stated scope. Resolve this before merging: move the picker to a separate UI change, or agree on the expanded scope and update the description.

Rule Used: What: Ensure macOS Swift PR changes match the stated scope, don’t introduce unrelated UI/UX/theming work, and don’t risk breaking existing features. Why: Keeps reviews focused, prevents scope creep (especially UI/UX), and avoids regressions or inc... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: Sources/Fluid/UI/SettingsView.swift
Line: 2040

Comment:
**Picker exceeds stated scope**

This adds a spelling picker even though the PR description explicitly excludes settings pickers and SwiftUI changes. It violates the repository requirement to keep Swift changes within the stated scope. Resolve this before merging: move the picker to a separate UI change, or agree on the expanded scope and update the description.

**Rule Used:** What: Ensure macOS Swift PR changes match the stated scope, don’t introduce unrelated UI/UX/theming work, and don’t risk breaking existing features.    Why: Keeps reviews focused, prevents scope creep (especially UI/UX), and avoids regressions or inc... ([source](https://app.greptile.com/-/switch-tenant?tenant=altic&next=%2Fcustom-context%3Fmemory%3Dc54a31bd-761f-45ed-8fcb-a3cb1158d02e))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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!

Fix in Codex

description: "Keyboard shortcut or mouse button"
)
self.dictationPromptPicker(for: .primary)
self.englishSpellingPicker()

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 Search misses spelling preference

The new picker appears only under Shortcuts, but SettingsSearchIndex has no entry or regional search terms for it. Users searching “spelling” cannot reach this control and may instead see the unrelated screen-context setting. Add a search entry and a matching settingsSearchTarget so users can find the preference by name.

Knowledge Base Used: Settings and onboarding

Prompt To Fix With AI
This is a comment left during a code review.
Path: Sources/Fluid/UI/SettingsView.swift
Line: 2040

Comment:
**Search misses spelling preference**

The new picker appears only under Shortcuts, but `SettingsSearchIndex` has no entry or regional search terms for it. Users searching “spelling” cannot reach this control and may instead see the unrelated screen-context setting. Add a search entry and a matching `settingsSearchTarget` so users can find the preference by name.

**Knowledge Base Used:** [Settings and onboarding](https://app.greptile.com/-/switch-tenant?tenant=altic&next=%2Fcustom-context%2Fknowledge-base%2Faltic-dev%2Ffluidvoice%2F-%2Fdocs%2Fsettings-and-onboarding.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

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.

[✨ FEATURE] A spelling/language preference for Australian/British English (en_AU or en_GB)

2 participants