Go to file
Greg Pomerantz 1bc1d6beb3 gtauri: fix camera-photo latency, delete blank boxes, truncation guard
- Camera-photo latency: root cause was READ_MEDIA_IMAGES never
  granted (granted=false on the phone), so the MediaStore fast-path
  query silently returned nothing and photos only appeared via the
  slow full FUSE walk. The app now requests the permission at
  runtime (once, with a single retry on denial). The camera writes
  through MediaStore at capture time, so the ContentObserver fires
  immediately and the photo appears in ~1 s.
- Delete blank boxes: two JS flaws — (1) no img onerror handler, so a
  cell that requested a thumb for an already-deleted file (404) sat
  as an empty dark box forever; (2) recycled cells were matched by
  slot index only, so after a deletion shifted the list a cell could
  keep a stale id. Now: onerror drops stale ids (idSet membership) or
  retries transient ones, and cells reassign on idx OR id change.
- Truncation guard (chicken-and-egg): the mass-delete suspicion
  threshold was 20% but observed FUSE truncations lose 15-17%, which
  sailed under it and poisoned the DB. Now 10%; a confirmed deletion
  (two-strike passed) lowers the new walked_max watermark, a refused
  one keeps it. Layer-2 re-walk compares against max(db, walked_max)
  so a poisoned (shrunk) DB cannot silence truncation detection.
  Emulator suite: healthy→truncated (all 3 layers, 0 loss),
  poisoned-DB→truncated (layer 2 now fires), healthy walk self-heals.
- Verified on the phone: DB matches disk exactly (8,398 Camera +
  27 screenshots + 11 messaging + 2 bluesky = 8,438); an earlier
  10,166 count was a transient user-system state, not truncation.
2026-11-02 08:01:13 -05:00
docs/BUGS 120Hz: jank_eval referee + slot-based wake guard + MISS ledger 2026-10-30 13:29:50 -04:00
harnesses gtauri: fix camera-photo latency, delete blank boxes, truncation guard 2026-11-02 08:01:13 -05:00
scripts Port the gallery from Slint to egui (egui 0.31 / egui_glow / winit 0.30 / glow 0.16) 2026-10-31 13:50:46 -04:00
shim/out Port the gallery from Slint to egui (egui 0.31 / egui_glow / winit 0.30 / glow 0.16) 2026-10-31 13:50:46 -04:00
src Port the gallery from Slint to egui (egui 0.31 / egui_glow / winit 0.30 / glow 0.16) 2026-10-31 13:50:46 -04:00
tools chore: gitignore target/, drop stray capture log 2026-11-01 20:24:17 -05:00
.gitignore chore: gitignore target/, drop stray capture log 2026-11-01 20:24:17 -05:00
Cargo.lock Port the gallery from Slint to egui (egui 0.31 / egui_glow / winit 0.30 / glow 0.16) 2026-10-31 13:50:46 -04:00
Cargo.toml Port the gallery from Slint to egui (egui 0.31 / egui_glow / winit 0.30 / glow 0.16) 2026-10-31 13:50:46 -04:00
HANDOFF.md docs: HANDOFF §8.12 (egui port + tttest harness), README reflects the egui stack 2026-10-31 13:54:56 -04:00
LICENSE Initial commit 2026-10-27 12:13:22 -04:00
README.md docs: HANDOFF §8.12 (egui port + tttest harness), README reflects the egui stack 2026-10-31 13:54:56 -04:00

gallery

A high-performance image gallery for Android (primary), Linux and macOS — Rust + egui 0.31 (egui_glow / winit 0.30 / glow 0.16). Ported from Slint 1.18 after the zero-jank campaign showed Slint-on-Mali janky at its base level while egui measured 3–7× cleaner (HANDOFF.md §8.11–8.12). The Slint tree is preserved in git history and docs/BUGS/.

Status: M0–M4 ported to egui, zero-jank tuning in progress. See HANDOFF.md — the development hand-off: architecture, thumbnail pipeline, milestones M1–M7, the Slint jank campaign, the egui port, and the sltest/egtest/tttest harnesses (A/B/C: Slint/egui/WebView).

Build

./scripts/build.sh debug     # debug x86_64 APK + install on emulator
./scripts/build.sh           # release x86_64 (emulator)
./scripts/build.sh aarch64   # release aarch64 (device)
cargo run                    # desktop (Linux needs libfontconfig1 + pkg-config)

Requires: Rust (rustup), cargo-apk2, Android SDK + NDK 27 (see HANDOFF.md §3 for exact paths/env).

License

GPL-3.0 (see LICENSE). Built on egui (MIT/Apache-2.0).