Skip to content

Add Password keyboard type to password input fields#475

Merged
torlando-tech merged 1 commit intomainfrom
claude/hide-password-suggestions-3B3OB
Feb 16, 2026
Merged

Add Password keyboard type to password input fields#475
torlando-tech merged 1 commit intomainfrom
claude/hide-password-suggestions-3B3OB

Conversation

@torlando-tech
Copy link
Copy Markdown
Owner

Summary

Added proper keyboard type configuration to password input fields in the MigrationScreen's PasswordDialog to improve user experience on mobile devices.

Key Changes

  • Added KeyboardOptions import from androidx.compose.foundation.text
  • Added KeyboardType import from androidx.compose.ui.text.input
  • Applied keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password) to the password input field
  • Applied keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password) to the confirm password input field

Implementation Details

By setting the keyboard type to KeyboardType.Password, the on-screen keyboard will now display appropriate input options for password fields (typically hiding characters and disabling autocorrect/suggestions). This improves the user experience when entering passwords on mobile devices and follows Android/Compose best practices for sensitive input fields.

https://claude.ai/code/session_01TjG6GLMhjnTX8SNxRDQz6Q

…stions

Add KeyboardOptions(keyboardType = KeyboardType.Password) to both password
OutlinedTextField fields in PasswordDialog. This tells the on-screen keyboard
to use incognito mode, preventing it from showing or learning password text
in suggestions.

https://claude.ai/code/session_01TjG6GLMhjnTX8SNxRDQz6Q
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 16, 2026

Greptile Summary

Adds KeyboardType.Password keyboard options to both password input fields in PasswordDialog within MigrationScreen.kt. This disables autocorrect and keyboard suggestions for sensitive password input, complementing the existing PasswordVisualTransformation. The change is small, correct, and follows Compose best practices.

  • Applied keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password) to the password and confirm-password OutlinedTextField components
  • Note: InterfaceConfigDialog.kt also has a passphrase field with PasswordVisualTransformation but without the KeyboardType.Password option — consider applying the same fix there for consistency

Confidence Score: 5/5

  • This PR is safe to merge — it adds a standard Compose keyboard option to existing password fields with no behavioral risk.
  • The change is minimal (4 added lines: 2 imports + 2 keyboardOptions parameters), uses standard Jetpack Compose APIs correctly, and only enhances UX on password fields that already had visual transformation in place. No logic changes, no new state, no risk of regressions.
  • No files require special attention

Important Files Changed

Filename Overview
app/src/main/java/com/lxmf/messenger/ui/screens/MigrationScreen.kt Adds KeyboardType.Password to both password and confirm-password OutlinedTextField fields in PasswordDialog. Correct implementation with a minor import ordering nit.

Flowchart

flowchart TD
    A[User opens PasswordDialog] --> B[OutlinedTextField: Password]
    A --> C[OutlinedTextField: Confirm Password]
    B --> D[keyboardOptions: KeyboardType.Password]
    C --> E[keyboardOptions: KeyboardType.Password]
    D --> F[Keyboard disables autocorrect & suggestions]
    E --> F
    B --> G[visualTransformation: PasswordVisualTransformation]
    C --> G
    G --> H[Characters hidden unless toggled visible]
    F --> I[Improved password input UX]
    H --> I
Loading

Last reviewed commit: f6d9ad4

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +59 to +60
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.ui.text.input.KeyboardType
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.

Import ordering is inconsistent
The new KeyboardOptions import from androidx.compose.foundation.text is placed after the androidx.compose.ui block (line 58), but the rest of the file groups androidx.compose.foundation.* imports together at lines 8–21. Moving this import up to that group would keep the file consistent with its existing alphabetical ordering convention.

Suggested change
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.KeyboardType

And add at line 21 (after import androidx.compose.foundation.verticalScroll):

import androidx.compose.foundation.text.KeyboardOptions

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: app/src/main/java/com/lxmf/messenger/ui/screens/MigrationScreen.kt
Line: 59:60

Comment:
**Import ordering is inconsistent**
The new `KeyboardOptions` import from `androidx.compose.foundation.text` is placed after the `androidx.compose.ui` block (line 58), but the rest of the file groups `androidx.compose.foundation.*` imports together at lines 8–21. Moving this import up to that group would keep the file consistent with its existing alphabetical ordering convention.

```suggestion
import androidx.compose.ui.text.input.KeyboardType
```

And add at line 21 (after `import androidx.compose.foundation.verticalScroll`):
```
import androidx.compose.foundation.text.KeyboardOptions
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@torlando-tech torlando-tech merged commit 8ee95d5 into main Feb 16, 2026
11 checks passed
@torlando-tech torlando-tech deleted the claude/hide-password-suggestions-3B3OB branch February 16, 2026 23:11
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