Skip to content

opt: disable spell check for API key textarea#1544

Merged
looplj merged 1 commit into
looplj:unstablefrom
BLumia:no-spellcheck
Apr 30, 2026
Merged

opt: disable spell check for API key textarea#1544
looplj merged 1 commit into
looplj:unstablefrom
BLumia:no-spellcheck

Conversation

@BLumia

@BLumia BLumia commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

API Key 的输入框应该显式禁用拼写检查,不然浏览器可能会为输入框启用拼写检查,会导致那个输入框如果key多的话会满屏红波浪线。

@greptile-apps

greptile-apps Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds spellCheck={false} to both API key Textarea components in the channels action dialog — one used in the edit/reveal mode and one in the default create mode. This prevents browsers from running spell-check on API key strings, which would otherwise surface distracting red squiggles on random character sequences.

Confidence Score: 5/5

Safe to merge — minimal, targeted UX fix with no logic changes.

The change adds a single boolean HTML attribute to two textarea elements, both of which are API key inputs. The fix is complete (covers both code paths), correct, and carries no risk.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/features/channels/components/channels-action-dialog.tsx Added spellCheck={false} to both API key textarea instances (edit/reveal mode at line 1955 and create mode at line 2032) — correct and complete fix.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User opens Channel Dialog] --> B{Edit existing channel?}
    B -- Yes --> C[Reveal mode Textarea\nspellCheck=false]
    B -- No --> D[Create mode Textarea\nspellCheck=false]
    C --> E[Browser spell check disabled\nNo red squiggles on API key]
    D --> E
Loading

Reviews (1): Last reviewed commit: "fix: disable spell check for API key tex..." | Re-trigger Greptile

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the ChannelsActionDialog component to disable spell checking on API key input fields. The reviewer recommended also disabling auto-capitalization and auto-correction for these fields to prevent mobile browsers from automatically modifying the sensitive input, ensuring data integrity across different devices.

className='min-h-[80px] resize-y pr-10 font-mono text-sm md:col-span-6'
autoComplete='new-password'
data-form-type='other'
spellCheck={false}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

对于 API Key 这种技术性字符串,禁用拼写检查是一个很好的改进,既能避免界面上的红波浪线,也能防止浏览器将敏感信息发送到远程服务器。建议同时禁用自动大写 (autoCapitalize='none') 和自动纠错 (autoCorrect='off'),以防止移动端浏览器在输入或粘贴时自动修改 Key 内容(例如首字母自动大写)。

Suggested change
spellCheck={false}
spellCheck={false}\n autoCapitalize='none'\n autoCorrect='off'

className='min-h-[80px] resize-y font-mono text-sm md:col-span-6'
autoComplete='new-password'
data-form-type='other'
spellCheck={false}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

同上,建议在此处也禁用自动大写和自动纠错,以确保 API Key 在各种设备(尤其是移动端)上的输入准确性。

Suggested change
spellCheck={false}
spellCheck={false}\n autoCapitalize='none'\n autoCorrect='off'

@looplj looplj changed the title fix: disable spell check for API key textarea opt: disable spell check for API key textarea Apr 30, 2026
@looplj looplj merged commit 51806b5 into looplj:unstable Apr 30, 2026
@BLumia BLumia deleted the no-spellcheck branch April 30, 2026 05:53
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.

2 participants