{#- 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. **A damping counter is the same kind of fact and takes the same slot**: the node shows what it read and its parent is still counting the quieter value, so the card says how many readings are in and how many the deployment asked for. A red leaf under a green parent is what a broken roll-up looks like, and this is the sentence that tells the two apart. Same ink as the maintenance suffix — the transform is one idea and it should not look like two. -#} {% 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 -%} {%- if node.damping %} · {{ node.damping.seen }} of {{ node.damping.needed }} to escalate{% endif -%} {%- endmacro %} {#- Why the node is blue: the pin's block (ADR-0104 decisions 1 and 2), as the node's own page states it — who silenced it, until when and what is left, its note in full, and for an admin *Edit* and *Clear*. It stands **above** the reason block and outside the ``reason_cap`` clamp, so the reason for the color can never be the thing that gets clipped — the placement rule the quiet count already follows — and it paints its own maintenance tint, like every other maintenance surface, so it does not depend on the card fill under it. A card's head names the node, so the sentence opens with what was done to it (`bare`). ``pinning`` is what every pin on the page shares: whether the reader may write one, the address a write comes back to, and the count that gives each editor ids of its own — a wall carries an editor for each card, and a label finds its field by id. -#} {% macro pin_stated(node, pinning) -%} {%- if node.maintenance_entry -%} {%- set pinning.count = pinning.count + 1 -%} {{ pin_block(node.maintenance_entry, 'node', node.path, '', 'pin-' ~ pinning.count, pinning.may, next=pinning.back, of=node.path, bare=true) }} {%- 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. `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. **The node's pin stands here** (ADR-0104 decisions 2 and 3): its block, above the children it covers, and for an admin the one control that sets it — *Set maintenance*, which opens its editor where the block will stand. The form posts the page's own `branch`, as a leaf's page does. The card at the foot of the page said the pin a second time, in different words and to an admin only; it went when the head took this over. Silent when the node has nothing of its own to add **and the reader cannot pin**: a container with no reading, no reasons and no pin is exactly the page that should open with its children. An admin gets the head on every branch's page, because the control needs its place. The caller decides (`head_drawn`, where the page is drawn), since what the head shows is also what the cards beneath it suppress. 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 — which waits while an editor in it is open (decision 7). **A node that declares nothing is the exception.** Its `UNDEFINED` is a container's, which the roll-up skips (ADR-0039), and not a status: one that carries a sentence — an `aws` check's root states its scope above its accounts — headed its page gray and *undefined*, the word hide-idle reads as never reported, under a dashboard that drew the same node green. So it heads with what it rolls up to, pale as its card is where its children show, because the culprit is right below; that is also the code a kept reading records for it (ADR-0087 decision 8). A roll-up of nothing is `UNDEFINED`, the node's own again, and says so. -#} {% macro viewed_head(node, reason_cap, pinning, branch) -%} {%- set rolled = node.own_code.name == 'UNDEFINED' and node.code.name != 'UNDEFINED' %} {%- set head_code = node.code if rolled else node.own_code %}