Skip to content

Guard lock screen appearance - #15316

Merged
dhh merged 3 commits into
quattrofrom
perf/lock-appear-budget
Oct 14, 2026
Merged

dhh merged 3 commits into
quattrofrom
perf/lock-appear-budget

Conversation

@dhh

@dhh dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What

Plan §2, lock screen appearing. New test/shell.d/lock-appear-budget-test.sh: times the lock UI on its preview surface, which renders the same LockView as the real lock without engaging the session lock — a real WlrSessionLock in a test would lock the developer's own session and need a password to leave. First appearance (builds the view) 300ms, reappearance 150ms, before SPEED_PERCENT scaling; measured here 74ms / 10ms. The test also asserts the preview never engaged the real lock (lock status stays unlocked).

The resume side is lock-before-suspend, already bounded: omarchy-system-sleep-lock caps the secure-lock wait (derived from logind's inhibitor window) with sleep-lock-test.sh covering a responsive shell locking immediately. A real suspend/resume timing run needs a disposable machine and stays an acceptance-suite matter.

Verification

  • Passes here with a compositor: first 74ms, reappear 10ms, session never locked.
  • Codex review (2 passes): reappearance minimum now excludes the first appearance; final pass clean.

From plans/overnight-quality.md §2.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues remain.

Summary

Adds a test that times the lock preview without locking the user’s session.

  • The lock test measures preview timing without locking the session.

Reviews (2) · Last reviewed commit: "Time lock view construction too, and onl..." · Reviewed by Greptile

Comment thread test/shell.d/lock-appear-budget-test.sh Resolved
@dhh

dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Greptile addressed: the test now also times shell-start until the lock service answers -- which is after its LockView has been built -- under a 750ms budget, so view construction is guarded, not just show/hide of a built view. The mapped/absent waits only accept confirmed compositor states, and the startup wait checks the ping reply. Still passes here.

dhh added 3 commits October 14, 2026 03:22
Time the lock UI in a scratch shell on its preview surface, which
renders the same LockView as the real lock without engaging the
session lock: a real WlrSessionLock in a test would lock the
developer's own session and need a password to leave. First
appearance (which builds the view) gets 300ms, reappearance 150ms,
before process-speed scaling. The test also asserts the preview
never engaged the real lock. Lock-before-suspend, the resume side,
is already bounded by omarchy-system-sleep-lock and its test.
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