crates/gunnar-ui-web/src/lib.rs
//! The gunnar console.
//!
//! Client-side rendered, so there is no server half here at all: the pages ask
//! `gunnar-ui-server` over same-origin JSON and server-sent events, and it does
//! the talking to gunnar.
//!
//! [`activity`], [`auth`], [`fmt`], [`graph`] and [`room`] hold every decision
//! worth testing and touch no browser API, so they compile and run under
//! `cargo test` on the host. Everything that needs a DOM is gated on `wasm32`,
//! which is also what lets `cargo build --workspace` succeed.
//!
//! [`room`] is the clearest case for the split: the usage table has to decide,
//! per meter, whether a cap is a WALL the box refuses at or a READING nothing
//! stops — and a rule that only ever ran inside a browser is a rule with no
//! test at all. [`activity`] is the newest and makes the same argument about
//! prose rather than shape: an empty chart can mean *nothing moved*, *this box
//! does not count activity* or *this could not be read*, and the three must not
//! be one sentence.
/// **What the Activity panel says and how tall its bars are**, on the host side
/// of the wasm boundary. Same argument as [`room`].
/// **Åtgärder** — the queue of what this account must do something about, and
/// the one line the shell carries at the top of every page. Same argument as
/// [`room`]: the server decides what is in it, this decides how loudly to draw
/// it, and the decision is out here where `cargo test` can reach it.
pub mod actions;
pub mod activity;
/// The Admission panel's words (host-tested; see `pages::usage`).
pub mod admit;
pub mod auth;
/// **What the blame view says when it was cut short**, on the host side of the
/// wasm boundary. Same argument as [`room`], and see the module for why the
/// sentence is not cosmetic.
pub mod blame;
/// **What You → Clans draws** (2026-10-05): which controls a standing gets,
/// and the lines around gunnar's numbers. Same argument as [`room`].
pub mod clans;
/// Administration → Identities: its fields' hints and when Purge may be pressed.
pub mod identities;
/// **Get the `gunnar` CLI** (E4): the page's and the hints' words, host side.
pub mod cli;
/// **What the account page says about the console's OWN key on your
/// principal**, on the host side of the wasm boundary: the three answers
/// `/api/account/console-key` can give, and the rule that an enrolled
/// credential is silent. Same argument as [`room`].
pub mod console_key;
/// **What the Storage page's data-set panel says**, on the host side of the
/// wasm boundary: the layout line, the used share, and the one sentence per
/// growth answer. Same argument as [`room`].
pub mod dataset;
/// **The owner's enterprise list, as drawn** (2026-10-05): an audit entry's
/// line, the chain's line, a step-up's body, the operator's totals. Same
/// argument as [`room`].
pub mod enterprise;
/// **What the admin disk panel says**, on the host side of the wasm boundary:
/// every mount, member, the read cache and the twins' volumes, and never a
/// number nobody measured. Same argument as [`room`].
pub mod disks;
pub mod first_push;
pub mod fmt;
/// A file kept in Git LFS, in the file view: what the server says, the
/// header's type word, the raw route's URL.
pub mod lfs;
/// **Absent names draw nothing but that fact**: the decision a repository or
/// namespace page makes over its gating read. Pure; see the module.
pub mod gate;
/// **What a page header says**: its title, and a second line only when that
/// line is data (Overview's server key). Same argument as [`room`].
pub mod headers;
/// **One line, and a "?" for the rest**: the scan that holds every page to
/// it (owner, 2026-10-04). Same argument as [`room`].
pub mod hint;
pub mod graph;
/// **What the machine's panels decide** (the Overview's Machine card and
/// Administration → Storage's Layout panel; the Machine page itself is gone,
/// 2026-10-04), on the host side of the wasm boundary: the three states of an
/// off-stripe copy (and why `same_device` is never a green tick), which disk
/// `/data` and `/serialdat` each name, which of the two absences an empty
/// install record is, why `INTEGRITY ONLY` is not a verified signature, and
/// every rule that stops a figure nobody measured reaching the screen. Same
/// argument as [`room`].
pub mod machine;
/// **Machines asking to enrol** (2026-10-05): the Identities page's pending
/// rows and the approver's step-up, host-side where they are tested.
pub mod machine_enrol;
/// **What the mirror panel decides**, on the host side of the wasm boundary:
/// `has_progress` before the object pair, which rows the picker shows, and
/// whether the import button can be pressed. Same argument as [`room`].
pub mod mirror;
/// **Where everything lives**: the sidebar and the old addresses that moved
/// (storage: personal under Account, the machine under Administration). Same
/// argument as [`room`].
pub mod nav;
/// **Every page's title** (GUN-FIELD-TEST, 2026-11-01). Same argument as [`room`].
pub mod title;
/// **What the "more room" panel draws**, on the host side of the wasm
/// boundary: buttons when the server has offers, the typed boxes when it has
/// none — and the typed boxes again when the window could not be read, which is
/// the fork this console has already got wrong once. Same argument as [`room`].
///
/// Not behind `metered`, deliberately. It holds no words about money — every
/// one of those is the server's and passes straight through — so it is scanned
/// by `the_consoles_own_words_are_free_of_money` like every other module, which
/// is the stronger place for it to be.
pub mod offers;
/// **What a customer buying more room is told**: customer words for meters,
/// the price with its VAT, the three steps and the order's phase. `metered`
/// only, and on the money scanner's `METERED_ONLY` list.
#[cfg(feature = "metered")]
pub mod purchase;
pub mod room;
/// **Members on a repository's Settings tab** (2026-10-07): what a member
/// holds, in words. Same argument as [`room`].
pub mod members;
/// **What of an error body is fit to show.** A proxy in front of the console can
/// replace a refusal with its own HTML page; that markup must never be printed.
/// Same argument as [`room`].
pub mod refusal;
pub mod rights;
/// **The three themes and the order the header's switch walks them** (☀ → ☾ →
/// ✦), and the names `index.html`, the stylesheet and the switch must agree
/// on. Same argument as [`room`].
pub mod theme;
/// **What the Twin panel and the restore action decide**, on the host side of
/// the wasm boundary: when a twin row is red, what its last-seen, lag and fill
/// lines say, and when "Restore from twin" is drawn and may be sent. Same
/// argument as [`room`].
pub mod twin;
/// **What the Certificates panel decides** (owner 2026-10-25): the front's words shown, the
/// try-now button. Same argument as [`room`].
pub mod front_certs;
/// **The administrator's switches** for the public site and the MCP connector (`/admin`): drawn
/// only where the console says its build carries them (`/auth/status` `switches`), in every
/// bundle (GUI-PUBSW: a `public-site` console with the open bundle had no switch). The default
/// (airgap) console carries none, so this draws nothing there. See the module.
pub mod site_switches;
/// **What the visibility control decides**, on the host side of the wasm
/// boundary: which way the button would move a repository, what the
/// confirmation is allowed to claim about the branches it is about to publish,
/// and the guard that stops the widening direction happening on one press. Same
/// argument as [`room`], and see the module for the near-miss it comes from.
pub mod visibility;
/// **What the default-branch control decides** (owner, 2026-10-14): the
/// choices, what is sent and the plain words. Same argument as [`room`].
pub mod default_branch;
/// **Every branch, for a branch picker**: the pages of `/refs` and the cursor between
/// them (Henrik, 2026-10-31). Same argument as [`room`].
pub mod branches;
/// **What a pull request's page offers** (GUN-FIELD-TEST, 2026-11-01): Merge, or gunnar's
/// reason. Same argument as [`room`].
pub mod pull_view;
/// **What the repository delete decides** (gunnar.rs 2026-10-28): the URL, the typed-back
/// guard and the plain words. Same argument as [`room`].
pub mod repo_delete;
/// **The narrow screen's first grade of a typeset document** (GUN-FIELD-TEST, 2026-11-01).
/// Same argument as [`room`].
pub mod narrow;
/// **What the encryption control decides** (round 5.3.1): the badge, the direction and
/// its words. Same argument as [`room`].
pub mod encryption;
/// **Encrypted files, opened in this tab** with the person's security key
/// (WebAuthn PRF) — the one place the console does more than call the server
/// and render, because the server must not hold the key. See the module.
pub mod sealed;
/// **Gunnar is a name**: the test that every word the console shows a person
/// spells it `Gunnar`, while domains, paths, identifiers and commands keep
/// `gunnar`. See the module.
pub mod name;
/// GUN-GUEST: the one address scheme (`/{ns}/{name}/…`) and guest mode.
pub mod addr;
pub mod guest;
/// **The code of a page, for the tests that can only read it**: its comments
/// taken out (stinky #22). See the module.
#[cfg(test)]
pub mod code;
#[cfg(target_arch = "wasm32")]
pub mod api;
#[cfg(target_arch = "wasm32")]
pub mod app;
#[cfg(target_arch = "wasm32")]
pub mod feed;
/// The CSV import job's words (A34-17), shared by the Identity provider page.
pub mod sso_import;
/// **What the Identity provider page decides** (its `?account=`; A34-26/41/48/49/50), host
/// side, tested natively. See the module.
pub mod sso_page;
#[cfg(target_arch = "wasm32")]
pub mod pages;
#[cfg(target_arch = "wasm32")]
pub mod ui;
#[cfg(target_arch = "wasm32")]
pub use app::App;