Repository navigation
Expand file tree
/
Copy pathadmin.html
More file actions
255 lines (233 loc) · 20.4 KB
/
Copy pathadmin.html
File metadata and controls
255 lines (233 loc) · 20.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<title>RuvNet Brain — admin</title>
<!-- Owner dashboard, gated by ADMIN_TOKEN (Vercel env).
REBUILT 2026-07-22 after the owner's verdict on v1: "a lot of dead data ... a lot of things
that are static that aren't moving don't tell me a whole lot ... I'm getting lots of positive
feedback and I don't see any of that showing up." Both halves of that were true:
• v1 led with four counters that move ~once a month (stars/forks/watchers/openIssues) and a
20-release asset table. Nothing on the page answered "what changed since I last looked?"
• The humans WERE in the payload — sparkling, lafinak, mamd69, Agentist-Elder had filed 30+
detailed issues — but they sat below three screens of static tiles, undated and unranked.
So this page inverts the hierarchy: every panel leads with a DELTA against a locally-stored
baseline, or with a dated human event. Static lifetime totals are gone unless they anchor a
delta. What we genuinely cannot see is listed, by name, in "Not instrumented yet" — never
guessed at, never rendered as a zero. -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Hanken+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="design-system.css" />
<link rel="stylesheet" href="theme.css" />
<style>
/* admin-only chrome, on top of the explainer design tokens (amber mind · cyan signal · green grounded) */
.adm-wrap { max-width: 1120px; margin: 0 auto; padding: 44px 22px 90px; }
.adm-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.adm-head h1 { font-family: var(--display); font-weight: 600; font-size: 1.7rem; color: var(--ink); margin: 0; }
.adm-head .stamp { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.adm-back { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--accent-2); text-decoration: none; }
.adm-back:hover { color: var(--ink); }
.adm-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; max-width: none; }
.adm-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.adm-controls button { cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--ridge); border-radius: 8px; font-family: var(--mono); font-size: 12.5px; padding: 6px 14px; }
.adm-controls button:hover { border-color: var(--accent); }
.adm-controls button[data-undo-review] { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.adm-controls label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.adm-gate { max-width: 440px; background: var(--surface); border: 1px solid var(--ridge); border-radius: 12px; padding: 26px 28px; }
.adm-gate p { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.adm-gate input { width: 100%; background: var(--bg-2); border: 1px solid var(--ridge); border-radius: 10px; color: var(--ink); font-family: var(--mono); font-size: 14px; padding: 10px 12px; margin-bottom: 12px; }
.adm-gate button { cursor: pointer; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px; font-weight: 700; font-size: 14px; padding: 10px 18px; }
.adm-err { color: var(--bad); font-size: 13.5px; margin-top: 10px; min-height: 1.2em; }
.adm-sec { margin-top: 38px; }
.adm-sec h2 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 0 0 4px; }
.adm-sec h2 .qual { font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 400; letter-spacing: 0.03em; }
.adm-sec .note { font-size: 13px; color: var(--faint); margin: 10px 0 0; max-width: none; }
.adm-sec .lead-note { font-size: 13px; color: var(--muted); margin: 0 0 12px; max-width: none; }
/* ── the lead: what changed since the last visit ───────────────────────────────────────────── */
.since-box { background: var(--surface); border: 1px solid var(--ridge); border-radius: 14px; padding: 22px 24px; }
.since-box .headline { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); margin: 0 0 6px; line-height: 1.34; max-width: none; }
.since-box .headline b { color: var(--accent); }
.since-box .headline .flat { color: var(--muted); }
.since-when { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin: 0 0 18px; }
.since-foot { font-size: 12.5px; color: var(--faint); margin: 14px 0 0; max-width: 78ch; line-height: 1.55; }
.dstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dcell { border: 1px solid var(--ridge); border-radius: 10px; padding: 13px 15px; background: var(--bg-2); min-width: 0; }
.dcell b { display: block; font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.1; color: var(--muted); }
.dcell.up b { color: var(--accent-3); }
.dcell.down b { color: var(--bad); }
.dcell.unknown b { color: var(--faint); font-size: 22px; }
.dcell span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--muted); line-height: 1.4; }
.dcell em { display: block; margin-top: 4px; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
/* ── action queue ──────────────────────────────────────────────────────────────────────────── */
.todo { border: 1px solid var(--ridge); border-radius: 12px; background: var(--surface); overflow: hidden; margin-top: 12px; }
.todo-row { display: flex; gap: 14px; align-items: baseline; padding: 13px 16px; border-bottom: 1px solid var(--ridge); }
.todo-row:last-child { border-bottom: none; }
.todo-row .age { font-family: var(--mono); font-size: 11.5px; color: var(--bad); white-space: nowrap; min-width: 74px; }
.todo-row .age.fresh { color: var(--accent); }
.todo-row .body { min-width: 0; flex: 1; }
.todo-row .body a { color: var(--accent-2); text-decoration: none; font-size: 14px; }
.todo-row .body a:hover { text-decoration: underline; }
.todo-row .body .by { display: block; margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.inbox-zero { border: 1px solid color-mix(in srgb, var(--accent-3) 40%, var(--ridge)); border-radius: 12px; background: var(--surface); padding: 18px 20px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.inbox-zero b { color: var(--accent-3); }
/* ── people: dated, ranked by recency ──────────────────────────────────────────────────────── */
.ppl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pcard { border: 1px solid var(--ridge); border-radius: 12px; padding: 15px 17px; background: var(--surface); }
.pcard.active { border-color: color-mix(in srgb, var(--accent-3) 55%, var(--ridge)); }
.pcard .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard .who a { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--accent-2); text-decoration: none; }
.pcard .span { margin: 9px 0 0; font-family: var(--mono); font-size: 11px; color: var(--faint); line-height: 1.5; }
.badge { font-family: var(--mono); font-size: 10.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ridge); color: var(--muted); white-space: nowrap; }
.badge.live { background: color-mix(in srgb, var(--accent-3) 15%, transparent); border-color: var(--accent-3); color: var(--accent-3); }
.badge.new { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); color: var(--accent); }
.badge.open { border-color: var(--accent); color: var(--accent); }
/* ── timeline ──────────────────────────────────────────────────────────────────────────────── */
.tl { border: 1px solid var(--ridge); border-radius: 12px; background: var(--surface); overflow: hidden; margin-top: 12px; }
.tl-row { display: flex; gap: 13px; align-items: baseline; padding: 11px 16px; border-bottom: 1px solid var(--ridge); font-size: 13.5px; }
.tl-row:last-child { border-bottom: none; }
.tl-row.is-new { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.tl-row .when { font-family: var(--mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; min-width: 82px; }
.tl-row .kind { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; min-width: 34px; }
.tl-row .what { min-width: 0; flex: 1; color: var(--ink-2); line-height: 1.45; }
.tl-row .what a { color: var(--accent-2); text-decoration: none; }
.tl-row .what a:hover { text-decoration: underline; }
.tl-row .what .who { font-family: var(--mono); font-size: 11px; color: var(--faint); }
/* ── reach: the headline "how many people" tiles ───────────────────────────────────────────── */
.reach { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.rcell { border: 1px solid var(--ridge); border-radius: 12px; padding: 16px 18px; background: var(--surface); min-width: 0; }
.rcell.hero { border-color: color-mix(in srgb, var(--accent-3) 55%, var(--ridge)); }
.rcell b { display: block; font-family: var(--display); font-weight: 600; font-size: 32px; line-height: 1.05; color: var(--ink); }
.rcell.hero b { color: var(--accent-3); }
.rcell.unknown b { color: var(--faint); font-size: 22px; }
.rcell .lbl { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--ink-2); line-height: 1.4; }
.rcell .win { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
/* the "and what it cannot count" line — never omitted, it is what keeps the tile honest */
.rcell .caveat { display: block; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--ridge); font-size: 11.5px; color: var(--muted); line-height: 1.5; }
/* ── momentum (7d vs prior 7d) ─────────────────────────────────────────────────────────────── */
.mom { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.mcell { border: 1px solid var(--ridge); border-radius: 12px; padding: 15px 17px; background: var(--surface); min-width: 0; }
.mcell .top { display: flex; align-items: baseline; gap: 8px; }
.mcell .top b { font-family: var(--display); font-weight: 600; font-size: 25px; color: var(--ink); line-height: 1.1; }
.mcell .arrow { font-family: var(--mono); font-size: 12px; }
.mcell .arrow.up { color: var(--accent-3); }
.mcell .arrow.down { color: var(--bad); }
.mcell .arrow.flat { color: var(--faint); }
.mcell span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--muted); line-height: 1.4; }
.mcell svg { display: block; width: 100%; height: 30px; margin-top: 9px; }
.mcell.unknown b { color: var(--faint); font-size: 20px; }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--ridge); border-radius: 12px; background: var(--surface); margin-top: 12px; }
table.adm { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.adm th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 12px 14px; border-bottom: 1px solid var(--ridge); }
table.adm td { padding: 10px 14px; border-bottom: 1px solid var(--ridge); color: var(--ink-2); vertical-align: top; }
table.adm tr:last-child td { border-bottom: none; }
table.adm td.num { font-family: var(--mono); }
table.adm a { color: var(--accent-2); }
/* ── the honesty section: what this page cannot see ────────────────────────────────────────── */
.gaps { border: 1px dashed var(--ridge); border-radius: 12px; background: var(--bg-2); padding: 6px 20px; margin-top: 12px; }
.gaps li { list-style: none; padding: 13px 0; border-bottom: 1px solid var(--ridge); font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.gaps li:last-child { border-bottom: none; }
.gaps li b { color: var(--ink); font-weight: 500; }
.gaps li .fix { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.gaps li .tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; padding: 2px 7px; border-radius: 4px; margin-right: 8px; border: 1px solid var(--ridge); color: var(--muted); }
/* three states, three colours: amber = you can fix it now · cyan = unbuilt work · green = kept
on purpose. An unbuilt feature must never wear the same badge as a deliberate choice. */
.gaps li .tag.config { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.gaps li .tag.code { border-color: color-mix(in srgb, var(--accent-2) 50%, transparent); color: var(--accent-2); }
.gaps li .tag.design { border-color: color-mix(in srgb, var(--accent-3) 50%, transparent); color: var(--accent-3); }
.qline { font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--ridge); border-radius: 12px; padding: 16px 20px; margin-top: 12px; max-width: none; }
.qline a { color: var(--accent-2); }
.more-btn { cursor: pointer; background: none; border: 0; color: var(--accent-2); font-family: var(--mono); font-size: 12px; padding: 11px 16px; }
.more-btn:hover { color: var(--ink); }
@media (max-width: 880px) {
.dstrip, .mom, .reach { grid-template-columns: 1fr 1fr; }
.ppl { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<main class="adm-wrap">
<div class="adm-head">
<h1>RuvNet Brain — admin</h1>
<span class="stamp" data-stamp></span>
<a class="adm-back" href="./">← back to the explainer</a>
</div>
<p class="adm-sub">What moved since you last looked, who moved it, and what work remains. Every number here is read live from GitHub, npm, or the opt-in counters — nothing on this page is stored, assumed, or estimated.</p>
<div class="adm-gate" data-gate>
<p>Owner dashboard. Enter the admin token (set as <code>ADMIN_TOKEN</code> in Vercel env).</p>
<input type="password" placeholder="admin token" data-token-input autocomplete="off" />
<button data-token-go>Open dashboard</button>
<p class="adm-err" data-err></p>
</div>
<div data-dash hidden>
<div class="adm-controls">
<button data-refresh>Refresh now</button>
<label><input type="checkbox" data-auto /> auto-refresh every 60s</label>
<button data-mark-review>Mark all reviewed</button>
<button data-undo-review hidden>Undo mark reviewed</button>
<button data-logout style="margin-left:auto">Forget token</button>
</div>
<!-- 1. REACH — the owner's actual question: "how many people use this?" Four counters, each
labelled with WHAT IT COUNTS and WHAT IT CANNOT. npm downloads are deliberately NOT here:
they are dominated by mirrors and the nightly auto-update, so they answer "how much
traffic" and never "how many people". They survive one row down, in Momentum, as shape. -->
<div class="adm-sec" style="margin-top:0">
<h2>How many people <span class="qual" data-reach-qual></span></h2>
<p class="lead-note">The closest honest answer to “how many people use this”. Each tile says what it counts <em>and</em> what it cannot count — three of these four are machine-side counters, so the number that means <em>humans</em> is the first one.</p>
<div class="reach" data-reach></div>
<p class="note" data-reach-note></p>
</div>
<!-- 2. MOMENTUM — moved above the fold at the owner's request. 7d vs prior 7d, computed inside
each source's own daily series. Only sources WITH a daily series can appear here. -->
<div class="adm-sec">
<h2>Momentum <span class="qual">last 7 days vs the 7 before — direction, not totals</span></h2>
<p class="lead-note">Computed inside each source's own daily series, so both halves cover an equal window. These are machine counters: CI checkouts, npm mirrors, and the plugin's own auto-update all land here. Read them for <em>shape</em>, and read the humans below for truth.</p>
<div class="mom" data-momentum></div>
<p class="note" data-momentum-note></p>
</div>
<!-- 3. THE LEAD — deltas against a locally stored baseline. -->
<div class="adm-sec">
<h2>Since you last looked</h2>
<div class="since-box" data-since></div>
</div>
<!-- 2. THE QUEUE — current open engineering threads, oldest first. -->
<div class="adm-sec">
<h2>Open engineering work</h2>
<p class="lead-note">Current open issues and PRs, oldest first. Engineering work stays with the agents. Owner action is required only when a specific decision or access request is recorded in the thread. This queue does not classify those requests.</p>
<div data-todo></div>
</div>
<!-- 3. THE HUMANS — dated, ranked by recency, bots stripped. -->
<div class="adm-sec">
<h2>The humans <span class="qual" data-people-qual></span></h2>
<p class="lead-note">Everyone outside you who filed an issue, opened a PR, or forked. Ranked by how recently they showed up, not alphabetically — the person who wrote to you yesterday matters more than the one who starred in week one.</p>
<div data-people></div>
</div>
<!-- 4. THE FEED — every dated human event, newest first, NEW badged against the baseline. -->
<div class="adm-sec">
<h2>Every human event <span class="qual" data-feed-qual></span></h2>
<p class="lead-note">The one place the actual conversation lives. Titles link straight into the thread — the sentiment you are hearing about is in those comments, and this page deliberately does not paraphrase it (see “Not instrumented yet”).</p>
<div data-feed></div>
</div>
<!-- 6. REFERRERS — already a moving 14-day window; kept as-is. -->
<div class="adm-sec">
<h2>Where they arrived from <span class="qual">rolling 14 days</span></h2>
<div class="tbl-scroll"><table class="adm" data-referrers></table></div>
<p class="note" data-referrers-note></p>
</div>
<!-- 7. THE HONESTY SECTION — named gaps, never guessed numbers. -->
<div class="adm-sec">
<h2>Not instrumented yet</h2>
<p class="lead-note">Things this page genuinely cannot see. They are listed rather than estimated: a dashboard that fills a gap with a plausible number is worse than one that admits the gap.</p>
<ul class="gaps" data-gaps></ul>
</div>
<div class="adm-sec">
<h2>Doors</h2>
<p class="qline">Feedback → <a href="https://github.com/stuinfla/ruvnet-brain/discussions" target="_blank" rel="noopener">GitHub Discussions</a> · bugs → <a href="https://github.com/stuinfla/ruvnet-brain/issues" target="_blank" rel="noopener">Issues</a>. The explainer footer and the installer point users at the same two doors.</p>
</div>
</div>
</main>
<script src="admin.js" defer></script>
</body>
</html>