Skip to content

Honor "Send Custom Prompt Only" for dictation-shortcut prompt overrides - #919

Merged
altic-dev merged 1 commit into
altic-dev:mainfrom
HiroProt:fix/send-custom-prompt-only-shortcut-override
Sep 1, 2026
Merged

Honor "Send Custom Prompt Only" for dictation-shortcut prompt overrides#919
altic-dev merged 1 commit into
altic-dev:mainfrom
HiroProt:fix/send-custom-prompt-only-shortcut-override

Conversation

@HiroProt

Copy link
Copy Markdown
Contributor

Description

When a custom prompt profile is selected for a dictation shortcut, applyDictationShortcutSelectionContext(for:) precomputes promptModeOverrideText with SettingsStore.combineBasePrompt(...) unconditionally, ignoring Send Custom Prompt Only. The override then short-circuits processTextWithAI(overrideSystemPrompt:) before the correctly-gated SettingsStore paths (effectiveDictationSystemPrompt et al.) ever run — so the built-in base prompt is prepended on the path every normal dictation with a selected profile takes.

This PR routes the override through a new SettingsStore.shortcutOverrideSystemPrompt(for:mode:) helper that applies the same sendCustomPromptOnly gate as the effective-prompt paths, and adds a regression test alongside the existing testCustomPromptOnly_* coverage.

Type of Change

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

Related Issue or Discussion

Closes #918

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 26.6.2
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources — touched files report 0 violations (a newer local SwiftLint flags 7 pre-existing issues in unrelated files; CI's pinned 0.63.2 is authoritative)
  • Ran formatter locally: swiftformat --config .swiftformat Sources — not applied: without a .swift-version in the repo it reformats many untouched files; kept the diff minimal instead
  • Ran tests locally: xcodebuild test -project Fluid.xcodeproj -scheme Fluid -only-testing:FluidDictationIntegrationTests/LLMClientRequestBodyTests — 9/9 passed, including the new testCustomPromptOnly_shortcutProfileOverrideOmitsBasePrompt

Screenshots / Video

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

Notes

Found while pointing dictation cleanup at a narrow text-normalizer fine-tune (Superwhisper s1-mini) through a local gateway: with the base rule-list prepended the model deterministically dropped leading sentences; with the custom prompt alone it cleans correctly. Request-level evidence and [PromptTrace][Dictate] Prompt override in use: yes traces are in #918.

🤖 Generated with Claude Code

https://claude.ai/code/session_011SmpFBuhCzgoPjakR3e9B7

When a custom prompt profile is selected for a dictation shortcut,
applyDictationShortcutSelectionContext precomputed promptModeOverrideText
with combineBasePrompt unconditionally, so the built-in base prompt was
prepended even with "Send Custom Prompt Only" enabled. The override then
short-circuited processTextWithAI before the correctly-gated
SettingsStore paths (effectiveDictationSystemPrompt et al.) ever ran.

Route the override through a new SettingsStore helper that applies the
same sendCustomPromptOnly gate as the effective-prompt paths, and cover
it with a regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SmpFBuhCzgoPjakR3e9B7
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T15:24:55.961392Z 1b11407 PR opened
ℹ️ 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 Aug 29, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes dictation-shortcut profile overrides honor the existing Send Custom Prompt Only preference by routing prompt construction through SettingsStore.

  • Adds a shared shortcut override prompt resolver using the established custom-profile composition logic.
  • Updates shortcut selection to use the resolver instead of unconditionally prepending the built-in prompt.
  • Adds regression coverage for both enabled and disabled preference states.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable regressions identified in the changed prompt-routing path.

The shortcut path now applies the same custom-only gate as existing effective-prompt resolution, while preserving base-prompt composition when the preference is disabled.

Reviews (1): Last reviewed commit: "Honor "Send Custom Prompt Only" for dict..." | Re-trigger Greptile

@altic-dev altic-dev self-assigned this Sep 1, 2026
@altic-dev

Copy link
Copy Markdown
Owner

Thanks for the PR!

@altic-dev
altic-dev merged commit 66ca682 into altic-dev:main Sep 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Send Custom Prompt Only" is ignored when a custom prompt profile is selected for the dictation shortcut

2 participants