{#- 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 -%}
{%- for line in node.reasons | failing_first %}
{{ slot('reason.actions', node=node, reason=line.text, line=line, index=loop.index0, surface='grid') }}{% if line.code %}{{ status_cue(line.code, labeled=true, use=true) }}{% endif %}{% if line.accepted %}{{ line_ack_mark(line) }}{% endif %}{% if line.rule and line.rule.changes %}{{ line_rule_mark(line.rule) }}{% endif %}{{ line.text | shorten(400) | markdown(node=node.path) }}
{%- endfor %}
{#- *⌄ all N* (ADR-0127 decision 3): beneath the lines, where the budget's fade is, and only while they overflow it — `tree.js` measures the block once its box is shown and shows the button, *⌃ less* while the lines are open; the tab's map keeps the choice as `lines`. It names the block it controls, whose id is the node's path, unique on a page that draws each node once. Drawn where the lines are more than the budget, which overflows for certain; a block of fewer lines overflows only where they wrap, and `tree.js` draws the button there itself, so that a wall of short blocks carries none. -#} {%- if total > cap %}{% endif %} {#- Under a **node** pin everything here is silenced already, so this count is not the reason the card is blue — the pin's block is. It says what will still be quiet once the node pin is cleared. -#} {%- if node.quiet_reasons %}
{{ node.quiet_reasons }} of {{ total }} {% if node.maintenance %}also pinned individually{% else %}in maintenance{% endif %}
{% endif -%} {%- endif -%} {%- endmacro %} {#- The shape cue lives in its own partial (_status_cue.html) so the leaf detail page can import it without executing this template's body; the rationale and the labeling rule are documented there. -#} {% from '_status_cue.html' import status_cue %} {#- A pin's block and its editor are the rule's own (ADR-0104), imported with the context for the deployment's default window and its timezone that an editor's fields print — so the refresh's fragment is handed both, as the page is. -#} {% from '_rule_block.html' import pin_block, pins_above_stated, rule_mark, handled_mark, config_block, line_rule_mark, line_ack_mark with context %} {#- A node's own lines as its own page lists them — a leaf's and, here, a branch's head and its depth-0 card: in full, each with its record and for an admin the pin control at its end (ADR-0036 decision 12). -#} {% from '_own_lines.html' import own_lines with context %} {#- What every head shares — its state, its time, its controls and icons — and the head of a node's page, which `check.html` draws too: one partial of macros, so the two pages cannot drift apart (`_node_head.html`). -#} {% from '_node_head.html' import reported_suffix, card_time, chips_drawn, node_icons, node_controls, frame_head, ok_mark with context %} {#- Maintenance pip: a click-to-open marker on a card whose subtree holds a pinned node but which is not itself pinned — a glance at any depth shows where to drill, and a click opens a popover (maintenance.js) listing that card's pins as links. A real