Structs§
- Break
Clock - Per-kind interval clock: how long since this kind last fired and the configured interval, so the report can show “due in / overdue by”.
- EnvFacts
- Host windowing-environment facts, gathered from process env vars. Only meaningful on Linux (X11 vs Wayland, compositor); on macOS / Windows the windowing system is implied by the OS. Split from the gathering so the markdown rendering is unit-testable.
- Live
Readings - Volatile readings gathered by the command from the OS / plugins:
the idle probe, DND state, screen-lock, notification permission, and
OS-level autostart. Bundled and passed into
runtime_snapshot_sectionso that function touches only in-memory scheduler state — these probes go through X11 / dbus / plugin FFI that segfaults on the headless CI runner, so they must stay out of the testable path. - Monitor
Facts - One monitor’s geometry for the report. Mirrors
tauri::Monitorfields we care about, kept plain soformat_monitorsis testable. - Runtime
Snapshot - Everything the report needs to answer “why isn’t a break happening
right now”. Gathered live from the scheduler + windowing system, then
rendered by
format_runtime_snapshot(kept pure for testing). - Startup
Facts 🔒 - Everything the startup banner reports, gathered by
log_startup_bannersostartup_bannerstays pure.
Constants§
Functions§
- break_
kind_ 🔒label - build_
diagnostics_ report - collapse_
hint_ 🔒pool - display_
server 🔒 - Best-effort name for the display server backing the app, used to triage overlay/transparency issues that only reproduce on one stack.
- environment_
section 🔒 - format_
break_ 🔒clock - format_
environment 🔒 - Render the whole environment block from already-gathered facts. Pure: the caller does the env / windowing-system queries and passes the results in, so this formatting is fully unit-testable.
- format_
monitors 🔒 - format_
runtime_ 🔒snapshot - gather_
monitors 🔒 - Describe every attached monitor, or
Noneif the windowing main thread could not be asked — seecrate::display::on_main_threadfor why the read has to happen there and why calling it from either of this function’s callers (anasynccommand task and the main-threadsetuphook) is safe. - log_
file_ 🔒path - log_
startup_ banner - Gather the startup facts and emit the banner at info level. Called
once from the Tauri
setuphook. - next_
due_ 🔒secs - Seconds until the next break of a kind: positive = still counting
down, zero or negative = overdue (the scheduler will fire as soon as
no guard is suppressing it).
i64so overdue is representable. - os_
description 🔒 - read_
monitor_ 🔒facts - read_
tail 🔒 - redact_
log_ 🔒tail - redact_
sensitive 🔒 - runtime_
snapshot_ 🔒section - Build the Runtime section from in-memory scheduler state plus the
already-gathered
LiveReadings. No OS / plugin /AppHandleaccess, so it’s testable with a bare scheduler. - startup_
banner 🔒 - Compact one-line environment summary logged once at startup, so the log file (and therefore every diagnostics report’s log tail) always opens with the context a bug report needs — even if the user never generates a report. Pure so the formatting is unit-testable.