Skip to content

fix(app): enable Safari autocorrect in normal mode, disable in shell mode#15563

Open
alexandrereyes wants to merge 2 commits intoanomalyco:devfrom
alexandrereyes:fix/app-safari-autocorrect-by-mode
Open

fix(app): enable Safari autocorrect in normal mode, disable in shell mode#15563
alexandrereyes wants to merge 2 commits intoanomalyco:devfrom
alexandrereyes:fix/app-safari-autocorrect-by-mode

Conversation

@alexandrereyes
Copy link

@alexandrereyes alexandrereyes commented Mar 1, 2026

Issue for this PR

Closes #15564

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

PR #12558 unconditionally disabled autocapitalize, autocorrect, and spellcheck on 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:

  • Normal mode (chat): autocapitalize="sentences", autocorrect="on", spellcheck={true} — iOS Safari users get native text correction for natural language.
  • Shell mode (commands): autocapitalize="off", autocorrect="off", spellcheck={false} — no mangling of commands.

The change is 3 lines in prompt-input.tsx, using store.mode which is already used extensively in the same component for conditional styling, disabled states, etc.

How did you verify your code works?

Verified that store.mode is 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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…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
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Mar 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Mar 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

spellcheck={false}
autocapitalize={store.mode === "shell" ? "off" : "sentences"}
autocorrect={store.mode === "shell" ? "off" : "on"}
spellcheck={store.mode !== "shell"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you do store.mode === "normal" instead? This way the behaviour will stay explicit if we add any different modes in the future.

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.

Safari autocorrect disabled in normal (chat) mode since prompt now has shell mode toggle

2 participants