kaizen-agent 1.63.0 → 1.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,152 @@
1
+ // The footer's resource monitor, left of the terminal button: memory, storage and every
2
+ // live terminal by workspace. Modelled on Orca's Resource Manager status segment.
3
+ import { $, html } from "./dom.ts";
4
+
5
+ const size = (n: number) => {
6
+ if (n < 1024 ** 2) return `${Math.round(n / 1024)} KB`;
7
+ if (n < 1024 ** 3) return `${Math.round(n / 1024 ** 2)} MB`;
8
+ return `${(n / 1024 ** 3).toFixed(1)} GB`;
9
+ };
10
+
11
+ let res: any = null, disk: any = null, confirm = "", failed = "", timer: any = null;
12
+
13
+ // Recent memory use, kept in this page only: it starts empty on each load.
14
+ const history: number[] = [];
15
+ let diskOpen = false;
16
+ try { diskOpen = localStorage.getItem("kz-res-disk") === "1"; } catch {}
17
+
18
+ // The largest rows, the rest folded into one, so the bar stays readable.
19
+ const top = (rows: any[]) => {
20
+ const head = rows.slice(0, 4).map((r) => [r.name, r.bytes] as [string, number]), left = rows.slice(4).reduce((n, r) => n + r.bytes, 0);
21
+ return left ? [...head, ["Other", left] as [string, number]] : head;
22
+ };
23
+
24
+ // A segmented bar with its legend beside the values, so identity is never colour alone.
25
+ const split = (parts: [string, number][], rows = true) => {
26
+ const sum = parts.reduce((n, p) => n + p[1], 0) || 1;
27
+ return html`<div class="rseg">${parts.map(([n, v], i) => html`<i class="s${i}" style="flex:${v} 0 2px" title="${n}: ${size(v)}"></i>`)}</div>
28
+ ${rows && parts.map(([n, v], i) => html`<div class="rsrow"><span><u class="s${i}"></u>${n}</span><em>${Math.round((v / sum) * 100)}%</em><b>${size(v)}</b></div>`)}`;
29
+ };
30
+
31
+ function spark() {
32
+ if (history.length < 2) return "";
33
+ const x = (i: number) => (i / (history.length - 1)) * 100, y = (v: number) => 36 - v * 0.34;
34
+ const line = history.map((v, i) => `${x(i).toFixed(1)},${y(v).toFixed(1)}`).join(" ");
35
+ return html`<svg class="rspark" viewBox="0 0 100 36" preserveAspectRatio="none" role="img" aria-label="Memory use over recent minutes"><polygon points="0,36 ${line} 100,36"></polygon><polyline points="${line}" vector-effect="non-scaling-stroke"></polyline></svg>`;
36
+ }
37
+
38
+ const pop = () => document.getElementById("respop");
39
+
40
+ function draw() {
41
+ const box = pop();
42
+ if (!box || !res) return;
43
+ const pct = Math.round((res.system.used / res.system.total) * 100);
44
+ const groups = new Map<string, any[]>();
45
+ for (const t of res.terminals) {
46
+ const g = `${t.project || "Other"} / ${t.ws.split(/[\\/]/).pop() || "main"}`;
47
+ (groups.get(g) ?? groups.set(g, []).get(g)!).push(t);
48
+ }
49
+ const row = (t: any) => html`<div class="rsrow"><span title="${t.title}">${t.title}</span><b>${t.rss == null ? "–" : size(t.rss)}</b>${
50
+ confirm === t.key
51
+ ? html`<button type="button" data-keep>Keep</button><button type="button" class="yes" data-kill="${t.key}">Kill</button>`
52
+ : html`${t.dir ? html`<button type="button" data-open="${t.key}">Open</button>` : ""}<button type="button" class="kill" data-ask="${t.key}" aria-label="Kill ${t.title}">Kill</button>`
53
+ }</div>`;
54
+ const other = Math.max(0, res.system.used - res.kaizen), free = Math.max(0, res.system.total - res.system.used);
55
+ const mem = html`
56
+ <h3>Memory</h3>
57
+ <div class="rhero"><b>${pct}%</b><span>${size(res.system.used)} of ${size(res.system.total)} used</span></div>
58
+ ${spark()}
59
+ ${split([["Kaizen and its terminals", res.kaizen], ["Other apps", other], ["Free", free]])}`;
60
+ const rest = html`
61
+ <h3><button type="button" class="rfold" data-fold aria-expanded="${diskOpen}"><span>${diskOpen ? "▾" : "▸"}</span> Storage</button><button type="button" data-rescan>${disk?.scanning ? "Scanning…" : "Rescan"}</button></h3>
62
+ ${disk?.at ? html`<div class="rhero"><b>${size(disk.total)}</b><span>used by kaizen</span></div>${split(top(disk.rows), diskOpen)}` : html`<div class="rnote">Scanning…</div>`}
63
+ <h3>Terminals (${res.terminals.length})</h3>
64
+ ${failed ? html`<div class="rnote" role="alert">${failed}</div>` : ""}
65
+ ${res.terminals.length ? [...groups].map(([g, ts]) => html`<div class="rgrp">${g}</div>${ts.map(row)}`) : html`<div class="rnote">No live terminals.</div>`}`;
66
+ // Memory changes on every poll; the rest stays put, or a row's button would lose focus.
67
+ for (const [id, m] of [["resm", mem], ["resr", rest]] as const) {
68
+ let el = document.getElementById(id);
69
+ if (!el) { el = document.createElement("div"); el.id = id; box.append(el); }
70
+ const text = String(m);
71
+ if (el.dataset.was !== text) { el.dataset.was = text; el.innerHTML = text; }
72
+ }
73
+ }
74
+
75
+ async function load() {
76
+ try {
77
+ res = await (await fetch("/resources")).json();
78
+ history.push((res.system.used / res.system.total) * 100);
79
+ if (history.length > 60) history.shift();
80
+ const b = $("res");
81
+ b.querySelector("span").textContent = size(res.kaizen);
82
+ b.title = `Kaizen uses ${size(res.kaizen)} of memory`;
83
+ draw();
84
+ } catch { /* board restarting */ }
85
+ }
86
+
87
+ async function loadDisk(refresh = false) {
88
+ try {
89
+ disk = await (await fetch("/resources/storage" + (refresh ? "?refresh=1" : ""))).json();
90
+ draw();
91
+ } catch { /* board restarting */ }
92
+ }
93
+
94
+ function close() {
95
+ pop()?.remove();
96
+ confirm = failed = "";
97
+ $("res").setAttribute("aria-expanded", "false");
98
+ clearInterval(timer);
99
+ timer = setInterval(load, 15_000);
100
+ }
101
+
102
+ function open() {
103
+ const box = document.createElement("div");
104
+ box.id = "respop";
105
+ box.setAttribute("role", "dialog");
106
+ box.setAttribute("aria-label", "Resources");
107
+ document.body.append(box);
108
+ $("res").setAttribute("aria-expanded", "true");
109
+ box.onclick = (e) => void click(e);
110
+ draw();
111
+ void load();
112
+ void loadDisk();
113
+ clearInterval(timer);
114
+ timer = setInterval(() => { void load(); if (disk?.scanning || !disk?.at) void loadDisk(); }, 3000);
115
+ }
116
+
117
+ async function click(e: MouseEvent) {
118
+ const b = (e.target as HTMLElement).closest("button");
119
+ if (!b) return;
120
+ const d = b.dataset;
121
+ if ("fold" in d) {
122
+ diskOpen = !diskOpen;
123
+ try { localStorage.setItem("kz-res-disk", diskOpen ? "1" : "0"); } catch {}
124
+ return draw();
125
+ }
126
+ if ("rescan" in d) return void loadDisk(true);
127
+ if ("keep" in d) { confirm = ""; return draw(); }
128
+ if (d.ask) { confirm = d.ask; failed = ""; return draw(); }
129
+ if (d.open) {
130
+ const t = res.terminals.find((x: any) => x.key === d.open);
131
+ if (!t) return;
132
+ close();
133
+ if (dispatchEvent(new CustomEvent("kz-open-term", { cancelable: true, detail: { dir: t.dir, ws: t.ws, key: t.key } }))) location.href = `/?view=ws&dir=${encodeURIComponent(t.dir)}&ws=${encodeURIComponent(t.ws)}`;
134
+ return;
135
+ }
136
+ if (d.kill) {
137
+ confirm = "";
138
+ const r = await fetch("/pty/kill", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ key: d.kill }) }).catch(() => null);
139
+ failed = r?.ok ? "" : "Could not kill that terminal.";
140
+ await load();
141
+ draw();
142
+ }
143
+ }
144
+
145
+ export function initResources() {
146
+ const b = $("res");
147
+ b.onclick = () => (pop() ? close() : open());
148
+ addEventListener("pointerdown", (e) => { if (pop() && !(e.target as Element).closest("#respop,#res")) close(); });
149
+ addEventListener("keydown", (e) => { if (e.key === "Escape" && pop()) close(); });
150
+ void load();
151
+ timer = setInterval(load, 15_000);
152
+ }
@@ -5,6 +5,7 @@
5
5
  import { onBoardCards } from "./badge.ts";
