Face unlock window: live camera preview, Snap, thumbnails, one password on Apply
CI / test (push) Failing after 12m30s

Settings > Session "Add or remove faces…" (and "Remove…" on a face) opens a
compositor-drawn Face unlock window instead of running root steps one by one:

- chandra-face camera runs as the user (no password): it streams a small live
  picture with the face box and a cropped thumbnail per snap; the snaps'
  embeddings stay in that process, nothing is written to disk.
- Click a snap to drop it; mark saved faces Remove/Keep.
- Apply saves the snaps as one face and removes the marked ones in one root
  `chandra-face apply` (JSON on stdin, validated) through run0/pkexec: one
  password prompt.
- New raster host function image-pixels (host-wasm, wasmhost, native) for the
  window's pictures.

Tests: camera session and apply in face/test_face.py; the window end to end
against a fake tool in compositor/host/face_test.mbt. Docs explain why the
change itself still needs root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
This commit is contained in:
Claude committed 2026-11-26 02:36:29 +00:00
1 parent 0a9787ae36
commit 9f7489cfea
74 files changed
+2617 -89

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
// Generated using `moon info`, DON'T EDIT IT
package "chandra/desktop/lib/starfield"
import {
"chandra/desktop/interface/chandra/desktop/theme",
"chandra/desktop/interface/chandra/desktop/types",
"moonbitlang/core/debug",
}
// Values
pub let density_choices : Array[String]
pub let frame_ms : UInt32
pub let motion_choices : Array[String]
pub let speed_choices : Array[String]
pub let state : Field
// Errors
// Types and methods
#derive(Eq, @debug.Debug)
pub(all) struct ConfigEntry {
key : String
label : String
choices : Array[String]
value : String
}
pub(all) struct Field {
stars : Array[Star]
mut seed : UInt32
mut speed : String
mut density : String
mut motion : String
mut boost : Double
mut pulse : Double
mut cx : Double
mut cy : Double
mut tx : Double
mut ty : Double
mut w : Int32
mut h : Int32
mut last : Int32
mut frames : Int32
}
pub fn Field::animating(Self) -> Bool
pub fn Field::config_items(Self) -> Array[ConfigEntry]
pub fn Field::handle(Self, @types.InputEvent) -> Bool
pub fn Field::new() -> Self
pub fn Field::render(Self, @types.Size, @theme.Tokens) -> Array[@types.DrawOp]
pub fn Field::scroll(Self, Int32) -> Bool
pub fn Field::set_config(Self, String, String) -> Bool
pub fn Field::step(Self, Double) -> Unit
pub fn Field::tick(Self, UInt32) -> UInt32
type Star
// Type aliases
// Traits