Minimal millisecond-resolution perf logger that writes straight to
Android logcat (or stderr off-Android with IRIS_PERF_LOG=1) without pulling in log +
android_logger crates. Used to diagnose where time goes between an
FFI dispatch, the core thread processing, and the UI reconcile.
Core-internal hot-loop counters. FFI surface counters can only
catch shells that re-enter the core in a loop — the
build_runtime_debug_snapshot regression that caused the macOS CPU
loop was entirely internal (relay events fanned out through
persist_best_effort_inner → persist_debug_snapshot_best_effort
→ full SessionManager clone × N known users). The release-gate
budget tests assert on this snapshot too so the next time core
work explodes per event, CI catches it before a device does.
One row inside the “Messages” section of a search result. Shells
render this as a single conversation list row whose subtitle is the
matched body and whose title is the chat’s display name (resolved
here so the UI doesn’t have to look up the parent thread).
Classification of the free-text input typed into a chat-action
field — the search bar, the “New chat” paste field, the share-link
handler. Centralising the parsing here means the UI just looks at
the enum and dispatches; no platform has its own ad-hoc
contains("://") && contains("#") check.
Marketing version baked in at build time from IRIS_APP_VERSION_NAME
(or IRIS_APP_VERSION), falling back to the crate semver. Use this
instead of env!("CARGO_PKG_VERSION") so UI/release artifacts agree
on a single version string.
Deterministic high-volume shell fixture for list, navigation, and message
rendering tests. This is intentionally synthetic: relay-backed tests cover
protocol behaviour, while this keeps UI/perf tests fast and reproducible.
Deterministic grouped search fixture for shell tests that need to verify
collapsed initial rendering plus “View more” expansion without writing a
large on-disk message index first.
Single source of truth for “is this typed text an npub or an
invite URL?”. Used by the New Chat paste field, the chat-list
search bar, and the deep-link handler so all three branches agree
on what counts as a chat-opening shortcut. Returns None for
regular search-style text.
Decrypt a notification payload against the persisted double-ratchet
state under data_dir. Use from the FCM service (Android) or
Notification Service Extension (iOS) where there’s no live FfiApp.
Falls back to the generic resolver when keys, payload, or storage
are unavailable so the user still gets some notification.
Render text to a QR-code module matrix. Returns a square matrix encoded
as 1/0 characters in row-major order. Returns None for inputs that
don’t fit at the medium error-correction level.
Convert any pubkey-shaped input (hex, npub, nprofile, …) to its
canonical lowercase-hex form. The empty string is returned when the
input can’t be parsed as a public key — callers expecting hex
downstream can short-circuit on that.