← Back to PRs

#22697: Android: mask gateway token as password field with visibility toggle

by SimonSchubert open 2026-02-21 14:42 View on GitHub →
app: android size: XS
## Summary - Treats the gateway token input as a secret field using `PasswordVisualTransformation` (masked with dots by default) - Adds a trailing eye icon (`Visibility`/`VisibilityOff`) to toggle between masked and clear-text display - Lightweight alternative to #22238 — prevents casual shoulder-surfing of the auth token without blocking screenshots app-wide This could be merged **instead of** or **together with** #22238. The approaches are complementary: this PR redacts the field content itself, while #22238 prevents screenshots of the entire Advanced section. ## Test plan - [x] Open Settings → expand Advanced → verify gateway token is masked with dots - [x] Tap the eye icon → verify token becomes visible in clear text - [x] Tap the eye icon again → verify token is re-masked - [x] Collapse and re-expand Advanced → verify token resets to masked state - [x] Verify no regressions in other settings fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds password masking with visibility toggle to the gateway token field in Android settings. The token is masked by default using `PasswordVisualTransformation` and includes an eye icon to toggle visibility, protecting against shoulder-surfing while maintaining easy access when needed. - Applied `PasswordVisualTransformation` to mask token input by default - Added visibility toggle icon button (`Visibility`/`VisibilityOff`) with proper accessibility labels - Token visibility state resets to masked when Advanced section is collapsed/re-expanded (state is scoped inside `AnimatedVisibility`) - Clean implementation following Material Design 3 patterns <h3>Confidence Score: 5/5</h3> - Safe to merge - straightforward UI enhancement with no functional risks - Simple, well-implemented UI change that adds password masking to a sensitive field. Uses standard Compose patterns, proper state management, and includes accessibility support. No logic errors, security issues, or edge cases identified. - No files require special attention <sub>Last reviewed commit: c45e6b7</sub> <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs