~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/socialweb-computer-watch

The socialweb.computer market's live topology from Jetstreams and relays, deduplicated; capture and replay

0
0
main
150 lines · 9.7 KB Raw History
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>socialweb.computer watch</title>
<link rel="icon" href="data:,">
<style>
:root {
	--bg: #f7f7f5; --panel: #ffffff; --ink: #1d1d1b; --muted: #6b6b66; --line: #d9d8d2; --accent: #3b5bdb;
	--requester: #3b5bdb; --guest: #9c36b5; --bidder: #2b8a3e; --runner: #e8590c; --principal: #1971c2; --agent: #ae3ec9;
	--bidding: #adb5bd; --accepted: #fab005; --held: #4dabf7; --running: #40c057; --released: #868e96;
	--success: #40c057; --failure: #fa5252; --error: #fa5252; --stale: #ced4da;
}
@media (prefers-color-scheme: dark) {
	:root { --bg: #151514; --panel: #1f1f1d; --ink: #ecebe6; --muted: #9a9993; --line: #3a3a36; --accent: #748ffc; --stale: #495057; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; display: grid; grid-template: auto 1fr / 300px 1fr 320px; }
header { grid-column: 1 / -1; display: flex; gap: 16px; align-items: baseline; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
header h1 { font-size: 15px; margin: 0; }
header #totals { color: var(--muted); font-variant-numeric: tabular-nums; }
aside { background: var(--panel); overflow: auto; padding: 10px 12px; border-right: 1px solid var(--line); }
aside.right { border-right: 0; border-left: 1px solid var(--line); }
h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
h2:first-child { margin-top: 0; }
h3 { margin: 0 0 4px; font-size: 14px; word-break: break-all; }
textarea, input[type=text], input[type=number], select { width: 100%; font: 12px ui-monospace, Menlo, monospace; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 5px; }
textarea { height: 104px; resize: vertical; white-space: pre; }
button { font: inherit; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.row label { white-space: nowrap; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 12px; }
th, td { text-align: right; padding: 2px 3px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--muted); }
.dot[data-state=live] { background: var(--success); }
.dot[data-state=retrying], .dot[data-state=error], .dot[data-state="bad url"] { background: var(--failure); }
.dot[data-state=connecting] { background: var(--accepted); }
.dot[data-state=replay] { background: var(--accent); }
.muted { color: var(--muted); }
main { position: relative; overflow: hidden; }
#graph { width: 100%; height: 100%; display: block; }
#empty { position: absolute; inset: 40% 0 auto; text-align: center; color: var(--muted); }
#fit { position: absolute; right: 10px; top: 10px; }
.link line { stroke: var(--line); stroke-width: 1.5; }
.link.dashed line { stroke-dasharray: 4 3; }
.link[data-kind=agent-of] line { stroke: var(--agent); }
.link[data-kind="runs requester"] line { stroke: var(--guest); stroke-width: 2.5; }
.link[data-kind="held by"] line { stroke: var(--bidder); }
.link[data-kind^="rents"] line { stroke: var(--requester); }
.link text { font-size: 9px; fill: var(--muted); text-anchor: middle; pointer-events: none; }
.arrowhead { fill: var(--muted); }
.node { cursor: pointer; }
.node circle, .node rect, .node path { stroke: var(--panel); stroke-width: 2; }
.node.selected circle, .node.selected rect, .node.selected path { stroke: var(--ink); stroke-width: 3; }
.node[data-memory=pressure] path { stroke: var(--accepted); stroke-width: 4; }
.node[data-memory=kill] path { stroke: var(--failure); stroke-width: 4; }
.node text { text-anchor: middle; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; font-size: 11px; }
.node text.sub { fill: var(--muted); font-size: 9.5px; }
.node[data-role=requester] circle { fill: var(--requester); }
.node[data-role=guest] circle { fill: var(--guest); }
.node[data-role=runner] circle { fill: var(--runner); }
.node[data-role=principal] circle { fill: var(--principal); }
.node[data-role=agent] circle { fill: var(--agent); }
.node[data-role=bidder][data-status=fresh] circle { fill: var(--bidder); }
.node[data-role=bidder][data-status=stale] circle { fill: var(--stale); }
.node[data-type=contract] rect { fill: var(--bidding); }
.node[data-status=accepted] rect { fill: var(--accepted); }
.node[data-status=held] rect { fill: var(--held); }
.node[data-status=running] rect { fill: var(--running); }
.node[data-status=released] rect { fill: var(--released); opacity: .55; }
.node[data-type=check] path { fill: var(--accepted); }
.node[data-type=roster] path { fill: var(--principal); }
.node[data-type=infra] path { fill: var(--accent); }
.node[data-type=infra][data-status=released] path { fill: var(--released); opacity: .55; }
.node[data-type=roster][data-status=released] path { fill: var(--released); opacity: .55; }
.group rect { fill: var(--accent); fill-opacity: .06; stroke: var(--accent); stroke-opacity: .5; stroke-dasharray: 6 4; }
.group text { font-size: 11px; fill: var(--accent); }
.link[data-kind="mesh peer"] line { stroke: var(--principal); stroke-dasharray: 2 3; }
.node[data-type=check][data-status=success] path { fill: var(--success); }
.node[data-type=check][data-status=failure] path, .node[data-type=check][data-status=error] path { fill: var(--failure); }
#log { list-style: none; margin: 0; padding: 0; font-size: 11.5px; }
#log li { padding: 2px 0; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#log time { color: var(--muted); font-variant-numeric: tabular-nums; }
#detail pre { font-size: 11px; white-space: pre-wrap; word-break: break-all; background: var(--bg); padding: 6px; border-radius: 4px; max-height: 260px; overflow: auto; }
#detail code { font-size: 11px; word-break: break-all; }
#detail summary { cursor: pointer; word-break: break-all; font-size: 12px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 11.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.legend i.sq { border-radius: 2px; }
#scrub { width: 100%; }
@media (max-width: 900px) {
	body { grid-template: auto auto 70vh auto / 1fr; }
	aside { border: 0; border-bottom: 1px solid var(--line); }
}
</style>
<script src="./node_modules/d3/dist/d3.min.js"></script>
<script type="module" src="./main.js"></script>
</head>
<body>
<header><h1>socialweb.computer watch</h1><span id="totals"></span></header>
<aside>
	<h2>Sources</h2>
	<textarea id="sources" spellcheck="false" aria-label="Sources, one URL per line; # turns one off"></textarea>
	<div class="row"><label for="rewind">Jetstream rewind (min)</label><input id="rewind" type="number" min="0" step="5"><button id="apply">Apply</button></div>
	<table><thead><tr><th>source</th><th>ops</th><th>first</th><th>dups</th><th title="older than the rewind window: a relay re-emitting history">old</th><th>last</th></tr></thead><tbody id="stats"></tbody></table>
	<h2>Filter</h2>
	<input id="filter" type="text" placeholder="DID, handle, repo, commit, workflow" spellcheck="false">
	<h2>Replay</h2>
	<input id="file" type="file" accept=".ndjson,.jsonl,.json,application/x-ndjson">
	<div id="replaying" hidden>
		<p class="muted" id="replay-info"></p>
		<div class="row"><button id="play">Play</button><select id="speed" aria-label="Speed"><option value="1">1×</option><option value="10">10×</option><option value="60" selected>60×</option><option value="600">600×</option><option value="max">max</option></select><button id="live">Go live</button></div>
		<input id="scrub" type="range" min="0" value="0" aria-label="Scrub">
		<p class="muted" id="clock"></p>
	</div>
	<h2>Capture</h2>
	<button id="save" disabled>Save capture</button>
	<h2>Legend</h2>
	<div class="legend">
		<span><i style="background:var(--runner)"></i>CI runner</span><span><i style="background:var(--requester)"></i>requester</span>
		<span><i style="background:var(--guest)"></i>guest requester</span><span><i style="background:var(--principal)"></i>principal</span>
		<span><i style="background:var(--bidder)"></i>bidder (fresh)</span><span><i style="background:var(--stale)"></i>bidder (stale)</span>
		<span><i class="sq" style="background:var(--bidding)"></i>VM: bidding</span><span><i class="sq" style="background:var(--accepted)"></i>accepted</span>
		<span><i class="sq" style="background:var(--held)"></i>held</span><span><i class="sq" style="background:var(--running)"></i>running</span>
		<span><i class="sq" style="background:var(--released)"></i>released</span><span>◆ CI check</span>
		<span>⬡ mesh roster</span><span>▭ staging network</span>
		<span>■ (ephemeral) infra</span>
	</div>
	<p class="muted">A dashed box is the prod VMs carrying one staging network. The staging network's own PLC, PDSes, relay and bidders are not on prod: add its relay or Jetstream as a source to see them.</p>
	<div>
	</div>
</aside>
<main>
	<svg id="graph" role="img" aria-label="Market topology"></svg>
	<p id="empty">Waiting for market records…</p>
	<button id="fit">Fit</button>
</main>
<aside class="right">
	<h2>Selected</h2>
	<div id="detail"></div>
	<h2>Latest ops (first delivery)</h2>
	<ul id="log"></ul>
</aside>
</body>
</html>