mavweb: unify UI — shared ui.css + nav partial across all pages

One theme (the PWA's dark palette) for dash/history/trace/notifications/
tools/passkey via static/ui.css; shared nav template with active-page
highlight; tables wrapped in .scroll so they pan on phones; PWA nav no
longer clips the RU/EN toggle; dash 'updated' timestamp fixed (selector
matched nothing). AGENTS.md documents the local preview/screenshot recipe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASstMtsZWLSRcD1Tq8T68Q
This commit is contained in:
kami
2026-07-05 18:36:31 +04:00
parent a158ffd1d2
commit d7c0cf89d3
9 changed files with 215 additions and 158 deletions
+12 -22
View File
@@ -1,21 +1,11 @@
<!doctype html><meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>maven · rule trace</title>
<style>
body{font:14px monospace;background:#111;color:#ddd;margin:1rem}
h2{color:#8cf;margin:1.2rem 0 .3rem}
table{border-collapse:collapse;width:100%}
td,th{border-bottom:1px solid #333;padding:.2rem .5rem;text-align:left;vertical-align:top}
.green{color:#6c6}.red{color:#f66}.gray{color:#888}
.updated{color:#666;font-size:.85rem}
nav a{color:#8cf;margin-right:1rem;font-size:.85rem}
details{font-size:.85rem;color:#aaa;margin-top:.2rem}
summary{cursor:pointer}
.gl{color:#888}
</style>
<nav><a href=/dash>dash</a> <a href=/history>history</a></nav>
<h2>rule trace</h2>
<link rel=stylesheet href=/ui.css>
{{template "nav" "trace"}}
<h1>rule trace</h1>
<div class=updated>{{.Now | ago}} — winner: <strong>{{if .Winner}}{{.Winner}}{{else}}nothing fired{{end}}</strong></div>
<table>
<div class=scroll><table class=mono>
<tr><th>rule<th>sev<th>predicate<th>gate<th>blocked by<th>detail<th>selected<th>lost to</tr>
{{range .Rules}}<tr>
<td>{{.RuleName}}</td>
@@ -24,14 +14,14 @@
<td class={{if .GateResult}}green{{else if .GateBlockedBy}}red{{else}}gray{{end}}>{{.GateResult}}</td>
<td>{{.GateBlockedBy}}</td>
<td><details><summary>gate</summary>
<span class=gl>snooze_until:</span> {{.GateDetail.SnoozeUntil | fmtTime}}<br>
<span class=gl>cooldown_until:</span> {{.GateDetail.CooldownUntil | fmtTime}}<br>
<span class=gl>quiet_hours:</span> {{.GateDetail.QuietHours}}<br>
<span class=gl>calendar_busy:</span> {{.GateDetail.CalendarBusy}}<br>
<span class=gl>presence:</span> {{.GateDetail.Presence}}<br>
<span class=gl>inert_keys_missing:</span> {{if .GateDetail.InertKeysMissing}}{{join .GateDetail.InertKeysMissing ", "}}{{else}}—{{end}}
<span class=muted>snooze_until:</span> {{.GateDetail.SnoozeUntil | fmtTime}}<br>
<span class=muted>cooldown_until:</span> {{.GateDetail.CooldownUntil | fmtTime}}<br>
<span class=muted>quiet_hours:</span> {{.GateDetail.QuietHours}}<br>
<span class=muted>calendar_busy:</span> {{.GateDetail.CalendarBusy}}<br>
<span class=muted>presence:</span> {{.GateDetail.Presence}}<br>
<span class=muted>inert_keys_missing:</span> {{if .GateDetail.InertKeysMissing}}{{join .GateDetail.InertKeysMissing ", "}}{{else}}—{{end}}
</details></td>
<td class={{if .WasSelected}}green{{end}}>{{.WasSelected}}</td>
<td>{{.LostTo}}</td>
</tr>{{end}}
</table>
</table></div>