{#- 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 button that opens the drawer at it (`wall`, ADR-0147 decision 7), and it stands only while *◇ details* is on (`handled_details`, decision 6): off, the wall says a handled part by its color and its mark alone, and nothing of the block is drawn. The card drawn at depth 0 — the viewed node's, the root's on the overview — is that node's own head, and states it whole either way: the overview's is the root's own page, the one place a pin on the root is changed. ``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, fails=node.own_code.name in ('WARN', 'ERROR')) }} {%- endif -%} {{ rules_stated(node, pinning, wall=wall) }} {%- 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; the card drawn at depth 0 (`wall` false) states it whole, as it states a pin. -#} {% macro rules_stated(node, pinning, wall=true) -%} {%- 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=wall) }} {%- 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=wall) }} {%- 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. A handled line keeps all of that and carries its job's mark at its top right, which is its door — a link to its node's *Notes* tab at what handles it (ADR-0147 decision 7) — and a rail on its right edge wherever its node counts it as something other than it shows, in the color it counts as instead (ADR-0143). **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 %} {%- set rail = line_rail(node, line) %} {%- set marked = line_marked(line) %} {#- A line marked done shows ok, with the failure it closed beside its cue (ADR-0146), its words the failure's own and set off from it by the same separator: *· error · run 7 failed*. -#} {%- set closed = line.accepted and line.acknowledgment.kind == 'done' %}
{{ slot('reason.actions', node=node, reason=line.text, line=line, index=loop.index0, surface='grid') }}{% if closed %}{{ status_cue(line_shows(node, line), labeled=true, use=true) }}· {{ (line.code if line.code is not none else node.reported_code).name.lower() }} · {% elif line.code %}{{ status_cue(line.code, labeled=true, use=true) }}{% endif %}{{ line.text | shorten(400) | markdown(node=node.path) }}{% if marked %}{{ line_mark(node, line, rail) }}{% endif %}
{%- 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, handled_mark, config_block, line_mark, line_marked 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 whoever may set something there, its one seat at its end (ADR-0036 decision 12, ADR-0147 decision 1). -#} {% 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, head_marks, card_time, chips_drawn, node_icons, node_controls, frame_head, ok_mark, state_door with context %} {#- One row of the band's pill's popover (ADR-0056, maintenance.js): **one node**, never one line (ADR-0036). The popover is capped, so a node with twenty pinned findings contributes one row carrying a count — the same thing its card says in the grid — rather than twenty rows that would evict every other node from the list. The count is what makes the row honest for an entry pin: without it the row would claim a node is pinned when it is not. `quiet` is zero on a plain node pin, and that picks the wording. A card's own diamond, the pip, went with the door (ADR-0147 decision 2): ◇ on its head counts what is handled at and beneath it, and opens it. An entry row links with `?reason=` (ADR-0036 decision 12's addressing shape) and the fixed `#pinned-reason` anchor the page puts on the line it was asked for — one id, only when asked, and never the slug in a fragment, which is not fragment-safe. Only a **sole** entry pin can carry it; several have no one line to point at. A pin on a line the node does not report now is none of its reasons: the row counts it apart, *1 of 3 reasons, 1 line not reported now*, and a sole one's link lands on the node's page saying that line is no longer reported. A node not reported now — its check no longer returns it, or has not written it since the start — has no reasons to count its pins against: its row says *not reported now*, and its link lands on the page of its path, which says what is known of it (ADR-0116). -#} {% macro maintenance_row(row) -%} {%- set href = url_for('status', branch=row.path | url_branch, reason=row.slug) ~ '#pinned-reason' if row.slug else url_for('status', branch=row.path | url_branch) -%} {%- set shown = row.quiet - row.away -%}
  • {{ row.path }}{% if row.suspended %} not reported now{% elif row.quiet %} {% if shown %}{% if row.pinned %}+ {{ shown }} reason{{ 's' if shown != 1 else '' }}{% elif shown >= row.total %}all {{ row.total }} reason{{ 's' if row.total != 1 else '' }}{% else %}{{ shown }} of {{ row.total }} reasons{% endif %}{% endif %}{% if row.away %}{{ ', ' if shown else '+ ' if row.pinned else '' }}{{ row.away }} line{{ 's' if row.away != 1 else '' }} not reported now{% endif %}{% endif %} {% if row.quiet > 1 and not row.pinned %}next {% endif %}{{ row.remaining }}{% if row.note and row.note != 'maintenance' %}{{ row.note | markdown_inline(node=row.path) }}{% endif %}{% if row.set_by %}{{ row.set_by }}{% endif %}
  • {%- endmacro %} {#- A chip's counts (ADR-0127 decision 2): what is beneath the node and in it, taken by `tree.chip_counts` on the unfiltered snapshot. One total and no glyph where everything it counts shares a state, each state's glyph and count where they mix, and none on a leaf of one line, whose chip *is* that line. The glyphs are the status cues' shapes, decorative; the words ride on the chip as its `title` and in its accessible name. Beside them a ringed diamond and a number say how many parts beneath a rule handles that the counts do not show as such (ADR-0135 decision 6) — one mark and a number whatever the mix, its jobs in the words. -#} {% macro tree_counts(node, counts) -%} {%- set drawn = counts.mixed or node.children or counts.total > 1 -%} {%- if drawn or counts.handled -%} {%- if drawn and counts.mixed -%} {%- for state in counts.states %}{{ status_cue(state_code(state), use=true) }}{{ counts.counts[state] }}{% endfor -%} {%- elif drawn -%} {{ counts.total }} {%- endif -%} {%- if counts.handled %}{{ handled_mark() }}{{ counts.handled }}{% endif -%} {%- endif -%} {%- endmacro %} {#- What a level's runs of chips are sized for under the look `chip_runs: aligned` (ADR-0127 decision 12): the server's estimate of their column width — each character of the widest name and the largest count at 0.85 of the chip's `0`, and the chip's chrome at its size — and the largest count of leaves among its branches, which `tree.js` keeps room for when it measures the names in the chip's own font and sets the width in pixels (`app._chip_room`). The column decides too: a run whose level has room for one of them only wraps as it comes. Wrapped runs size nothing, and carry neither. -#} {% macro chip_room_of(children) -%} {%- if look_values.chip_runs == 'aligned' -%} {%- set room = chip_room(children, chip_leaves) %} style="--chip-w: {{ room.estimate }}" data-leaves="{{ room.leaves }}" {%- endif -%} {%- endmacro %} {#- One level of a node's children (ADR-0127 decisions 1 and 2): every node the filters leave, closed or open, with everything beneath it. A node is one `.tree-node` with both faces — its chip, an `` to its page with its cue, name and counts, `hidden` while the node is open, and its box, today's `.status-node`, inside a bare `.tree-hold` drawn `hidden="until-found"` while the node is closed, so that opening it needs no request and the browser's find reaches a name or a line beneath a chip (`overview.css` gives the wrapper its `display` back against Bootstrap's `[hidden]`). How each node starts is the route's (`drawn`, `first_look.draw`, ADR-0128): closed where its parent's `chips` says so and it claims no `show_when_quiet`, open where nobody spoke but where its level is big — opened, more than thirty boxes, counted to the bottom — a `depth=` level closed, and in each card the first three failures that left hidden opened with their paths, `data-budget`. Each box's line budget is its own `reason_cap`. The level keeps its declared order (ADR-0055): consecutive closed children form a `.tree-run` of chips that spans the row, and an open child stands in its place between runs; `tree.js` re-forms the level by `data-order` as a click opens or closes a node, so a node opens where it stood and nothing moves sideways. What the script needs rides on each node: `data-state` as drawn, `data-chips` as its ▤ is drawn where it has children, `data-ok="true"` where its configured fold is on (absent is `false`), `data-budget` where the failure budget opened it, `data-swq` where it claims `show_when_quiet`, `data-healthy` where the healthy fold would fold it — `data-fold-drawn` beside it where its parent's configured fold does, which `overview.css` folds from the first paint until `tree.js` folds it itself — and `data-failing` while it is drawn as an error or a warning, which a close's incident reads (decision 9). `data-path` stays on the head row and on the chip, the rows `inspect.js` and `maintenance.js` read — never on the whole node. Every other level's node is `is-stepped`, a card's own children first (`level` even, the cards being level 1 on a node's page as on the wall), and `overview.css` steps the pale fill of its box and of its chip alike, so either stands apart from the box around it (ADR-0028). The mark is the node's, not its box's, so one mark serves both faces. -#} {% macro render_nodes(children, level, parent_path, max_depth, pinning, shown_time="") -%} {%- set parent_folds = parent_path in drawn.folded -%} {%- set faces = drawn.faces(children) -%} {%- for child in children -%} {%- set closed = faces[loop.index0] -%} {%- if closed and (loop.first or not faces[loop.index0 - 1]) %}
    {% endif -%} {%- set has_kids = child.children and level < max_depth -%} {%- set node_dim = child.code.name == 'OK' or (child.derived and has_kids) -%} {%- set counts = chip_counts[child.path] -%} {%- set fold = healthy_counts(child) -%} {%- set kid_faces = drawn.faces(child.children) if has_kids else [] -%} {%- set folds = child.path in drawn.folded -%}
    {{ status_cue(child.code, use=true) }}{{ child.name | breakable }}{{ tree_counts(child, counts) }}
    {%- if closed and (loop.last or not faces[loop.index0 + 1]) %}
    {% endif -%} {%- endfor -%} {%- endmacro %} {#- What every pin on this page shares (see `pin_stated`): the reader may write one as an admin, and not on the kiosk, where nothing is to be clicked; a write comes back to the page's own address, with its filters and its depth; and each editor counts itself. -#} {%- set pinning = namespace(count=0, may=is_admin and layout != 'kiosk', back=here) %} {#- The first look (ADR-0128): `drawn`, how each node starts as the route worked it out (`first_look.draw`), and `priced`, what the planner prices of it; `depth_closed`, the level a `depth=` in the address closes, is in `drawn` already. -#} {#- What the hover card says of each drawn node's `about` (ADR-0019): its first block and how many follow, the status strip's among them. Inside the grid, so it rides in every fragment of the refresh and `inspect.js` reads it again after each swap; the card's heading, the node's name and title, is the node's own head. -#} {%- set ruled_parts = ruled_parts | default(0) %} {%- set seen_parts = seen_parts | default(0) %} {%- set silenced_parts = silenced_parts | default(0) %} {%- set done_parts = done_parts | default(0) %} {%- if maintenance_rows or ruled_parts or seen_parts or silenced_parts or done_parts or (heartbeat is defined and heartbeat) %} {#- Status-strip band (ADR-0056): the self-monitor heartbeat pill and, to its left, the maintenance pill — a compact count that folds the always-visible index it replaced. Both live in the poll fragment, right-aligned beneath the controls, refreshing on the ~10s poll. -#}
    {%- if maintenance_rows or ruled_parts or seen_parts or silenced_parts or done_parts %} {#- The pill: the always-visible index folded to a count, in a chip's short form (ADR-0135 decision 6) — a ringed diamond and how many pins stand, a node's and a line's, whether or not its part is reported now (ADR-0147 decision 2), how many lines a person marked done (ADR-0146), how many failures they marked seen (ADR-0142) and how many they silenced (ADR-0144), and how many parts a configured rule changes the count of now (ADR-0137), its words naming each. A click opens the shared popover (maintenance.js) over the whole set — the first ``maintenance_cap`` nodes, then a "+N more" to the *Handled* page, which lists every pin as its block, and a row to its *By a rule*. Only shown when something is handled; maintenance-tinted, refreshed in the poll like the strip. -#} {%- set held_nodes = maintenance_rows | selectattr('pinned') | list | length -%} {%- set held_lines = maintenance_rows | sum(attribute='quiet') -%} {%- set held = held_nodes + held_lines + done_parts + seen_parts + silenced_parts + ruled_parts -%} {%- set held_words -%}{{ held }} handled: {{ [(held_nodes ~ (' node' if held_nodes == 1 else ' nodes') ~ ' in maintenance') if held_nodes else '', (held_lines ~ (' line' if held_lines == 1 else ' lines') ~ ' in maintenance') if held_lines else '', (done_parts ~ ' done') if done_parts else '', (seen_parts ~ ' seen') if seen_parts else '', (silenced_parts ~ ' silenced') if silenced_parts else '', (ruled_parts ~ ' by a rule') if ruled_parts else ''] | select | join(', ') }}{%- endset -%} {%- endif %} {%- if heartbeat is defined and heartbeat %} {#- Status strip (ADR-0056 decision 3): the engine self-heartbeat (ADR-0005) lifted out of the card grid into a compact caption pill. It refreshes with the ~10s poll and dims with the grid under a sustained-outage banner. A stale heartbeat (the scheduler stalled) shows vivid, not pale — the self-monitor's own alarm. The path is reserved (the loader keeps custom checks off its line), and it is a branch, one child per contributor, lifted with its children — see _split_heartbeat. -#}
    {#- Self-monitor identity: a watching-eye glyph marks this as the monitor observing itself, apart from the node pills. Decorative — the name carries the identity for screen readers. -#} {{ heartbeat.name }} {#- The title at its own width or not at all: its frame is one line high and wraps, so a title with no room beside the name and the state goes to a second line nobody sees, where it would have been squeezed to a few letters. The node's page and its inspection card still say it. -#} {% set shown = heartbeat | node_title %}{% if shown %}{{ shown | markdown_inline(node=heartbeat.path) }}{% endif %} {% if heartbeat.stale %}stale{% endif %} {{ status_cue(heartbeat.code, use=true) }}{{ heartbeat.code.name.lower() }}
    {%- endif %}
    {%- endif %} {#- A wall filtered by a tag (ADR-0139 decision 5): which tag, what it means, the parts the filter hides that fail — a filter changes what the page shows, never what is true — and the way back to every node. Inside the grid, so that the refresh keeps what it hides current, and on the kiosk too, whose address alone filters it and which has no band to say so. -#} {%- set tag = tag | default('') %} {%- set tag_hidden = tag_hidden | default(()) %} {%- set tag_line = tag_line | default('') %} {%- if tag %}

    Only what carries {{ tag }}{% if tag_line %} — {{ tag_line }}{% endif %}{{ '' if tag_line and tag_line[-1] in '.!?' else '.' }} {%- if tag_hidden %} The filter hides {{ tag_hidden | length }} {{ 'part that fails' if tag_hidden | length == 1 else 'parts that fail' }}: {% for part in tag_hidden[:5] %}{{ part.path }}{{ '' if loop.last else ', ' }}{% endfor %}{% if tag_hidden | length > 5 %} and {{ tag_hidden | length - 5 }} more{% endif %}.{% endif %} {%- if layout != 'kiosk' %} Every node{% endif %}

    {%- endif %} {% if node is none and no_node %} {% include '_no_node.html' %} {% elif node is none %}
    No such branch: {{ branch }}. Back to status.
    {#- The overview is nobody's node, so with nothing under it there is only the sentence to show. A node's page is different: hide ok and hide idle filter its **children**, and a filter that hides every one of them leaves the node itself — its head, its card at depth 0, its own facts below — exactly where it was, with the grid saying that nothing in it matches. They went with the children once, and a page of one sentence could not say what the node was. -#} {#- Where the filters leave none of the nodes a page shows, it says what they hid (`_nothing_left`): with hide ok on, the wall is the list of problems and empty on a good day, which must read as all well rather than as nothing reporting. A renderer that filters nothing passes no sentence. -#} {% elif not node.children and not branch %}

    {{ nothing_left | default("") or "No checks reporting yet." }}

    {% else %} {#- **A node's page draws its node in a frame** (ADR-0127 decision 8): the page is the same tree as the wall, rooted at the node, and the node itself is always open — framed with everything that is part of it. Its head is the frame's top (`frame_head`, which a leaf's page draws too), with the pins acting on the node stated at its head and its own lines beneath; its children inside, the cards of the page; and last the node's own facts, after the children, every card open. Drawn on every page at a depth past 0 — the one card of `depth=0` is the node itself, closed to its head and counts, and is not framed — and on the kiosk too, without the icons and the facts, as its heads go without. The frame is the page's node in the tree's markup: a `.tree-node` marked `data-page-root`, always open, its box holding the head, the page's grid — its level, whose cards are its children — the healthy fold's count and the facts; `data-failing` as on every node, which a close the viewer set on the wall reads for its incident while the page is open. So its ▤ folds the page's cards and its funnel the healthy ones and its own healthy lines, by the node's own entries in the tab's map, the same entries its box carries on the wall (`tree.js`). Its edge is its state's; the head wears its fill. Inside `#status-grid`, so the refresh draws all of it again, the facts among it: `report` is an output of the run. What the head shows is what the cards below suppress (ADR-0044): the head is the topmost visible node, so its time is the one the cards leave out. -#} {%- set framed = branch and max_depth >= 1 -%} {%- set head_shown = node.timestamp | localtime("%H:%M") if (framed and node.timestamp) else "" -%} {%- if framed %} {#- the cards' faces as drawn: open on a page as it arrives, closed under a `depth=1` but where the failure budget opened them; and the page's node's own fold, as its files say -#} {%- set card_faces = drawn.faces(node.children) %} {%- set frame_fold = healthy_counts(node) %} {%- set frame_folds = node.path in drawn.folded %}
    {{ frame_head(node, pinning, branch, card_faces, frame_fold, beneath=node.path in containers, folds=frame_folds) }} {%- endif %} {#- Stable flow spans (ADR-0056): the server derives useful width steps from rendered topology, depth and the configured reason-line budget — never current status or reason content — and prices each span at the width it actually has, publishing `(tenths, tracks, plan)` breakpoints — the grid width in tenths of a pixel, the model's own unit, against which dashboard-layout.js compares its measurement scaled by ten. That script measures only the grid's resolved width, sets the band's named track count and selects the latest applicable band; without that script, and under `dashboard_columns: plain`, this remains the ordinary auto-fill grid. Each card carries its one-track stable height and minimum-width useful steps for readable harness diagnostics. Under the look `boxes: packed` the plan is the one that packs the page shortest, its levels priced as they are packed (ADR-0138). -#} {%- set grid_layout = dashboard_layout(node.children, max_depth, reason_cap, priced, packed=look_values.get('boxes') == 'packed') if max_depth >= 1 and dashboard_columns == 'flow' and node.children else none -%} {%- if max_depth >= 1 and not node.children %}

    {{ nothing_left | default("") or "No checks reporting yet." }}

    {%- else %} {#- The grid carries the server's clock in whole seconds for the tab's map, which holds a close for its node's incident by the server's time and never the browser's (ADR-0127 decision 9). On a node's page it is the frame's level: the page's node, which its rule opens the children of as it arrives (decision 8), is the frame. -#}
    {% if max_depth < 1 %} {#- depth 0 — a single card for the viewed node, closed to its head and counts (ADR-0127 decision 7): its rolled-up "overall" light. A click opens it to its own lines, as a card's panel opens. -#} {%- set counts = chip_counts[node.path] %} {%- set rail = node_rail(node) %}
    {{ node.name | breakable }}{{ tree_counts(node, counts) }} {%- set middle %}{% set shown = node | node_title %}{% if shown %}{{ shown | markdown_inline(node=node.path) }}{% endif %}{% endset %} {#- The same `node.actions` slot the depth-1 cards carry. At depth 0 this card *is* the viewed node, so an action whose subject is the node belongs here more plainly than anywhere — and the panel below already renders the per-reason slot, so leaving this one out made a deployment's node action vanish at one depth setting while its reason action stayed. At depth 0 this card is the viewed node's own head, so ◇ is its door as on every head (ADR-0147 decision 1) — but on the overview, whose card is the root, every node there is: the root has no *Notes* tab and no ◇, and silencing everything from a form is a foot-gun nobody is offered. A pin that stands is stated like any other, with *Edit* and *Clear*, as *Handled* states it. -#} {%- call node_controls(node, [], healthy_counts(node), 'card', middle=middle, may=pinning.may, page_root=branch) %} {% if node.stale %}stale{% endif %} {{ state_door(node, pinning.may) }}{{ card_time(node) }}{{ status_cue(node.code, use=true) }}{{ node.code.name.lower() }}{{ reported_suffix(node) }}{{ head_marks(node) }} {%- endcall %}
    {#- The panel also carries the pin's block, so a pinned node that reports nothing at all still says who silenced it and why — and the blocks of the pins above it, which silence it as much. -#}
    {% else %} {#- The wall's cards are level 1 of the tree, their children level 2 (ADR-0127 decision 7): a card is a node like every other, closed in its place to one line — its head and its counts — or open to its panel, which a bare `.tree-hold` wraps as a box's does, so that a find reaches what a closed card holds. The planner (`dashboard-layout.js`) still reads the cards as `.status-grid`'s direct children. -#} {% for system in node.children %} {# a card's children render only from depth 2 on (depth 1 is cards only) #} {% set card_has_kids = system.children and max_depth > 1 %} {% set card_dim = system.code.name == 'OK' or (system.derived and card_has_kids) %} {%- set card_closed = system.path in drawn.closed %} {%- set counts = chip_counts[system.path] %} {%- set kid_faces = drawn.faces(system.children) if card_has_kids else [] %} {%- set fold = healthy_counts(system) %} {%- set folds = system.path in drawn.folded %} {%- set page_folds = node.path in drawn.folded %} {%- set rail = node_rail(system) %}
    {#- A part a tag filter shows, the path between the page's node and it before its name (ADR-0139 decision 5): where it stands, since nothing above it is drawn. -#} {%- set context = (tag_context | default({})).get(system.path, '') %} {%- if context %}{{ context }} ›{% endif %} {{ system.name | breakable }}{{ tree_counts(system, counts) }} {%- set middle %}{% set shown = system | node_title %}{% if shown %}{{ shown | markdown_inline(node=system.path) }}{% endif %}{% endset %} {#- The `node.actions` slot (ADR-0034, second slot): an action whose subject is the **whole node**, not one of its reason lines — which is where it belongs when a node's reasons are prose (ADR-0036). Offered on every card and declined by the filler, like every slot; it collapses to nothing when nobody fills it. ◇, the card's door, ends the icons for every reader, lit with what is handled at and beneath it (ADR-0147 decisions 1 and 2). -#} {%- call node_controls(system, kid_faces, fold, 'card', middle=middle, may=pinning.may, folds=folds) %} {% if system.stale %}stale{% endif %} {{ state_door(system, pinning.may) }}{{ card_time(system, shown=head_shown) }}{{ status_cue(system.code, use=true) }}{{ system.code.name.lower() }}{{ reported_suffix(system) }}{{ head_marks(system) }} {%- endcall %}
    {% endfor %} {% endif %}
    {%- endif %} {#- The healthy fold's count (ADR-0127 decision 4) after the page's cards, as a box's stands after its children: *✓ +N ok*, shown by tree.js while the frame's fold is in force. -#} {%- if framed %}{{ ok_mark(frame_fold, frame_folds) }}{% endif %} {#- The viewed node's own facts, **below** its children (ADR-0044 decision 8), last in the frame (ADR-0127 decision 8): the head says what this node is, the grid says what is under it, and the details come last, every card open — a forty-line report above the grid would push the dashboard the reader came for off the screen. Inside `#status-grid` deliberately: `report` is an **output of the run** and changes with every tick, so a frozen roster beside a live grid would be the one part of the page quietly going wrong. Rendered only when the node has something of its own to say: an observation, a configuration, a report — or a period, which the route hands over as ``since`` (ADR-0115 decision 6) and, for what a node above others shows, as ``shows`` (ADR-0132 decision 5). A container two checks share has none of the first three by construction — the snapshot withholds its text and its run facts (decision 1) — but it has shown what it shows since an instant the tree keeps, and the card says that now. Pinned, a node nothing has written has shown *maintenance* since its pin, and the card says so: the pin's block above the children says who and until when, and since when was on no part of the page. Where no period is of what the node shows — after a restart, until the units beneath it have run — it has nothing to say that its head does not, and the block stays away. A node that says something of itself — its `description`, its `about`, details of its own or given down to it — has its *About* card in the block (ADR-0133 decisions 1 and 6), beside its facts where it has any and alone where it has none. The root is a node as any other there: the overview has no facts, the route handing it none, and where the root says something of itself its card stands alone after its children, at the wall's foot — where it says nothing, which no deployment's root does today, the wall is as it was. -#} {%- set facts_shown = branch and (node.timestamp or node.config or node.report or since or (shows and shows.at)) %} {%- if layout != 'kiosk' and (facts_shown or about_card(node)) %}
    {#- The block's cards are h3s beneath the frame's head, the node's h2. At `depth=0`, unframed, and on the overview, the page's only other heading is the band's h1 — so there this names whose time and report these are, or the outline would jump a level and a screen reader meet three headings belonging to nothing; the root is named as the band's first crumb names it. -#} {%- if not framed %}

    {{ node.name if branch else 'nodes' }}

    {%- endif %} {% include '_node_facts.html' %}
    {%- endif %} {%- if framed %}
    {%- endif %} {% endif %}