Repository navigation
Conversation
The field only ever showed dots, with no way to check what you typed before submitting -- a single typo means guessing again, which stings more the longer/more complex the password is. Adds an eye button pinned inside the field (left of the fingerprint icon when one is configured) that toggles between masked and plain text, plus Ctrl+Space as a mouse-free equivalent. The toggle stays visible but dimmed while the field is empty, and resets to masked whenever the field is cleared so it never carries over into the next attempt. Ctrl+Space over an Alt-based chord: there's no established convention for this (no OS, browser, or password manager agrees on one), and Alt composes special characters on many non-US layouts (French AZERTY, for one), so an Alt combo risked colliding with that. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds password reveal controls to the lock screen.
Changes:
- Adds eye-button and
Ctrl+Spacetoggles. - Resets reveal state when cleared.
- Scales revealed passwords to fit the field.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Suppressed comments (2)
shell/plugins/lock/LockView.qml:206
- The keyboard path can arm reveal while the field is empty, unlike the disabled mouse button. Pressing Ctrl+Space after a clear sets
passwordRevealedto true, so the first character of the next attempt is shown and the clear no longer guarantees a masked next attempt. Require non-empty input before toggling here.
} else if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_Space) {
shell/plugins/lock/LockView.qml:251
- This custom clickable item has no accessible role, name, or press action, so assistive technology cannot discover or operate the show/hide-password control or announce its current state. Expose it as an accessible button with a dynamic “Show password”/“Hide password” name and route its press action through the same toggle behavior.
Rectangle {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Route both the mouse toggle and Ctrl+Space through a single root.toggleReveal(), guarded on non-empty input. Previously Ctrl+Space had no such guard (unlike the mouse button's `enabled` check), so pressing it right after clearing the field armed a reveal that then applied to the next attempt's first keystrokes. - Add Accessible.role/name/description/onPressAction to the reveal toggle so assistive tech can discover, name (dynamically, "Show" vs "Hide password"), and operate it. - Add test/shell.d/lock-password-reveal-test.sh covering: both toggle paths (via the now-shared toggleReveal()), the empty-field no-op, reset-on-clear, and revealed-text overflow scaling. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Ctrl+Space had no on-screen hint, so it was undiscoverable without reading the source. Reuses qs.Ui's existing PanelToolTip (already the established hover-tooltip pattern elsewhere in the shell, e.g. the network panel's "Forget network") rather than hand-rolling a new one. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Added a tooltip (17bed05) on the reveal toggle, surfacing "Show/Hide password · Ctrl+Space" on hover -- the shortcut previously had no on-screen hint. Reused |
Resolve the LockView.qml conflict by keeping both toggleReveal() and upstream's dropsAutoRepeat(), which landed in the same spot. Also bring the branch in line with rules added upstream since it forked: - Declare textFormat on the reveal toggle's icon, now required for every Text with a dynamic binding (qml-text-format-test.sh). - Report a missing quickshell as skip rather than pass in the reveal test, matching lock-password-overflow-test.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The reveal fixture called toggleReveal() directly and compared the revealed text against the whole field, so a broken click handler, a broken Ctrl+Space shortcut, a field stuck in password echo mode, or text clipped by the icon reserves would all still pass. Move the key handler onto the view root as handlePasswordKey() so the fixture can drive it without a focused window, then exercise both entry points and assert on the input's echoMode. The overflow check now measures against the input's own width, with and without the fingerprint icon. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
The lock screen password field only ever shows dots. There's no way to check what you typed before submitting, so a single typo means guessing again -- more annoying the longer/more complex the password is.
Solution
Ctrl+Spaceas a mouse-free equivalent.fingerprintReserve); the eye toggle gets its owneyeReserve, and both are summed for the field's margins.Why
Ctrl+SpaceThere's no established convention here -- no OS, browser, or password manager agrees on one shortcut for this. I deliberately avoided an Alt-based chord: Alt (and AltGr specifically) composes special characters on many non-US keyboard layouts, French AZERTY among them, so an Alt combo risked colliding with that.
Screenshots
Testing
qmllint shell/plugins/lock/LockView.qmltest/shell.d/lock-fingerprint-indicator-test.shandtest/shell.d/lock-password-overflow-test.sh(both exercise the reserved-space math this change also touches)test/shell(185 files) andtest/cli(116 files) suites -- the only 3 shell-suite failures need a siblingomarchy-pkgscheckout and are unrelated to this changeomarchy-shell lock previewand a realomarchy system locksession