{#- 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. And only where the node **shows** *maintenance*: one whose lines are all silenced shows what the nodes beneath it roll up to, and has no *maintenance* for the reading to stand under (ADR-0124) — its silenced lines and their count say it there. ``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.code.name == 'MAINTENANCE' and 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. **So does a pin above it** (ADR-0104 decision 2): a pin on a node above this one silences it with everything else beneath that node, and the head states each such pin as its block, outermost first, without buttons — it is edited where it stands — and the node's own pin, under one, is *also silenced on its own*. Silent when the node has nothing of its own to add, no pin above it **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. 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). **It says what the node rolls up to** (ADR-0123 decision 1): the status its card says on the page above and its one card says at depth 0, so a node is one status wherever it is read. Saying the node's **own** status here, on the ground that the children right below say theirs, headed a page green over a child in error while the page above drew the same node red. **Whose the status is, the fill says**, as a card's does (decision 2): pale where it comes from beneath the node — `derived`, the snapshot's one answer to that — because the node that makes it so is right below, and vivid where the node counts it for itself: a failure of its own, or its own reading gone stale. A node that declares nothing is the plain case of the first. Its `UNDEFINED` is a container's, which the roll-up skips (ADR-0039), so whatever it shows comes from beneath it, and 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 vivid. What the node says of itself is its lines, and the period of its own status, on the Time card beneath the children. **Its lines are listed as a leaf's page lists them** (`own_lines`, ADR-0036 decision 12): in full rather than clamped to `reason_cap` — this is the node's own page, where a reader comes when its card is not enough — each with its record, and for an admin with the pin control at its end, so a line of a node above others is silenced where it is read, without the node's pin that silences everything beneath it. -#} {% macro viewed_head(node, reason_cap, pinning, branch) -%}