{#- Reason overflow (ADR-0024): a node's reasons clamped to a *line budget*. The block shows at most ``cap`` lines (settings.yaml ``reason_cap``: short reasons ⇒ that many reasons, a wrapped reason uses more of the budget); the overflow stays in the DOM, clipped by CSS (never cut mid-HTML, ADR-0018) and faded. A header chevron (reasons.js) reveals it in place and survives the ~10s fragment swap — ▼ when clipped, ▲ when open. The leaf detail page (check.html) stays full; the JSON envelope is untouched. -#} {#- Each line also carries the ``reason.actions`` slot (ADR-0034) — the place a dependent package hangs a local interaction off *this* reason, e.g. "raise a ticket for it". The slot is offered on every reason of every node and the filler decides where it applies; core passes the **unshortened** reason, since the 400-character clamp is a display budget and an action wants the whole text. Rendered server-side like the rest, so it survives the ~10s fragment swap. -#} {#- Reasons are keyed entries (ADR-0036), so a line can be pinned on its own. A quiet line is **shown**, in the maintenance tint (ADR-0032 rule 5) — hiding it would be the suppression covering its own tracks — and the node states how many are quiet, because the clamp above can put the pinned line below the fold and the count is then the only thing that always shows. -#} {#- What is being silenced (ADR-0032 rule 5: a transformed contribution is visible and attributable). A card that says only "maintenance" hides the transform — *we are silencing an error* is the thing worth knowing, and before the keystone it was not merely hidden but destroyed. Shown wherever a node's own status has been derived away from a countable reading, by a node pin or by every member being pinned; a check that reported ``MAINTENANCE`` itself has nothing to add. ``word`` includes the status word for surfaces that do not already print it. -#} {% macro reported_suffix(node, word=False) -%} {%- if node.own_code.name == 'MAINTENANCE' and node.reported_code.name not in ('MAINTENANCE', 'UNDEFINED') %} {% if word %}maintenance {% endif %}· {{ node.reported_code.name.lower() }}{% endif -%} {%- endmacro %} {#- Why the node is blue: who pinned it, until when, and their explanation. It sits **above** the reason block and outside the ``reason_cap`` clamp, so the reason for the colour can never be the thing that gets clipped — the placement rule the quiet count already follows. Paints its own maintenance tint, like every other maintenance surface, so it does not depend on the card fill under it. -#} {% macro pin_banner(node) -%} {%- if node.maintenance_entry %}
{% endif -%} {%- endmacro %} {#- The **viewed** node's own state, above its children. A subtree page is a dashboard *of the children*, which left the one node you actually navigated to as the only one on the page that never said anything about itself. A pin on it surfaced solely through the maintenance card at the foot of the page — in different words, with the reason tucked inside a form field, and `{% if is_admin %}`, so a viewer got nothing at all. `depth=0` already drew the viewed node as a card; this is the same thing at every other depth, which also ends the page disagreeing with itself as the depth control moves. Silent when the node has nothing of its own to add: a container with no reading, no reasons and no pin is exactly the page that should open with its children. It reports **own** status, not the roll-up — the children are directly below and say that themselves. Rendered as a `status-node` so it takes the same fill and ink as any box, and kept **inside `#status-grid`** so it refreshes on the ~10s poll; the maintenance card stays outside, deliberately, because it holds an open form. -#} {% macro viewed_head(node, reason_cap) -%} {%- if node.maintenance_entry or node.reason or node.stale or node.own_code.name != 'UNDEFINED' %}