{#- Reason overflow (ADR-0056 decision 1): 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. *⌄ all N* beneath the lines (tree.js, the tab's map) reveals it in place and survives the ~10s fragment swap and a reload — *⌃ less* folds it again. 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. -#} {#- Why the node is blue: the pin's block (ADR-0104 decisions 1 and 2) — who put it in maintenance, until when and what is left, 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`). On the wall the block is the lighter one (`wall`, ADR-0135 decisions 3 to 5): its note behind its mark, its buttons marks; the card a node's own page draws at depth 0 is that node's statement, and states it whole. ``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, wall=true) -%} {%- 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, wall=wall) }} {%- endif -%} {%- if node.acknowledgment -%} {%- set pinning.count = pinning.count + 1 -%} {{ pin_block(node.acknowledgment, 'node', node.path, '', 'seen-' ~ pinning.count, pinning.may, next=pinning.back, of=node.path, bare=true, wall=wall) }} {%- endif -%} {{ rules_stated(node, pinning) }} {%- endmacro %} {#- A configured rule where it acts (ADR-0137): its block on the box or the card whose part it changes the count of, while it does — what the node passes up, how its children count in it, how its lines count in it — beneath a pin's, and none on a node it picks and changes nothing of now: a configured rule stands for good, and the wall shows what is now (ADR-0135 decision 9). A node's own page and *Handled* state it always. -#} {% macro rules_stated(node, pinning) -%} {%- for at, place in [(node.rule, 'node'), (node.children_rule, 'children')] if at and at.changes -%} {%- set pinning.count = pinning.count + 1 -%} {{ config_block(at, place, node.path, 'rule-' ~ pinning.count, wall=true) }} {%- endfor -%} {%- for at in lines_rules(node) if at.changes -%} {%- set pinning.count = pinning.count + 1 -%} {{ config_block(at, 'lines', node.path, 'rule-' ~ pinning.count, wall=true) }} {%- endfor -%} {%- endmacro %} {#- A coded line (ADR-0042) carries the entry's **own** claim: its state class, a small labeled cue (a line has no status word, so the cue is its accessible name), and its state's own tint — every coded line paints one, because a mixed list sits on a *vivid* card fill, where a surfaceless passed line would read as more of the problem (the is-quiet lesson: ink-on-whatever fails the bar). A quiet (pinned) line keeps the maintenance tint whatever its code says: suppression is the louder fact. `is-running` marks work in flight — italic, display only; the line's words still say it, so no meaning rides on the italic alone. **The block's lines come failing first** (ADR-0127 decision 6): errors, then warnings, then the rest, each group in the check's order, a pinned line among the rest — so what the sheet's clamp to `reason_cap` cuts is healthy lines, and the reason for the box's color needs no click. A roster whose failing name came eighth stood yellow with six green lines in view. The order is the server's, so it stands through every swap; `own_lines`, which nothing clamps, keeps the check's order. -#} {#- Where the node's fold is configured on (ADR-0128) and it claims no `show_when_quiet`, its healthy lines carry `data-fold-drawn`, which `overview.css` folds from the first paint where the page has its scripts, until `tree.js` folds them itself; without script nothing is folded. -#} {% macro reason_block(node, cap, folded=false) -%} {%- if node.reasons -%} {%- set total = node.reasons | length -%}