Skip to main content

summary

Function summary 

Source
pub fn summary(entity: &EntityState) -> RowSummary
Expand description

Folds one Entity’s Cells into the state its row’s gutter shows.

In-flight outranks the least-settled summary while the row holds no values at all, its first probe, regardless of whether a probe happens to be dispatched against it yet: docs/spec/core-api.md’s Cell carries the same “nothing has looked at this yet” fact either way, and docs/spec/refresh.md’s “Startup is Generation 1 with an empty prior state” is what makes that fact Loading rather than Unknown. Once any Cell has settled to something, the gutter falls back to the row’s least-settled settled state instead, and a Cell nothing has settled yet is excluded from that fold exactly like NotApplicable: its own loading mark, drawn by the consumer, is what says a value is still coming (docs/spec/refresh.md’s “What the gutter and the cells show”, amended by ADR 0013). A NotApplicable Cell is excluded from the fold entirely too, which is what lets a Repo row (Worktree state Not applicable by kind) or a Worktree row on its own default branch (base Not applicable) read Fresh, or still show the first-probe spinner, on cells that simply do not apply. A Submodule row’s state and base are Unknown rather than NotApplicable, per ADR 0017 as amended, so they do fold in, and with the periodic fetch off (the default) that is what puts ? in a Submodule row’s gutter rather than a space. Otherwise the row shows its least settled Cell, widened by two entity-level derivations that are not Cells at all: an unparseable .gitmodules and a failed last Action both drive the row to Failed even when every Cell reads fine. Before any of that, though, last_action.running being Some also reads InFlight, outranking a Failed Cell and the same receipt’s own past failures: Core::run_action writes it once per step while a run is on this row right now (docs/spec/actions.md’s “The run on screen”), so a row being retried is in-flight rather than still reporting the failure it is retrying. The default branch’s rung and its disagreement stay out, being metadata about how a value was obtained rather than a value that can itself fail.