fix(app): enable Safari autocorrect in normal mode, disable in shell mode#15563
Open
alexandrereyes wants to merge 2 commits intoanomalyco:devfrom
Open
fix(app): enable Safari autocorrect in normal mode, disable in shell mode#15563alexandrereyes wants to merge 2 commits intoanomalyco:devfrom
alexandrereyes wants to merge 2 commits intoanomalyco:devfrom
Conversation
…mode Previously autocorrect/autocapitalize/spellcheck were unconditionally disabled to prevent Safari from mangling shell commands (e.g. correcting `pwd` to "Password"). Now that the prompt has a dedicated shell mode toggle, these attributes are reactive: enabled in normal (chat) mode for natural text input and disabled in shell mode for commands. Closes anomalyco#12555
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
nexxeln
requested changes
Mar 1, 2026
| spellcheck={false} | ||
| autocapitalize={store.mode === "shell" ? "off" : "sentences"} | ||
| autocorrect={store.mode === "shell" ? "off" : "on"} | ||
| spellcheck={store.mode !== "shell"} |
Contributor
There was a problem hiding this comment.
Could you do store.mode === "normal" instead? This way the behaviour will stay explicit if we add any different modes in the future.
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.
Issue for this PR
Closes #15564
Type of change
What does this PR do?
PR #12558 unconditionally disabled
autocapitalize,autocorrect, andspellcheckon the prompt input because Safari was autocorrecting shell commands (e.g.pwd→ "Password"). At the time, the prompt had a single input for both chat and commands, so disabling made sense.Since then, the prompt gained a dedicated mode toggle (normal vs shell). This PR makes those three attributes reactive to the current mode:
autocapitalize="sentences",autocorrect="on",spellcheck={true}— iOS Safari users get native text correction for natural language.autocapitalize="off",autocorrect="off",spellcheck={false}— no mangling of commands.The change is 3 lines in
prompt-input.tsx, usingstore.modewhich is already used extensively in the same component for conditional styling, disabled states, etc.How did you verify your code works?
Verified that
store.modeis the same reactive signal used throughout the component for mode-dependent behavior (font, disabled states, visibility). The attributes accept the same string/boolean values as before, just conditionally.Checklist