Skip to content

Clamp the lock screen's password field to the screen width - #11244

Open
SimonSchubert wants to merge 3 commits into
omacom:quattrofrom
SimonSchubert:lock-field-max-width
Open

SimonSchubert wants to merge 3 commits into
omacom:quattrofrom
SimonSchubert:lock-field-max-width

Conversation

@SimonSchubert

Copy link
Copy Markdown

The lock screen's password field is wider than any screen narrower than it, so its outline and rounded corners are cut off on both sides.

LockView sets fieldWidth: 381, a fixed width on a field anchored centerIn: parent. At 360 logical the field runs from x = −11 to x = 370. Its left and right borders are off-screen, so it reads as a full-width band:

Before After

The change

Clamp the field to the screen, less Style.gapsOut on each side. That's the same margin the polkit and reminder cards already leave with panel.width - Style.gapsOut * 2:

readonly property int fieldWidth: root.width > 0 ? Math.min(381, root.width - Style.gapsOut * 2) : 381

root.width is 0 until the lock surface is sized. The guard keeps the field at 381 until then, instead of a negative width.

Why it's safe

  • On a desktop Math.min returns 381 and the field is unchanged.
  • The password dots already shrink to fit passwordInput.width, which follows the field, so long passwords still stay visible in a narrower field.

Verification

Per agents/skills/visual-verification.md, reference and candidate captures of omarchy-shell lock preview:

  • 720x1440 at scale 2 (360 logical): the field clamps to 350, with 5px on each side and its outline closed on all four sides. That's the "after" image above.
  • 1920x1080 at scale 1: the field stays 381, and the capture matches the unpatched one to within 2/255 on 8 pixels, which is llvmpipe's anti-aliasing:
Desktop before Desktop after
  • Live switch between the two, in both directions: each matches a fresh start at the new size, and the journal is clean.

The VM runs a v4.0.3 shell, where LockView predates BackgroundMedia. To test this exact file rather than a backport, I added BackgroundMedia.qml and Util.isVideoPath from quattro for the test. The field code is identical in both versions.

A companion to #11034 and #11238, found the same way on a phone-shaped screen. Like those, it's a narrow-screen robustness fix rather than a mobile-specific one.

LockView sets fieldWidth to a fixed 381. The field is centred on the screen, so
on a screen narrower than that it is wider than the screen itself: at 360
logical it runs from x=-11 to x=370, and its outline and rounded corners are
cut off on both sides, leaving what reads as a full-width band.

The field is now clamped to the screen width less Style.gapsOut on each side,
the same margin the polkit and reminder cards already leave with
panel.width - Style.gapsOut * 2. root.width is 0 until the lock surface is
sized, so the clamp only applies once it has a real width.

On a desktop Math.min returns 381 and the field is unchanged.

Verified in a 720x1440 VM at scale 2 (360 logical), where the field clamps to
350 with 5px on each side, and at 1920x1080, where it stays 381 and the lock
screen matches the unpatched one to within llvmpipe's anti-aliasing.
@SimonSchubert
SimonSchubert marked this pull request as ready for review September 10, 2026 22:54
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified on a worker VM built from the Omarchy ISO, with this branch merged onto current quattro (821ae58, merges cleanly).

  • Reproduced: with omarchy-shell lock preview on a 320-logical-wide output (1280x800 at scale 4), quattro draws the field 381 wide, so its left and right borders are off-screen. With this change the field is 310 wide with a 5px margin each side and its outline closed on all four sides.
  • No change at desktop size: at 1920x1080 scale 1 the field region is pixel-identical to quattro.
  • Tests: lock-password-overflow-test.sh, lock-fingerprint-indicator-test.sh and system-lock-test.sh pass. ./test/cli has one failure, vscode generated theme references current theme file, which fails identically on quattro and is unrelated. Three other lock tests could not run on the worker because it has no node.
  • Code: one line in shell/plugins/lock/LockView.qml; the password dots already scale to passwordInput.width, so they follow the narrower field. Nothing found.

This was reviewed by Claude Opus 5.5 alone. No second opinion ran: the reviewer (Codex Medium) answered a ping, but today's review budget was already spent, so it will be reviewed on a later run. It waits on that second opinion, then on the maintainer.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 14, 2026
quattro moved the placeholder text into I18n on the line beside fieldWidth; keep both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 14, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This no longer merged with quattro, which had moved the placeholder text into I18n on the line next to fieldWidth. I merged quattro into the branch (92fbdc1) and kept both lines, so against quattro the change is still exactly the one fieldWidth line and its comment.

Re-verified at that commit on a worker VM built from the Omarchy ISO, running the shell from this branch:

  • Reproduced: at 1280x800 scale 4 (320 logical), omarchy-shell lock preview draws the field 310 wide with a 5px margin each side and its outline closed. With the line reverted, which makes the tree identical to quattro, the left and right borders are off-screen again.
  • No change at desktop size: at 1920x1080 scale 1 the region around the field is pixel-identical with and without the change.
  • Tests: ./test/cli passes. lock-password-overflow, lock-fingerprint-indicator, system-lock, lock-autorepeat, owe-lock and lock-appear-budget pass; lock-wallpaper-preload could not run because the worker has no node.

Reviewed by Claude Opus 5.5 and by Codex Medium as a second opinion. Codex confirmed the merge keeps every quattro change and found no binding loop, RTL or translation problem. It raised one edge case: the clamp has no lower bound, so a Hyprland gaps_out of roughly 280 or more on a 320-logical screen would collapse the field. I don't count that against this change: the clipboard and emoji panels use the same width - Style.gapsOut * 2 form, and a gap that large leaves no usable window either. In a second round Codex withdrew it as a blocker. It said that round weighed my argument rather than re-reading the source, and its agreement is not guaranteed to be independent.

Nothing is left for the author; this waits on the maintainer.

@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 14, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

CI follow-up at 92fbdc1350bfca7e5e106d914ff792e8bdd11711: the translation-check run still records failure, but GitHub returns no jobs and its log is unavailable, so I could not establish its original cause.

On a disposable Omarchy ISO worker, the structural i18n test fails at locale generation with the same permission error on this head and its merge base; the English-literal scan passes on both. Current quattro fixes that test isolation problem and passes both checks on the worker. Its CI is separately failing the CLI alias-dispatch timing test, outside this field-width change. Nothing was pushed, no GitHub jobs were rerun, and this waits on the maintainer while base CI is red. The lock-screen reproduction was not repeated in this CI follow-up.

Checked by Codex High, with second opinions from Opus 5.5 High and muse-wonder via pi (thinking high). Both found no defect in the field-width change; their recommendations about pushing a CI-refresh merge differed. I left it unpushed because current base CI is red. Opus also highlighted that the historical workflow used Ubuntu, so the installed-helper failure on the ISO worker does not establish that run's cause. Reviewer agreement is not guaranteed to be independent.

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Clamps the lock screen’s password field to the available width, leaving Style.gapsOut on each side.

  • The lock screen keeps its password field inside narrow screens.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/qua..." · Reviewed by Greptile

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Dec 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex High tested 5bfb97f1 on an Omarchy ISO worker. At 320 logical pixels, both borders are visible with a 5‑pixel margin on each side. Reverting the change brought the clipping back. The field kept its desktop width, the CLI and 11 lock-related test scripts passed, and a 320-pixel fixture confirmed 80 password dots fit beside the fingerprint icon.

Opus 5.5 High and muse-wonder via pi, thinking high found no blocking issues in the code review. The two Actions runs need a maintainer’s approval before they can run. Tests · Check translation structure

Before, both side borders are clipped

After, both side borders sit inside the display

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants