feat: support user preview configuration and document UI

This commit is contained in:
2026-10-05 19:17:27 +05:30
parent ee6186ed0b
commit de8843471b
10 changed files with 210 additions and 80 deletions

39
docs/ui.md Normal file
View File

@@ -0,0 +1,39 @@
# Latchd user interface
Latchd starts on a virtual terminal. The interface keeps the session list and the login fields visible at the same time.
![Login screen](images/latchd-preview.png)
The screenshot comes from the Docker test image. It uses preview mode. Preview mode does not contact PAM or start a user session.
## Help panel
Press `?` to show the key reference.
![Keyboard help](images/latchd-help.png)
Use the following keys:
- Press `Tab` or `Shift-Tab` to move focus.
- Press the arrow keys to choose a session.
- Press `/` to filter sessions or accounts.
- Press `Ctrl-N` or `Ctrl-P` to change the account.
- Press `Ctrl-R` to refresh account and session discovery.
- Press `Ctrl-B` to toggle the background.
- Press `Ctrl-M` to toggle reduced motion.
- Press `Enter` to authenticate.
- Press `Esc` to clear the password or close the help panel.
- Press `Ctrl-C` to restore the terminal and quit.
These messages show account state before login. PAM accepts or rejects the login.
## Capture method
The capture uses a Docker PTY and the release binary from `latchd-test:local`:
```sh
tmux new-session -d -x 120 -y 36 \
'docker run --rm -it latchd-test:local /workspace/target/release/latchd --preview --no-log'
```
The image in this directory contains the plain terminal capture. It does not show a host VT, a host compositor, or a real PAM login.