Skip to content

Add an Auto-correction switch to the menu bar - #3

Open
mikexkllr wants to merge 1 commit into
dsaad68:mainfrom
mikexkllr:feat/auto-correction-quick-toggle
Open

Add an Auto-correction switch to the menu bar#3
mikexkllr wants to merge 1 commit into
dsaad68:mainfrom
mikexkllr:feat/auto-correction-quick-toggle

Conversation

@mikexkllr

Copy link
Copy Markdown
Contributor

Dictation's AI cleanup pass could only be reached through Settings ▸ Dictation ▸ "Enable Dictation". That's the wrong home for it: whether a given transcript should be polished or left verbatim is a per-dictation decision, not a preference you set once. Dictating a command, a file path, an identifier, or a name the model "fixes" into something else meant a trip through Settings and back — or repairing the result by hand.

Auto-correction now sits in the menu bar beside Microphone and Translate, one click from wherever the dictation is actually happening.

How it behaves

  • It is the same setting as Settings ▸ Dictation ▸ "Enable Dictation" — one binding to dictationEnabled, so moving either surface moves the other.
  • That property's didSet still drives MLXModels.setCleanupModel, so turning it back on from the menu bar warms the cleanup model in time for the next recording rather than paying for the load at finalize.
  • The Settings subtitle now points at the menu bar entry, so the two surfaces are discoverable from each other.

Note on the design

The row is title-only, no subtitle. The menu is 216pt wide and GlassToggleStyle gives the label whatever the 38pt switch leaves, so a second line would truncate. The switch position carries the state, as it does everywhere else in the app.

Verification

Both changed Swift files parse under -swift-version 6, and the symbols it leans on were checked against the tree (GlassToggleStyle, Palette.fg / Palette.accent, dictationEnabled and its setCleanupModel side effect).

I could not build the app target on this machine — no Metal toolchain and no code-signing identity — so this has not been compile-verified or run in the UI. A local build of the Mispher scheme is worth doing before merge, mainly to eyeball the row's spacing in the real menu.

This branch is based on current main (48eb751), so it shares history and should merge normally.

Dictation's AI cleanup pass could only be reached through Settings ▸
Dictation, which is the wrong home for it: whether a given transcript should
be polished or left verbatim is a per-dictation decision, not a preference
set once. Dictating a command, a file path, an identifier, or a name the
model "fixes" into something else meant a trip through Settings and back, or
repairing the result by hand.

Auto-correction now sits in the menu bar beside Microphone and Translate,
one click from wherever the dictation is happening. It binds to the same
`dictationEnabled` setting as the Settings switch, so moving either moves
the other, and that property's didSet still drives
`MLXModels.setCleanupModel` - turning it back on warms the cleanup model in
time for the next recording rather than paying for the load at finalize.

The row is title-only. The menu is 216pt wide and GlassToggleStyle gives the
label whatever the 38pt switch leaves, so a subtitle would truncate; the
switch position carries the state as it does elsewhere. The Settings
subtitle now points at the menu bar entry, so the two surfaces are
discoverable from each other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant