the tangled network observatory ◈ every knot, its health, its version, in your terminal
tangled cli tui knot monitoring observability atproto federation
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: add latency column to list

+9 -1
+9 -1
src/commands/list.ts
··· 39 39 return styleText("yellow", "pre-v1.15 ⚠"); // pre-v1.14 knots silently drop pushes/prs/issues 40 40 }; 41 41 42 + const latencyLabel = (k: (typeof shown)[number]) => { 43 + const ms = k.probe?.latencyMs; 44 + if (ms === undefined) return dim("—"); 45 + const color = ms < 500 ? "green" : ms < 2000 ? "yellow" : "red"; 46 + return styleText(color, `${ms}ms`); 47 + }; 48 + 42 49 const rows = shown.map((k) => [ 43 50 k.host, 44 51 String(k.repoCount), 45 52 versionLabel(k), 53 + latencyLabel(k), 46 54 k.local ? dim("—") : k.managed ? "managed" : "self-hosted", 47 55 k.owners[0] 48 56 ? `@${k.owners[0].handle}${k.owners.length > 1 ? dim(` +${k.owners.length - 1}`) : ""}` 49 57 : dim("—"), 50 58 ]); 51 59 52 - const header = ["HOST", "REPOS", "VERSION", "TYPE", "OWNER"]; 60 + const header = ["HOST", "REPOS", "VERSION", "MS", "TYPE", "OWNER"]; 53 61 // biome-ignore lint/suspicious/noControlCharactersInRegex: stripping our own ansi colors for width math 54 62 const visible = (s: string) => s.replace(/\x1b\[\d+m/g, "").length; 55 63 const widths = header.map((h, i) =>