release 1.14.0: colour-distinct SUMMARY boxes per severity

Terminal SUMMARY uses verdict-tinted header, bold counts, and
per-row background tints for OK/ERROR/WARN/INFO/BLOCK. HTML mon
pages map those lines to sum-* CSS panels with matching emphasis.
This commit is contained in:
Hernâni Marques 2026-07-19 04:32:26 +02:00
parent 31565f46d1
commit 8f3d221e02
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
4 changed files with 153 additions and 43 deletions

View file

@ -278,13 +278,31 @@ def classify(line: str) -> str:
u = line.upper()
low = line.lower()
# section / summary headers before badge matching (they contain the word ERROR)
if "SUMMARY" in u or "--- ERRORS" in u or "ERRORS ·" in u or "ERRORS (" in u:
if re.search(r"[╔═║╚]|SUMMARY", u) and (
"SUMMARY" in u or "═══" in line or "" in line or "" in line
):
if "SUMMARY" in u or ("" in line and "" in line) or ("" in line and "" in line):
if "SUMMARY" in u or (not is_numbered_check_line(line) and ("" in line or "" in line or "" in line)):
if "SUMMARY" in u or re.match(r"^\s*[╔╚║]", line):
if "SUMMARY" in u:
return "sum-header"
if re.match(r"^\s*[╔╚]", line) and "" in line:
return "sum-header"
if re.match(r"^\s*║", line) and not is_numbered_check_line(line):
return "sum-header"
if "--- ERRORS" in u or "ERRORS ·" in u or "ERRORS (" in u:
return "meta"
if "numbered checks" in low or "totals:" in low:
return "meta"
# SUMMARY verdict chrome (not a check)
if "warnings only" in low or "all clear" in low or "failed — see" in low or "failed - see" in low:
if "numbered checks" in low:
return "meta"
if "totals:" in low:
return "sum-totals"
# SUMMARY verdict chrome (not a check) — keep distinct for HTML boxes
if "warnings only" in low:
return "sum-verdict-warn"
if "all clear" in low:
return "sum-verdict-ok"
if "failed — see" in low or "failed - see" in low:
return "sum-verdict-err"
# host-agent tees converter "wrote … (errors=N …)" into the same log
if line.lstrip().lower().startswith("wrote ") and "errors=" in low:
return "meta"
@ -296,30 +314,32 @@ def classify(line: str) -> str:
if not is_numbered_check_line(line) and re.search(
r"[\[┌]\s*BLOCK(?:ER)?\s*[\]┐]", u
):
return "meta"
return "sum-block"
return "blocker"
# Only real check badges (not free-text "ERROR" inside commit messages,
# and not SUMMARY count rows like " [ ERROR ] 3")
if re.search(r"\s*ERROR\b|\[\s*ERROR\b", u):
if not is_numbered_check_line(line):
return "meta"
return "sum-err"
return "error"
if re.search(r"\bERROR monpages\b", line, re.I):
return "error"
if re.search(r"\s*WARN\b|\[\s*WARN\b", u):
if not is_numbered_check_line(line):
return "meta"
return "sum-warn"
return "warn"
if re.search(r"\s*INFO\b|\[\s*INFO\b", u):
if not is_numbered_check_line(line):
return "meta"
return "sum-info"
return "info"
if re.search(r"\s*OK\b|\[\s*OK\b", u) or (
(" OK" in u or u.strip().startswith("OK")) and is_numbered_check_line(line)
):
if re.search(r"\s*OK\b|\[\s*OK\b", u) and not is_numbered_check_line(line):
return "meta"
return "sum-ok"
return "ok"
if re.search(r"[\[┌]\s*BLOCK\b", u) and not is_numbered_check_line(line):
return "sum-block"
if u.strip().startswith("-- ") or u.strip().startswith("=="):
return "section"
return "plain"
@ -1866,6 +1886,57 @@ main {{ padding: 12px 14px 48px; max-width: 1200px; }}
.line.section {{ color: var(--sec); margin-top: 8px; font-weight: 600; }}
.line.meta {{ color: var(--dim); }}
.line.plain {{ color: var(--fg); }}
/* v1.14.0: SUMMARY box rows distinct bg + bold per severity */
.line.sum-header {{
color: #fff; font-weight: 800; letter-spacing: 0.04em;
background: linear-gradient(90deg, #1a3a1a 0%, #0a1a0a 100%);
border-left: 4px solid var(--ok); padding: 4px 8px; margin-top: 10px;
}}
.line.sum-ok {{
color: #b8f0b8; font-weight: 700;
background: #0d1f0d; border-left: 4px solid var(--ok);
padding: 3px 8px; margin: 2px 0;
}}
.line.sum-err {{
color: #ffc9c9; font-weight: 700;
background: #2a0a0a; border-left: 4px solid var(--err);
padding: 3px 8px; margin: 2px 0;
}}
.line.sum-warn {{
color: #1a1400; font-weight: 800;
background: #c9a227; border-left: 4px solid #8a7010;
padding: 3px 8px; margin: 2px 0;
}}
.line.sum-info {{
color: #c8e7ff; font-weight: 700;
background: #0a1520; border-left: 4px solid var(--info);
padding: 3px 8px; margin: 2px 0;
}}
.line.sum-block {{
color: #f5d0ff; font-weight: 700;
background: #1a0a1a; border-left: 4px solid var(--blocker);
padding: 3px 8px; margin: 2px 0;
}}
.line.sum-totals {{
color: #eee; font-weight: 700;
background: #1a1a1a; border-left: 4px solid #666;
padding: 4px 8px; margin: 4px 0 2px;
}}
.line.sum-verdict-ok {{
color: #b8f0b8; font-weight: 800;
background: #0d1f0d; border: 1px solid #2a5a2a;
padding: 4px 8px; margin: 4px 0 8px;
}}
.line.sum-verdict-warn {{
color: #1a1400; font-weight: 800;
background: #c9a227; border: 1px solid #8a7010;
padding: 4px 8px; margin: 4px 0 8px;
}}
.line.sum-verdict-err {{
color: #ffc9c9; font-weight: 800;
background: #2a0a0a; border: 1px solid #622;
padding: 4px 8px; margin: 4px 0 8px;
}}
a.jump {{ color: inherit; text-decoration: underline dotted; }}
footer {{
margin-top: 18px; color: var(--dim); font-size: 12px;