6
6
  import { store } from "./store.ts";
7
7
  import { $, html, modal, raw } from "./dom.ts";
8
+ import { initResources } from "./resources.ts";
8
9
  import { age, need } from "./labels.ts";
9
10
  import { openAdd } from "./add-project.ts";
10
11
  import { initSearch } from "./search.ts";
@@ -497,6 +498,7 @@ export function initFooter(goTerminal: () => void) {
497
498
  const fh = () => document.documentElement.style.setProperty("--foot-h", $("foot").offsetHeight + "px");
498
499
  new ResizeObserver(fh).observe($("foot"));
499
500
  fh();
501
+ initResources();
500
502
  void usage();
501
503
  void phone();
502
504
  setInterval(() => void usage(), 5 * 60_000);
@@ -203,3 +203,11 @@ test("nearestPane walks a split like tmux", () => {
203
203
  expect(nearestPane(b, "a", "r")).toBe("b");
204
204
  expect(nearestPane(b, "gone", "r")).toBeNull();
205
205
  });
206
+
207
+ test("a failed land outranks every other agent status", () => {
208
+ const a = { key: "k", dir: "d", name: "Claude", asking: true, busy: true };
209
+ expect(agentStatus({ ...a, land: "conflict" }, 0, new Map())).toBe("conflict");
210
+ expect(agentStatus({ ...a, land: "check" }, 0, new Map())).toBe("failed");
211
+ expect(lineOf({ a: { ...a, land: "conflict", last: "x" }, st: "conflict" })).toBe("Conflict - Claude");
212
+ expect(agentStatus(a, 0, new Map())).toBe("asking");
213
+ });
@@ -139,17 +139,18 @@ export const loopbackUrl = (pv?: string | null) => (pv ? /https?:\/\/(?:localhos
139
139
  export const toOpen = (cards: any[], was: Set<string>, seen: string[], keyOf: (c) => string) => cards.filter((c) => reviewing(c) && !was.has(keyOf(c)) && !seen.includes(keyOf(c)));
140
140
 
141
141
  // ---- the sidebar card's agents (/state `agents`, one entry per open agent terminal)
142
- export type Agent = { key: string; dir: string; ws?: string; agent?: string; name: string; run?: string; asking: boolean; busy: boolean; last?: string; at?: number; born?: number };
143
- export type Status = "asking" | "working" | "done";
142
+ export type Agent = { key: string; dir: string; ws?: string; agent?: string; name: string; run?: string; asking: boolean; busy: boolean; last?: string; at?: number; born?: number; land?: string };
143
+ export type Status = "conflict" | "failed" | "asking" | "working" | "done";
144
144
  // Output flickers: entering "working" is immediate, leaving it for "done" waits this long after the last busy tick.
145
145
  export const SETTLE_MS = 3000;
146
146
  const seenBusy = new Map<string, number>(); // pty key + start time -> when it was last seen busy
147
147
  const id = (a: Agent) => a.key + "@" + (a.born ?? 0); // a restarted pty under the same key is a new agent
148
- const ORDER: Record<Status, number> = { asking: 0, working: 1, done: 2 };
149
- const WORD: Record<Status, string> = { asking: "Asking", working: "Working", done: "Done" };
150
- const DOT: Record<Status, string> = { asking: "wait", working: "build", done: "done" }; // the .si icons
148
+ const ORDER: Record<Status, number> = { conflict: 0, failed: 0, asking: 0, working: 1, done: 2 };
149
+ export const WORD: Record<Status, string> = { conflict: "Conflict", failed: "Land failed", asking: "Asking", working: "Working", done: "Done" };
150
+ export const DOT: Record<Status, string> = { conflict: "fail", failed: "fail", asking: "wait", working: "build", done: "done" }; // the .si icons
151
151
  // asking comes first and is immediate both ways (the server already waits for the screen to settle).
152
152
  export function agentStatus(a: Agent, now: number, seen = seenBusy): Status {
153
+ if (a.land) return a.land === "conflict" ? "conflict" : "failed";
153
154
  if (a.asking) return "asking";
154
155
  if (a.busy) return (seen.set(id(a), now), "working");
155
156
  return now - (seen.get(id(a)) ?? -Infinity) < SETTLE_MS ? "working" : "done";
@@ -166,7 +167,7 @@ export const wsAgents = (as: Agent[], dir: string, ws: string, wsOf, now: number
166
167
  .map((a) => ({ a, st: agentStatus(a, now, seen) }))
167
168
  .sort((x, y) => ORDER[x.st] - ORDER[y.st]);
168
169
  // An expanded card's row text: the agent's latest output line, else the status and the agent.
169
- export const lineOf = ({ a, st }: ARow) => a.last || `${WORD[st]} - ${a.name}`;
170
+ export const lineOf = ({ a, st }: ARow) => (a.land ? "" : a.last) || `${WORD[st]} - ${a.name}`;
170
171
  const ago = (t: number | undefined, now: number) => (!t ? "" : now - t < 60e3 ? "now" : age(t, now));
171
172
  // Expanded cards, remembered per workspace (localStorage kz-wsopen): the map of dir\0ws to true.
172
173
  export const openKey = (dir: string, ws: string) => dir + "\0" + ws;
@@ -192,7 +193,7 @@ export function agentsHtml(rows: ARow[], now: number, open: boolean, dir: string
192
193
  const chev = html`<button type="button" class="wchev${open ? " on" : ""}" data-wopen ${at} aria-expanded="${String(open)}" aria-label="${String(rows.length)} agents: ${open ? "hide" : "show"} the list">${CHEV}</button>`;
193
194
  if (open)
194
195
  return html`<div class="wag"><span class="aht">${String(rows.length)} agents</span>${chev}</div><div class="alist">${rows.map((r) => html`<button type="button" class="arow" data-term="${r.a.key}" ${at} title="${lineOf(r)}">${dot(r.st)}${mark(r.a)}<span class="atx">${lineOf(r)}</span><small>${ago(r.a.at, now)}</small></button>`)}</div>`;
195
- const chips = (["asking", "working", "done"] as Status[]).map((st) => ({ st, rs: rows.filter((r) => r.st === st) })).filter((g) => g.rs.length);
196
+ const chips = (["conflict", "failed", "asking", "working", "done"] as Status[]).map((st) => ({ st, rs: rows.filter((r) => r.st === st) })).filter((g) => g.rs.length);
196
197
  return html`<div class="wag"><span class="chips">${chips.map((g) => html`<span class="chip">${dot(g.st)}${g.rs.map((r) => html`<button type="button" class="amark" data-term="${r.a.key}" ${at} title="${r.a.name} - ${WORD[g.st]}: open its terminal" aria-label="${r.a.name} - ${WORD[g.st]}: open its terminal">${mark(r.a)}</button>`)}</span>`)}</span>${chev}</div>`;
197
198
  }
198
199
 
package/web/board.html CHANGED
@@ -125,6 +125,7 @@ body .rail a.upd::after{left:calc(50% + 6px);top:4px}body .toast{left:16px;botto
125
125
  .si.review{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--warn) 35%,transparent);animation:si-spin 1.6s linear infinite}
126
126
  .si.review::after{content:"";position:absolute;width:4px;height:4px;border-radius:50%;background:var(--warn);top:-1px;left:4px;box-shadow:0 0 4px var(--warn)}
127
127
  .si.wait{background:var(--warn)}.si.wait::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--warn);animation:si-ping 1.6s cubic-bezier(0,0,.2,1) infinite}
128
+ .si.fail{background:var(--danger)}.si.fail::after{content:"!";position:absolute;inset:0;color:#fff;font:700 9px/12px system-ui;text-align:center}.mk.bad{color:var(--danger);font-weight:600}
128
129
  .si.done{background:var(--ok)}.si.done::after{content:"";position:absolute;left:4.2px;top:2px;width:2.5px;height:5.5px;border:solid var(--bg);border-width:0 1.6px 1.6px 0;transform:rotate(45deg)}
129
130
  .si.stalled{background:var(--danger)}.si.stalled::after{content:"";position:absolute;left:3.5px;top:3.5px;width:5px;height:5px;background:linear-gradient(90deg,var(--bg) 0 1.6px,transparent 0 3.4px,var(--bg) 0)}
130
131
  .si.aband{box-shadow:inset 0 0 0 1.5px var(--dim);opacity:.5}
@@ -495,8 +496,18 @@ aside.wide{width:100%;border-left:0}@media(min-width:901px){aside.wide{width:62%
495
496
  .uchip:hover .utip,.uchip:focus .utip{display:flex}.urow{display:grid;grid-template-columns:1fr auto;gap:3px 10px;align-items:center}.urow>span{color:var(--dim)}.urow>i{grid-column:1/-1;height:4px;border-radius:2px;background:var(--line);overflow:hidden}.urow>i>i{display:block;height:100%;background:var(--ok)}.urow>i>i.mid{background:var(--warn)}.urow>i>i.hi{background:var(--danger)}.urow small{grid-column:1/-1;color:var(--dim);font-size:11px}.foot .uchip.na{opacity:.75}
496
497
  .foot .umtr{width:54px;height:5px;border-radius:3px;background:var(--line);overflow:hidden}.foot .umtr i{display:block;height:100%;background:var(--ok)}.foot .umtr i.mid{background:var(--warn)}.foot .umtr i.hi{background:var(--danger)}
497
498
  .foot .fb{display:flex;align-items:center;gap:6px;padding:3px 7px;border-radius:4px;color:var(--dim);text-decoration:none}.foot .fb:hover{background:var(--hover);color:var(--ink)}.foot .fb[hidden],.foot .uchip[hidden]{display:none}
499
+ .foot button.fb{border:0;background:none;font:inherit;cursor:pointer}.foot .fb[aria-expanded=true]{background:var(--hover);color:var(--ink)}
500
+ #respop{position:fixed;right:12px;bottom:calc(var(--foot-h,32px) + 6px);z-index:30;width:260px;max-width:calc(100vw - 24px);max-height:min(70vh,440px);overflow:auto;padding:2px 8px 8px;border:1px solid var(--line);border-radius:var(--r-s);background:var(--bg-2);box-shadow:var(--shadow-2);color:var(--ink);font-size:var(--fs-xs);white-space:normal}
501
+ #respop h3{display:flex;align-items:center;justify-content:space-between;margin:6px 0 2px;min-height:18px;font-size:var(--fs-xs);font-weight:600;color:var(--dim)}#respop h3 button{border:0;background:none;color:var(--dim);font:inherit;cursor:pointer}#respop h3 button:hover{color:var(--ink)}#respop h3 .rfold{padding:0;font-weight:600}
502
+ #respop .rsrow{display:flex;align-items:center;gap:6px;min-height:18px}#respop .rsrow>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#respop .rsrow>b{font-weight:500;font-variant-numeric:tabular-nums}#respop .rsrow.tot{border-top:1px solid var(--line);margin-top:2px}
503
+ #respop .rhero{display:flex;align-items:baseline;gap:6px;margin-bottom:2px}#respop .rhero b{font-size:15px;line-height:1.2;font-weight:600;color:var(--ink-hi);font-variant-numeric:tabular-nums}#respop .rhero span{color:var(--dim)}
504
+ #respop .rspark{display:block;width:100%;height:32px;margin-bottom:4px;border-bottom:1px solid var(--line)}#respop .rspark polygon{stroke:none;fill:color-mix(in srgb,var(--run) 16%,transparent)}#respop .rspark polyline{fill:none;stroke:var(--run);stroke-width:2}
505
+ #respop .rseg{display:flex;gap:2px;height:6px;margin-bottom:3px}#respop .rseg i{min-width:2px;border-radius:2px}#respop .s0{background:var(--accent)}#respop .s1{background:color-mix(in srgb,var(--ink) 62%,var(--bg-2))}#respop .s2{background:color-mix(in srgb,var(--ink) 38%,var(--bg-2))}#respop .s3{background:color-mix(in srgb,var(--ink) 22%,var(--bg-2))}#respop .s4{background:var(--line)}
506
+ #respop .rsrow u{display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:2px}#respop .rsrow em{font-style:normal;color:var(--dim);font-variant-numeric:tabular-nums}
507
+ #respop .rgrp{margin-top:3px;color:var(--dim);font-size:var(--fs-xs)}#respop .rsrow button{border:0;border-radius:4px;padding:0 4px;background:none;color:var(--dim);font:inherit;cursor:pointer}#respop .rsrow button:hover{background:var(--hover);color:var(--ink)}#respop .rsrow button.kill:hover,#respop .rsrow button.yes{color:var(--danger)}#respop .rnote{color:var(--dim)}
498
508
  .foot .dot{width:7px;height:7px;border-radius:50%;background:var(--ok);box-shadow:0 0 6px var(--ok)}.foot .dot.off{background:var(--dim);box-shadow:none}
499
509
  @media(max-width:640px){.foot{order:1;gap:10px;padding:4px 10px;border-top:1px solid var(--line)}.foot .umtr,.foot .wk,.foot .ptxt{display:none}}
510
+ @media(max-width:640px){.foot #res{display:none}}
500
511
 
501
512
  /* the Ideas page: source chips and project, then Open/Running/Done, search and the table */
502
513
  #ideasv{display:none}
@@ -1052,6 +1063,7 @@ html body.wsb:not(.paged) #board{grid-template-columns:repeat(4,minmax(200px,1fr
1052
1063
  <symbol id="i-video" viewBox="0 0 24 24"><rect x="3" y="6" width="13" height="12" rx="2"/><path d="M16 10.5l5-3v9l-5-3z"/></symbol>
1053
1064
  <symbol id="i-trash" viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 11v6M14 11v6"/></symbol>
1054
1065
  <symbol id="i-ask" viewBox="0 0 24 24"><path d="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"/><path d="M9.8 9.5a2.3 2.3 0 0 1 4.4.8c0 1.5-2.2 2-2.2 3.2M12 16.5h.01"/></symbol>
1066
+ <symbol id="i-mem" viewBox="0 0 24 24"><path d="M3 7h18v9H3zM7 16v3M12 16v3M17 16v3M7 10v3M12 10v3M17 10v3"/></symbol>
1055
1067
  <symbol id="i-term" viewBox="0 0 24 24"><path d="M4 17l6-5-6-5M12 19h8"/></symbol>
1056
1068
  <symbol id="i-max" viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></symbol>
1057
1069
  <symbol id="i-min" viewBox="0 0 24 24"><path d="M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"/></symbol>
@@ -1199,7 +1211,7 @@ html body.wsb:not(.paged) #board{grid-template-columns:repeat(4,minmax(200px,1fr
1199
1211
  <div class="foot" id="pfoot"></div>
1200
1212
  </aside>
1201
1213
  </div>
1202
- <footer class="foot" id="foot" aria-label="Usage and status"><span id="usage"></span><button class="fb" id="usage-r" title="Refresh usage" aria-label="Refresh usage"><svg><use href="#i-refresh"/></svg></button><span class="sp"></span><a class="fb" id="tcount" href="/?view=terminal" title="All terminals" hidden><svg><use href="#i-term"/></svg><span></span></a><span class="uchip" id="phone" hidden></span></footer>
1214
+ <footer class="foot" id="foot" aria-label="Usage and status"><span id="usage"></span><button class="fb" id="usage-r" title="Refresh usage" aria-label="Refresh usage"><svg><use href="#i-refresh"/></svg></button><span class="sp"></span><button type="button" class="fb" id="res" title="Resources" aria-haspopup="dialog" aria-expanded="false"><svg><use href="#i-mem"/></svg><span></span></button><a class="fb" id="tcount" href="/?view=terminal" title="All terminals" hidden><svg><use href="#i-term"/></svg><span></span></a><span class="uchip" id="phone" hidden></span></footer>
1203
1215
  <section id="context" aria-label="Project context"><header><strong id="context-title">Project</strong><button class="ib" id="ctx-close" aria-label="Close side panel" title="Close"><svg><use href="#i-close"/></svg></button></header><nav aria-label="Side content"><button data-context="files">Files</button><button data-context="notes">Notes</button><button data-context="terminal">Terminal</button></nav><div id="context-body"></div></section>
1204
1216
  <div class="toast" id="toast" role="status"></div>
1205
1217
  <div class="help" id="help"><div>