kaizen-agent 1.69.1 → 1.71.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.
Files changed (62) hide show
  1. package/README.md +2 -2
  2. package/cli/annotate-proxy.ts +135 -0
  3. package/cli/annotate.ts +86 -0
  4. package/cli/automations.ts +10 -3
  5. package/cli/browser.ts +1 -1
  6. package/cli/chat.ts +9 -1
  7. package/cli/chatgpt.ts +2 -1
  8. package/cli/docs.ts +1 -1
  9. package/cli/google.ts +2 -1
  10. package/cli/handoff.ts +1 -1
  11. package/cli/install.ts +28 -8
  12. package/cli/knowledge.ts +1 -1
  13. package/cli/notes.ts +10 -1
  14. package/cli/pty.ts +21 -0
  15. package/cli/settings.ts +5 -1
  16. package/cli/sources.ts +3 -2
  17. package/cli/state.ts +43 -5
  18. package/cli/versions.ts +1 -1
  19. package/cli/video.ts +1 -1
  20. package/cli/web.ts +137 -35
  21. package/cli/workers.ts +20 -7
  22. package/cli/worktree.ts +55 -15
  23. package/package.json +1 -1
  24. package/skills/kaizen/SKILL.md +12 -8
  25. package/skills/kaizen/config.default.yml +18 -2
  26. package/skills/kaizen/settings.md +3 -1
  27. package/skills/kaizen/spec-build.md +13 -2
  28. package/skills/kaizen/spec-main.md +2 -0
  29. package/skills/kaizen-help/SKILL.md +1 -0
  30. package/skills/media/kaizen-game/SKILL.md +96 -0
  31. package/skills/media/kaizen-game/assets/gdd.css +12 -0
  32. package/skills/media/kaizen-game/references/build.md +81 -0
  33. package/skills/media/kaizen-game/references/content.md +32 -0
  34. package/skills/media/kaizen-game/references/design.md +81 -0
  35. package/skills/media/kaizen-game/references/ship.md +34 -0
  36. package/skills/media/kaizen-game/references/verify.md +33 -0
  37. package/skills/media/kaizen-game/scripts/check.sh +13 -0
  38. package/skills/media/kaizen-game/scripts/frames.mjs +34 -0
  39. package/skills/media/kaizen-game/scripts/gdd-pdf.mjs +19 -0
  40. package/skills/media/kaizen-game/scripts/pw.mjs +18 -0
  41. package/skills/media/kaizen-game/scripts/serve.mjs +53 -0
  42. package/skills/media/kaizen-game/scripts/serve.test.mjs +18 -0
  43. package/skills/media/kaizen-game/scripts/setup.sh +9 -0
  44. package/skills/media/kaizen-game/scripts/smoke.mjs +40 -0
  45. package/skills/media/kaizen-game/skill.json +1 -0
  46. package/web/annotate.js +382 -0
  47. package/web/board/annotate-lib.ts +15 -0
  48. package/web/board/annotate.ts +181 -0
  49. package/web/board/badge.ts +12 -0
  50. package/web/board/icebox.ts +6 -3
  51. package/web/board/markdown.ts +7 -2
  52. package/web/board/run-view.ts +83 -9
  53. package/web/board/settings-orchestration.ts +1 -1
  54. package/web/board/settings-pages.ts +1 -0
  55. package/web/board/settings-skills.ts +1 -0
  56. package/web/board/settings.ts +2 -2
  57. package/web/board.html +5 -3
  58. package/web/board.js +119 -119
  59. package/web/notebook.js +23 -23
  60. package/web/term.js +48 -48
  61. package/web/term.ts +16 -4
  62. package/web/video.js +25 -25
@@ -8,6 +8,9 @@ import { taskCombo, newDir, plogo, setShown, short, showable } from "./projects.
8
8
  import { playSound, soundPick, toast } from "./toast.ts";
9
9
  import { go, view } from "./views.ts";
10
10
 
11
+ // A link from sources.json or a gathered post: the server checks it on the way in, this keeps a javascript: URL from ever being a clickable href.
12
+ const web = (u: string) => (/^https?:\/\//i.test(String(u)) ? u : "#");
13
+
11
14
  // ---- the icebox: requests gathered from request sources, read like an inbox, until
12
15
  // someone promotes them to tasks or dismisses them. The sources themselves sit in a
13
16
  // section below, folded. Same panel as settings.
@@ -229,7 +232,7 @@ export async function openSources() {
229
232
  : html`<span class="src-badge warn"><svg viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" stroke="currentColor" fill="none" stroke-width="1.8"/><path d="M8 5v3.5M8 11v.1" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round"/></svg>Failed: ${s.last.note}</span><span class="hint" style="margin:0">${ago(s.last.at)}</span>`;
230
233
  const kind = st === "sheet" ? "sheet" : st === "doc" ? "doc" : st === "social" ? "at" : "link",
231
234
  bare = s.url.replace(/^https?:\/\/(www\.)?/, "");
232
- return html`<div class="src-card" id="src-card-${i}"><div class="src-hd"><span class="src-ico" title="${st === "social" ? (PLAT[s.social] || "social") : st}">${fav(s.url, kind, s.social)}</span><div class="src-info"><span class="src-title" title="${title}">${title}</span><a class="src-url" href="${s.url}" target="_blank" rel="noopener noreferrer" title="${s.url}"><span>${bare}</span>${ico("ext")}</a></div><div class="src-acts">${s.social ? html`<button class="ib sm" id="src-ag-${i}" data-ag="${i}" aria-label="Gather ${title} with your agent" title="${chatOn ? "Gather with your ChatGPT plan" : "Gather: opens your agent on /kaizen gather"}">${ico("refresh")}</button>` : html`<button class="ib sm" id="src-chk-${i}" data-chk="${i}" aria-label="Check ${title} now" title="Check now">${ico("refresh")}</button>`}<button class="ib sm danger" id="src-rm-${i}" data-rm="${i}" aria-label="Remove ${title}" title="Remove source">${ico("trash")}</button></div></div><div class="src-status">${statusHtml}</div><div class="src-fields"><label class="src-f" title="Category"><span>Category</span><input class="sel" id="src-ct-${i}" data-ct="${i}" data-k="${s.dir + " " + s.url}" value="${s.category || ""}" placeholder="${platOf(s)}" maxlength="40" aria-label="Category of ${title}"><button class="btn sm pri" id="src-cs-${i}" aria-label="Save the category of ${title}" disabled>Save</button></label><label class="src-f" title="Project"><span>Project</span>${plogo(s.dir, s.project || "")}<select class="sel" id="src-mv-${i}" data-mv="${i}" data-k="${s.dir + " " + s.url}" aria-label="Project of ${title}">${opts(s.dir, s.project)}</select><button class="btn sm pri" id="src-mb-${i}" aria-label="Move ${title} to the chosen project" disabled>Move</button></label></div><div class="src-sws">${st === "sheet" || /github\.com/.test(s.url) ? html`<label class="src-sw">Write back<button class="chk sm${s.writeback ? " on" : ""}" id="src-wb-${i}" data-wb="${i}" role="switch" aria-checked="${String(!!s.writeback)}" aria-label="Write back to ${title}"></button></label>` : ""}<label class="src-sw" title="Off: the scheduled gather skips this source; Check now still reads it">Auto gather<button class="chk sm${s.paused ? "" : " on"}" id="src-ag-on-${i}" data-ag-on="${i}" role="switch" aria-checked="${String(!s.paused)}" aria-label="Auto gather ${title}"></button></label></div></div>`;
235
+ return html`<div class="src-card" id="src-card-${i}"><div class="src-hd"><span class="src-ico" title="${st === "social" ? (PLAT[s.social] || "social") : st}">${fav(s.url, kind, s.social)}</span><div class="src-info"><span class="src-title" title="${title}">${title}</span><a class="src-url" href="${web(s.url)}" target="_blank" rel="noopener noreferrer" title="${s.url}"><span>${bare}</span>${ico("ext")}</a></div><div class="src-acts">${s.social ? html`<button class="ib sm" id="src-ag-${i}" data-ag="${i}" aria-label="Gather ${title} with your agent" title="${chatOn ? "Gather with your ChatGPT plan" : "Gather: opens your agent on /kaizen gather"}">${ico("refresh")}</button>` : html`<button class="ib sm" id="src-chk-${i}" data-chk="${i}" aria-label="Check ${title} now" title="Check now">${ico("refresh")}</button>`}<button class="ib sm danger" id="src-rm-${i}" data-rm="${i}" aria-label="Remove ${title}" title="Remove source">${ico("trash")}</button></div></div><div class="src-status">${statusHtml}</div><div class="src-fields"><label class="src-f" title="Category"><span>Category</span><input class="sel" id="src-ct-${i}" data-ct="${i}" data-k="${s.dir + " " + s.url}" value="${s.category || ""}" placeholder="${platOf(s)}" maxlength="40" aria-label="Category of ${title}"><button class="btn sm pri" id="src-cs-${i}" aria-label="Save the category of ${title}" disabled>Save</button></label><label class="src-f" title="Project"><span>Project</span>${plogo(s.dir, s.project || "")}<select class="sel" id="src-mv-${i}" data-mv="${i}" data-k="${s.dir + " " + s.url}" aria-label="Project of ${title}">${opts(s.dir, s.project)}</select><button class="btn sm pri" id="src-mb-${i}" aria-label="Move ${title} to the chosen project" disabled>Move</button></label></div><div class="src-sws">${st === "sheet" || /github\.com/.test(s.url) ? html`<label class="src-sw">Write back<button class="chk sm${s.writeback ? " on" : ""}" id="src-wb-${i}" data-wb="${i}" role="switch" aria-checked="${String(!!s.writeback)}" aria-label="Write back to ${title}"></button></label>` : ""}<label class="src-sw" title="Off: the scheduled gather skips this source; Check now still reads it">Auto gather<button class="chk sm${s.paused ? "" : " on"}" id="src-ag-on-${i}" data-ag-on="${i}" role="switch" aria-checked="${String(!s.paused)}" aria-label="Auto gather ${title}"></button></label></div></div>`;
233
236
  });
234
237
  const fails = ((d && d.failed) || []).map((f) => html`<p style="color:var(--dim)">The sources of ${f} could not be read.</p>`);
235
238
  const emptyState = html`<div class="src-empty"><div class="src-empty-ico">${ico("link")}</div><h4>No sources yet</h4></div>`;
@@ -371,7 +374,7 @@ export async function openSources() {
371
374
  open = iceForm === k;
372
375
  const head = html`<div class="ice-row${iceCur === k ? " cur" : ""}${iceSel.has(k) ? " sel" : ""}" data-i="${i}" data-k="${k}"><input type="checkbox" id="ice-ck-${i}" data-ck="${i}"${iceSel.has(k) ? " checked" : ""} aria-label="Select: ${it.text}"><span class="ice-src" title="${srcName(it)}">${fav(it.source, "link", list.find((x) => x.dir === it.dir && x.url === it.source)?.social)}</span><button class="ice-t" id="ice-o-${i}" data-o="${i}" aria-expanded="${String(open)}" title="${it.text}">${it.text}</button><span class="ice-meta">${many ? html`<span class="nm" title="${it.project || ""}">${plogo(it.dir, it.project || "")}${short(it.project || "")}</span>` : ""}${it.status === "done" && it.written ? html`<span title="Written back ${ago(it.written)}">written back</span>` : ""}${it.status === "done" && it.writeError ? html`<span title="${it.writeError}">write-back failed</span>` : ""}${it.status === "promoted" ? html`<span title="Promoted to Tasks: ${it.idea || ""}">promoted</span>` : ""}${it.replied ? html`<span title="Replied ${ago(it.replied)}">replied</span>` : ""}<span class="ice-age">${ago(it.at)}</span><span class="ice-ra">${it.status === "promoted" || it.status === "done" ? "" : html`<button class="btn ghost sm" id="ice-pr-${i}" data-pr="${i}" title="Promote to Tasks (p)" aria-label="Promote to Tasks: ${it.text}">${ico("plus")}</button>`}${it.status === "promoted" || it.status === "done" ? "" : it.status === "dismissed" ? html`<button class="btn ghost sm" id="ice-rs-${i}" data-rs="${i}" title="Restore to waiting" aria-label="Restore: ${it.text}">Restore</button>` : html`<button class="btn ghost sm" id="ice-ds-${i}" data-ds="${i}" title="Dismiss (d)" aria-label="Dismiss: ${it.text}">${ico("x")}</button>`}</span></span></div>`;
373
376
  const more = open
374
- ? html`<div class="ice-open">${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}<span class="hint" style="margin:0">From ${srcName(it)} · ${ago(it.at)}${it.post ? html` · <a href="${it.post}" target="_blank" rel="noopener">open post</a>` : ""}</span>${replyBox(it)}${icePro === k ? form(it) : ""}</div>`
377
+ ? html`<div class="ice-open">${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}<span class="hint" style="margin:0">From ${srcName(it)} · ${ago(it.at)}${it.post ? html` · <a href="${web(it.post)}" target="_blank" rel="noopener">open post</a>` : ""}</span>${replyBox(it)}${icePro === k ? form(it) : ""}</div>`
375
378
  : "";
376
379
  return html`${head}${more}`;
377
380
  };
@@ -390,7 +393,7 @@ export async function openSources() {
390
393
  const pName = (it) => it.project || store.S.projects.find((p) => p.dir === it.dir)?.label || "";
391
394
  const swCard = (i, back) => {
392
395
  const it = ice[i];
393
- return html`<div class="sw-card${back ? " back" : ""}"${back ? raw(' aria-hidden="true"') : raw(' id="sw-card" tabindex="-1" aria-label="Request: swipe or press → to promote, ← to dismiss"')}><div class="sw-hd">${fav(it.source, "link", srcOf(it)?.social)}<span class="sw-src" title="${srcName(it)}">${srcName(it)}</span><span class="sw-proj" title="${pName(it)}">${plogo(it.dir, pName(it))}${short(pName(it))}</span><span class="ice-age">${ago(it.at)}</span></div><p class="sw-t">${it.text}</p>${back ? "" : html`${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}${it.post ? html`<a class="hint" href="${it.post}" target="_blank" rel="noopener">open post</a>` : ""}<span class="sw-stamp pro">Promote</span><span class="sw-stamp dis">Dismiss</span>`}</div>`;
396
+ return html`<div class="sw-card${back ? " back" : ""}"${back ? raw(' aria-hidden="true"') : raw(' id="sw-card" tabindex="-1" aria-label="Request: swipe or press → to promote, ← to dismiss"')}><div class="sw-hd">${fav(it.source, "link", srcOf(it)?.social)}<span class="sw-src" title="${srcName(it)}">${srcName(it)}</span><span class="sw-proj" title="${pName(it)}">${plogo(it.dir, pName(it))}${short(pName(it))}</span><span class="ice-age">${ago(it.at)}</span></div><p class="sw-t">${it.text}</p>${back ? "" : html`${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}${it.post ? html`<a class="hint" href="${web(it.post)}" target="_blank" rel="noopener">open post</a>` : ""}<span class="sw-stamp pro">Promote</span><span class="sw-stamp dis">Dismiss</span>`}</div>`;
394
397
  };
395
398
  // Icebox zero: the day's streak counts days in a row the stack was emptied, per project
396
399
  // filter, in this browser only.
@@ -1,4 +1,5 @@
1
1
  import { esc } from "./dom.ts";
2
+ import { safeUrl } from "../notes-lib.ts";
2
3
 
3
4
  // The builder's "## Preview" section of 03-impl.md: how to run the app, or the result itself,
4
5
  // and its "### How to test" steps.
@@ -101,8 +102,12 @@ export function md(src, tick) {
101
102
  .replace(/`([^`]+)`/g, "<code>$1</code>")
102
103
  .replace(/\*\*([^*]+)\*\*/g, "<b>$1</b>")
103
104
  .replace(/(^|[^*])\*([^*\s<][^*<]*?)\*(?!\*)/g, "$1<i>$2</i>")
104
- .replace(/!\[([^\]]*)\]\(([^)\s]+)\)/g, '<a href="$2" target="_blank"><img src="$2" alt="$1"></a>')
105
- .replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, '<a href="$2" target="_blank">$1</a>');
105
+ .replace(/!\[([^\]]*)\]\(([^)\s]+)\)/g, (m, a, u) =>
106
+ safeUrl(u) ? `<a href="${u}" target="_blank" rel="noopener noreferrer"><img src="${u}" alt="${a}"></a>` : m,
107
+ )
108
+ .replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (m, t, u) =>
109
+ safeUrl(u) ? `<a href="${u}" target="_blank" rel="noopener noreferrer">${t}</a>` : m,
110
+ );
106
111
  const endList = () => {
107
112
  if (list) {
108
113
  out.push(`</${list}>`);
@@ -24,6 +24,7 @@ import { drawPick, hidePick, initPick, setOpen } from "./run-pick.ts";
24
24
  import { age } from "./labels.ts";
25
25
  import { go } from "./views.ts";
26
26
  import { isPhone } from "./phone.ts";
27
+ import { annotator } from "./annotate.ts";
27
28
 
28
29
  type Tab = { id: string; kind: "agent" | "shell" | "local" | "preview" | "note" | "wait" | "history"; title: string; key?: string; note?: string; agent?: string };
29
30
  // Per workspace: the extra items opened (localhost, preview, notes, History),
@@ -36,7 +37,7 @@ function splitAt(n: Node, at: string, add: string, dir: "cols" | "rows", before
36
37
  return { ...n, kids: n.kids.map((k) => splitAt(k, at, add, dir, before)) };
37
38
  }
38
39
  // seen: the runs that already opened the Browser on their Preview, so a run does it once.
39
- type Saved = { tabs: Tab[]; hidden: string[]; screens: Screen[]; on: string | null; seen?: string[] };
40
+ type Saved = { tabs: Tab[]; hidden: string[]; hb?: Record<string, number>; screens: Screen[]; on: string | null; seen?: string[] };
40
41
  const ALL: Record<string, Saved> = (() => {
41
42
  try {
42
43
  return JSON.parse(localStorage.getItem("kz-runtabs") || "{}");
@@ -122,6 +123,12 @@ function tabs(): Tab[] {
122
123
  out.push({ id: "sh:" + sh.key, kind: sh.agent ? "agent" : "shell", agent: sh.agent || undefined, title: sh.title, key: sh.key });
123
124
  // Opened by hand: History, localhost, Preview, notes.
124
125
  const mine = s.tabs.map((t) => (t.kind === "local" ? { ...t, title: "Browser" } : t)); // "local" was saved before the rename
126
+ // A closed agent tab stays hidden only for that agent: one started again under the same key (a resume) is a new
127
+ // agent (born differs) and the sidebar lists it, so its tab comes back.
128
+ for (const a of store.S.agents ?? []) {
129
+ const id = "agent:" + a.key;
130
+ if (s.hb && id in s.hb && s.hb[id] !== (a.born ?? 0)) (s.hidden = s.hidden.filter((h) => h !== id)), delete s.hb[id], save();
131
+ }
125
132
  const all = [...out.filter((t) => !s.hidden.includes(t.id)), ...mine];
126
133
  return all.filter((t, i) => all.findIndex((x) => x.id === t.id) === i);
127
134
  }
@@ -218,7 +225,10 @@ function showTerm() {
218
225
  // and the ask lapses after a while so a launch that never came up cannot pull focus later.
219
226
  const w = store.wantPty && Date.now() - store.wantPty.at < 20_000 ? store.wantPty.key : null;
220
227
  if (store.wantPty && !w) store.wantPty = null;
221
- const t = tabs().find((x) => x.key === (wantTerm || w));
228
+ // Asked for by name (the sidebar's mark, a launch): shown even if its tab was closed before.
229
+ const want = wantTerm || w, s = saved();
230
+ if (want) s.hidden = s.hidden.filter((h) => h !== "agent:" + want && h !== "sh:" + want);
231
+ const t = tabs().find((x) => x.key === want);
222
232
  wantTerm = null;
223
233
  if (t && store.wantPty?.key === t.key) store.wantPty = null;
224
234
  return !!t && (show(t.id), true);
@@ -444,7 +454,7 @@ function browser(el: HTMLElement) {
444
454
  fwd: string[] = [];
445
455
  el.insertAdjacentHTML(
446
456
  "beforeend",
447
- String(html`<form class="urlbar"><button type="button" data-b="back" title="Back" aria-label="Back">‹</button><button type="button" data-b="fwd" title="Forward" aria-label="Forward">›</button><button type="button" data-b="reload" title="Reload" aria-label="Reload">${ico("refresh")}</button><input class="sel" aria-label="Address" spellcheck="false" value="${url}"><a class="rwin" data-b="tab" target="_blank" rel="noopener" href="${url}" title="Open in a new browser tab">${ico("popout")}<span>New tab</span></a></form>`),
457
+ String(html`<form class="urlbar"><button type="button" data-b="back" title="Back" aria-label="Back">‹</button><button type="button" data-b="fwd" title="Forward" aria-label="Forward">›</button><button type="button" data-b="reload" title="Reload" aria-label="Reload">${ico("refresh")}</button><input class="sel" aria-label="Address" spellcheck="false" value="${url}"><button type="button" class="rwin" data-b="ann" title="Pick elements on this page and send notes to the agent (localhost pages)">${ico("eye")}<span>Annotate</span></button><a class="rwin" data-b="tab" target="_blank" rel="noopener" href="${url}" title="Open in a new browser tab">${ico("popout")}<span>New tab</span></a></form>`),
448
458
  );
449
459
  const f = el.querySelector("form")!,
450
460
  inp = f.querySelector("input")!,
@@ -460,7 +470,27 @@ function browser(el: HTMLElement) {
460
470
  const note = document.createElement("p");
461
471
  note.className = "rnote";
462
472
  const far = "This page is on the computer running kaizen; from this device localhost is the device itself. Use Open in browser on that computer.";
463
- el.append(frame, note);
473
+ // The annotator (annotate.ts): its toolbar sits above this row, its notes list beside the frame.
474
+ const row = document.createElement("div");
475
+ row.className = "annrow";
476
+ row.append(frame);
477
+ el.append(row, note);
478
+ const annBtn = f.querySelector<HTMLButtonElement>("[data-b=ann]")!;
479
+ annBtn.hidden = !loopback; // from a phone, localhost is the phone itself
480
+ const ann = annotator({
481
+ host: el, frame, wsKey: ctx!.k, button: annBtn,
482
+ run: () => (card?.id ? { dir: card.state, id: card.id } : null),
483
+ reload: () => go(url, false),
484
+ // The framed page navigated on its own: show its address, do not load it again.
485
+ onLocation: (u) => {
486
+ if (u === url) return;
487
+ back.push(url), (fwd.length = 0);
488
+ url = u;
489
+ inp.value = u;
490
+ if (ext) ext.href = u;
491
+ try { localStorage.setItem(k, u); } catch {}
492
+ },
493
+ });
464
494
  const go = (u, push = true) => {
465
495
  if (push && url !== u) back.push(url), (fwd.length = 0);
466
496
  url = u;
@@ -474,7 +504,17 @@ function browser(el: HTMLElement) {
474
504
  note.hidden = !hide;
475
505
  note.textContent = far;
476
506
  if (hide) return void expose(u);
477
- frame.src = u;
507
+ // Annotate on: a loopback page is framed through the board's proxy (annotate-proxy.ts), which adds the picker.
508
+ const seq = ++nav;
509
+ void ann.open(u).then((via) => {
510
+ if (seq !== nav) return;
511
+ frame.src = via ?? u;
512
+ if (via) return;
513
+ frameCheck(u);
514
+ });
515
+ };
516
+ let nav = 0;
517
+ const frameCheck = (u: string) => {
478
518
  // Most public sites refuse to be framed (X-Frame-Options / frame-ancestors), and the
479
519
  // browser only shows its own error page. The board asks the site first and says so.
480
520
  void fetch("/frameable?url=" + encodeURIComponent(u))
@@ -515,6 +555,7 @@ function browser(el: HTMLElement) {
515
555
  el.onclick = (e) => {
516
556
  const b = (e.target as Element).closest<HTMLElement>("[data-b]")?.dataset.b;
517
557
  if (b === "win") void openWindow(url);
558
+ else if (b === "ann") ann.toggle();
518
559
  else if (b === "reload") go(url, false);
519
560
  else if (b === "back" && back.length) fwd.push(url), go(back.pop()!, false);
520
561
  else if (b === "fwd" && fwd.length) back.push(url), go(fwd.pop()!, false);
@@ -557,7 +598,7 @@ async function previewPane(el: HTMLElement) {
557
598
  if (!pv && (await directPreview(el))) return;
558
599
  const url = loopbackUrl(pv);
559
600
  const shots = pv && /!\[[^\]]*\]\(/.test(pv);
560
- if (url && loopback && !shots) return void el.insertAdjacentHTML("beforeend", String(html`<iframe class="rframe" title="Preview" src="${url}"></iframe>`));
601
+ if (url && loopback && !shots) return void el.insertAdjacentHTML("beforeend", String(html`<iframe class="rframe" title="Preview" src="${/^https?:\/\//i.test(String(url)) ? url : "about:blank"}"></iframe>`));
561
602
  const bar = url ? html`<div class="urlbar"><span class="sel">${url}</span>${winBtn(url)}</div>` : "";
562
603
  el.insertAdjacentHTML("beforeend", String(html`${bar}<div class="rprev md">${pv ? raw(md(attach(pv, card))) : html`<p class="rnone">This run has no Preview yet.</p>`}</div>`));
563
604
  el.querySelector<HTMLElement>(".urlbar [data-b=win]")?.addEventListener("click", () => void openWindow(url!));
@@ -587,6 +628,9 @@ function addTab(t: Tab) {
587
628
  else if (target) for (const sc of s.screens) sc.tree = prune(sc.tree, (id) => id !== t.id) ?? sc.tree;
588
629
  show(t.id);
589
630
  }
631
+ // Automatic opens (a run's Preview, `kaizen preview`) bring a tab forward only when it is not open yet;
632
+ // an open one just navigates, so the user can leave it.
633
+ const autoTab = (t: Tab) => { if (!saved().tabs.some((x) => x.id === t.id)) addTab(t); };
590
634
  // After an item is added: run screens() (which places it) and show the screen holding it.
591
635
  function show(id: string) {
592
636
  const s = saved();
@@ -711,6 +755,7 @@ async function closeTab(id: string) {
711
755
  a = store.S.agents?.find((x) => x.key === k);
712
756
  if (a?.busy && !confirm("This agent is still working. End it?")) return;
713
757
  s.hidden.push(id);
758
+ (s.hb ||= {})[id] = a?.born ?? 0;
714
759
  await post("/pty/exit", { key: k });
715
760
  load(true);
716
761
  }
@@ -949,7 +994,7 @@ async function autoBrowse() {
949
994
  try {
950
995
  localStorage.setItem("kz-browse:" + k, u);
951
996
  } catch {}
952
- addTab({ id: "local", kind: "local", title: "Browser" });
997
+ autoTab({ id: "local", kind: "local", title: "Browser" });
953
998
  (panes.get("local")?.el as any)?.browseTo?.(u);
954
999
  }
955
1000
  }
@@ -978,14 +1023,14 @@ async function pollPreview() {
978
1023
  if (first && Date.now() - p.at! > 120_000) return;
979
1024
  if (p.image) {
980
1025
  // A screenshot belongs in Preview; a live page in the Browser.
981
- addTab({ id: "preview", kind: "preview", title: "Preview" });
1026
+ autoTab({ id: "preview", kind: "preview", title: "Preview" });
982
1027
  (panes.get("preview")?.el as any)?.refresh?.();
983
1028
  return;
984
1029
  }
985
1030
  try {
986
1031
  localStorage.setItem("kz-browse:" + k, p.url!);
987
1032
  } catch {}
988
- addTab({ id: "local", kind: "local", title: "Browser" });
1033
+ autoTab({ id: "local", kind: "local", title: "Browser" });
989
1034
  (panes.get("local")?.el as any)?.browseTo?.(p.url!);
990
1035
  }
991
1036
  setInterval(() => void pollPreview(), 3000);
@@ -1204,3 +1249,32 @@ export function openWorkspace(c) {
1204
1249
  markCurrent();
1205
1250
  go("run");
1206
1251
  }
1252
+
1253
+ // The run view's right panel: drag its left edge to resize it; the width is kept for next
1254
+ // time and a double-click puts it back to the default.
1255
+ const GRIP_KEY = "kz-rpanel-w", GRIP_MIN = 260;
1256
+ function initGrip() {
1257
+ const grip = document.getElementById("rgrip"), panel = document.getElementById("panel"), root = document.documentElement;
1258
+ if (!grip || !panel) return;
1259
+ const set = (w: number) => root.style.setProperty("--rpanel-w", `${Math.round(Math.min(Math.max(GRIP_MIN, innerWidth * 0.6), Math.max(GRIP_MIN, w)))}px`);
1260
+ try { const w = Number(localStorage.getItem(GRIP_KEY)); if (w) set(w); } catch { /* private window: default width */ }
1261
+ grip.onpointerdown = (e) => {
1262
+ e.preventDefault();
1263
+ grip.setPointerCapture(e.pointerId);
1264
+ document.body.classList.add("rdrag");
1265
+ const move = (m: PointerEvent) => set(panel.getBoundingClientRect().right - m.clientX);
1266
+ const up = () => {
1267
+ grip.removeEventListener("pointermove", move);
1268
+ document.body.classList.remove("rdrag");
1269
+ try { localStorage.setItem(GRIP_KEY, String(Math.round(panel.getBoundingClientRect().width))); } catch { /* not kept */ }
1270
+ };
1271
+ grip.addEventListener("pointermove", move);
1272
+ grip.addEventListener("pointerup", up, { once: true });
1273
+ grip.addEventListener("pointercancel", up, { once: true });
1274
+ };
1275
+ grip.ondblclick = () => {
1276
+ root.style.removeProperty("--rpanel-w");
1277
+ try { localStorage.removeItem(GRIP_KEY); } catch { /* nothing kept */ }
1278
+ };
1279
+ }
1280
+ if (typeof document !== "undefined") initGrip();
@@ -7,7 +7,7 @@ const SUGGEST: Record<string, string[]> = { claude: ["haiku", "sonnet", "opus"]
7
7
 
8
8
  // The worker model row's label (the tool's icon and name) and its input with that tool's suggestions.
9
9
  export const modelLabel = (r: { key: string; label: string }) =>
10
- html`<img class="ag-i" src="${AGENT_FAVICONS[r.key.split(".").pop()!] ?? ""}" alt="" width="16" height="16" style="width:16px;height:16px;vertical-align:-3px;margin-right:6px;border-radius:3px">${r.label.replace("Worker model: ", "")}`;
10
+ html`<img class="ag-i" src="${AGENT_FAVICONS[r.key.split(".").pop()!] ?? ""}" alt="" width="16" height="16" style="width:16px;height:16px;vertical-align:-3px;margin-right:6px;border-radius:3px">${r.label.replace(/^(Worker|Handoff) model: /, "")}`;
11
11
  export const modelInput = (r: { key: string; value: string }, id: string) => {
12
12
  const tool = r.key.split(".").pop()!;
13
13
  return html`<span><input class="sel" id="${id}" value="${r.value}" placeholder="inherit" list="${id}-dl" spellcheck="false" autocomplete="off">${SUGGEST[tool] ? html`<datalist id="${id}-dl">${SUGGEST[tool]!.map((m) => html`<option value="${m}"></option>`)}</datalist>` : ""}</span>`;
@@ -31,6 +31,7 @@ export const SETTINGS_NAV: [string, SettingsPage[]][] = [
31
31
  const PLACES: [RegExp, string, string][] = [
32
32
  [/^(preset|runner|build\.|review\.executor)/, "agents", "Workflow"],
33
33
  [/^(subagents\.|agent\.model\.)/, "agents", "Models"],
34
+ [/^agent\.handoff_model\./, "agents", "Handoff session"],
34
35
  [/^agent\.default$/, "agents", "Default agent"],
35
36
  [/^agent\./, "agents", "Running agents"],
36
37
  [/^orchestration\./, "orchestration", "Workers"],
@@ -17,6 +17,7 @@ const SKILL_ICONS: Record<string, string> = {
17
17
  "kaizen-book": '<path d="M12 6c-2-1.5-5-2-8-2v15c3 0 6 .5 8 2 2-1.5 5-2 8-2V4c-3 0-6 .5-8 2Z"/><path d="M12 6v15"/>',
18
18
  "kaizen-deck": '<rect x="3" y="4" width="18" height="12" rx="1"/><path d="M12 16v4M8 20h8M8 12l3-3 2 2 3-3"/>',
19
19
  "kaizen-computer": '<rect x="3" y="4" width="18" height="12" rx="1"/><path d="M8 20h8M12 16v4M9 8l5 3-2 .8-.8 2Z"/>',
20
+ "kaizen-game": '<rect x="2" y="7" width="20" height="11" rx="5"/><path d="M7 10.5v4M5 12.5h4"/><circle cx="16" cy="11.5" r=".6"/><circle cx="18" cy="13.5" r=".6"/>',
20
21
  "kaizen-video": '<rect x="3" y="6" width="13" height="12" rx="2"/><path d="m16 10 5-3v10l-5-3"/>',
21
22
  };
22
23
  const PUZZLE = '<path d="M10 4a2 2 0 1 1 4 0v2h5v5h-2a2 2 0 1 0 0 4h2v5H5v-5h2a2 2 0 1 0 0-4H5V6h5Z"/>';
@@ -139,11 +139,11 @@ export async function openSettings() {
139
139
  // Drawn as chips with the agent list, above the rest of the page.
140
140
  cfg.rows = cfg.rows.filter((r) => !(r.key === "agent.default" && ap));
141
141
  // A model row only for a tool on this machine.
142
- if (ap) cfg.rows = cfg.rows.filter((r) => !r.key.startsWith("agent.model.") || ap.agents.some((a) => a.installed && r.key.endsWith("." + a.cmd)));
142
+ if (ap) cfg.rows = cfg.rows.filter((r) => !/^agent\.(model|handoff_model)\./.test(r.key) || ap.agents.some((a) => a.installed && r.key.endsWith("." + a.cmd)));
143
143
  for (const r of cfg.rows) {
144
144
  const id = "s-" + r.key.replace(/\./g, "-");
145
145
  const [page, sub] = placeOf(r.key);
146
- const wm = /^(orchestration\.worker_model|agent\.model)\./.test(r.key);
146
+ const wm = /^(orchestration\.worker_model|agent\.model|agent\.handoff_model)\./.test(r.key);
147
147
  put(page, sub + (scoped && r.group === "Board" ? " · all projects" : ""), row(
148
148
  wm ? modelLabel(r) : r.label,
149
149
  r.text
package/web/board.html CHANGED
@@ -561,9 +561,9 @@ body.runv #runv{grid-area:1/1;display:flex;flex-direction:column;min-width:0;min
561
561
  .rpane>.term{flex:1;min-height:0;padding:6px 0 0 8px}
562
562
  .rframe{flex:1;min-height:0;width:100%;border:0;background:var(--bg-2)}
563
563
  .urlbar{display:flex;gap:6px;align-items:center;padding:6px 10px;border-bottom:1px solid var(--line)}.urlbar input{flex:1;min-width:0;font:12px var(--mono);border-radius:var(--r-s)}.urlbar button{width:28px;height:28px;display:grid;place-items:center;border-radius:var(--r-s);color:var(--dim);font-size:16px}.urlbar button:hover{background:var(--hover)}.urlbar svg{width:15px;height:15px}
564
- .rpane:not(.split)>.ph{display:none}.rnote,.rnone{color:var(--dim);padding:16px;margin:0}#rpanes{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}#rpanes>.rtree,#rpanes>.rpane{grid-area:1/1}.rtree{display:flex;min-width:0;min-height:0}.rtree.rows{flex-direction:column}.rtree>*{min-width:0;min-height:0}.ph>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.pmove>summary{list-style:none;cursor:pointer;padding:0 4px;border-radius:var(--r-s)}.pmove>summary::-webkit-details-marker{display:none}.pmove>summary:hover{background:var(--hover);color:var(--ink)}.pmove .menu-pop{position:fixed;z-index:40;right:auto;bottom:auto;width:max-content;min-width:200px;max-width:320px}.pmove .mh{display:block;padding:4px 10px;font-size:11px;color:var(--dim);font-weight:500}.ph button{background:none;border:0;color:inherit;cursor:pointer}.rdrop{box-shadow:inset 0 -2px 0 var(--accent)!important;background:var(--hover)!important}.rpane.rdrop-l{box-shadow:inset 3px 0 0 var(--accent)}.rpane.rdrop-r{box-shadow:inset -3px 0 0 var(--accent)}.rpane.rdrop-t{box-shadow:inset 0 3px 0 var(--accent)}.rpane.rdrop-b{box-shadow:inset 0 -3px 0 var(--accent)}.rgut{flex:0 0 1px;background:var(--line);position:relative;z-index:2}.rdrag iframe{pointer-events:none}.rgut::after{content:"";position:absolute;inset:0 -4px;cursor:col-resize}.rtree.rows>.rgut::after{inset:-4px 0;cursor:row-resize}.rpane.split.focus{outline:1px solid var(--accent);outline-offset:-1px}.rwin{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-s);background:none;color:var(--ink);font:inherit;font-size:12px;cursor:pointer;text-decoration:none;white-space:nowrap}.rwin:hover{background:var(--hover)}.rwin svg{width:14px;height:14px}.rnote b{display:block;color:var(--ink);margin-bottom:4px}.rnote .rwin{margin:8px 6px 0 0;vertical-align:middle}.urlbar button.rwin{width:auto;height:28px;padding:0 10px;display:inline-flex;font-size:12px;color:var(--ink)}.shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:12px}.shots figure{margin:0;border:1px solid var(--line);border-radius:var(--r-xs);overflow:hidden;background:var(--bg-2)}.shots img{display:block;width:100%;height:180px;object-fit:cover;object-position:top;border-radius:0}.shots figcaption{padding:6px 10px;font-size:12px;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rprev{overflow:auto;padding:16px 20px}.rprev img{max-width:100%;border-radius:var(--r-xs)}
564
+ .rpane:not(.split)>.ph{display:none}.annrow{flex:1;min-height:0;display:flex}.annrow>.rframe{flex:1;min-width:0;width:auto}.annbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:4px 10px;border-bottom:1px solid var(--line);font-size:12px;color:var(--dim)}.annbar[hidden],.annlist[hidden],.urlbar [hidden]{display:none}.annbar .rwin.on,.urlbar .rwin.on{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}.annbar .rwin[disabled]{opacity:.45;cursor:default}.annbar .sep{width:1px;height:18px;background:var(--line)}.annlist{flex:0 0 280px;min-width:0;overflow:auto;border-left:1px solid var(--line);padding:8px;display:flex;flex-direction:column;gap:8px;font-size:12px}.annempty{color:var(--dim);margin:8px 4px}.ann{display:flex;gap:8px;align-items:flex-start;border:1px solid var(--line);border-radius:var(--r-s);padding:8px}.ann.flash{outline:2px solid var(--accent)}.ann>button{background:none;border:0;color:var(--dim);cursor:pointer;font-size:16px;line-height:1}.annn{flex:0 0 22px;height:22px;border-radius:50%;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;font-size:12px}.annn.g{background:#34c759;color:#fff}.annb{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.annc{color:var(--ink);white-space:pre-wrap;word-break:break-word;outline:0;border-radius:3px}.annc:focus{background:var(--hover)}.annb code{color:var(--dim);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.annb small{color:var(--dim)}.annb img{max-width:100%;border:1px solid var(--line);border-radius:var(--r-xs)}.annset{display:flex;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:var(--r-s);padding:8px}.annset label{display:flex;gap:6px;align-items:center;justify-content:space-between}@media(max-width:640px){.annlist{flex-basis:160px}}.rnote,.rnone{color:var(--dim);padding:16px;margin:0}#rpanes{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}#rpanes>.rtree,#rpanes>.rpane{grid-area:1/1}.rtree{display:flex;min-width:0;min-height:0}.rtree.rows{flex-direction:column}.rtree>*{min-width:0;min-height:0}.ph>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.pmove>summary{list-style:none;cursor:pointer;padding:0 4px;border-radius:var(--r-s)}.pmove>summary::-webkit-details-marker{display:none}.pmove>summary:hover{background:var(--hover);color:var(--ink)}.pmove .menu-pop{position:fixed;z-index:40;right:auto;bottom:auto;width:max-content;min-width:200px;max-width:320px}.pmove .mh{display:block;padding:4px 10px;font-size:11px;color:var(--dim);font-weight:500}.ph button{background:none;border:0;color:inherit;cursor:pointer}.rdrop{box-shadow:inset 0 -2px 0 var(--accent)!important;background:var(--hover)!important}.rpane.rdrop-l{box-shadow:inset 3px 0 0 var(--accent)}.rpane.rdrop-r{box-shadow:inset -3px 0 0 var(--accent)}.rpane.rdrop-t{box-shadow:inset 0 3px 0 var(--accent)}.rpane.rdrop-b{box-shadow:inset 0 -3px 0 var(--accent)}.rgut{flex:0 0 1px;background:var(--line);position:relative;z-index:2}.rdrag iframe{pointer-events:none}.rgut::after{content:"";position:absolute;inset:0 -4px;cursor:col-resize}.rtree.rows>.rgut::after{inset:-4px 0;cursor:row-resize}.rpane.split.focus{outline:1px solid var(--accent);outline-offset:-1px}.rwin{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-s);background:none;color:var(--ink);font:inherit;font-size:12px;cursor:pointer;text-decoration:none;white-space:nowrap}.rwin:hover{background:var(--hover)}.rwin svg{width:14px;height:14px}.rnote b{display:block;color:var(--ink);margin-bottom:4px}.rnote .rwin{margin:8px 6px 0 0;vertical-align:middle}.urlbar button.rwin{width:auto;height:28px;padding:0 10px;display:inline-flex;font-size:12px;color:var(--ink)}.shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:12px}.shots figure{margin:0;border:1px solid var(--line);border-radius:var(--r-xs);overflow:hidden;background:var(--bg-2)}.shots img{display:block;width:100%;height:180px;object-fit:cover;object-position:top;border-radius:0}.shots figcaption{padding:6px 10px;font-size:12px;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rprev{overflow:auto;padding:16px 20px}.rprev img{max-width:100%;border-radius:var(--r-xs)}
565
565
  .rempty{margin:auto;text-align:center;color:var(--dim)}
566
- body.runv #panel{grid-area:1/2;position:relative!important;inset:auto!important;transform:none!important;visibility:visible!important;transition:width .18s;overflow:hidden;width:340px!important;max-width:none;z-index:auto!important;border:0;box-shadow:none;background:var(--canvas);display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:auto minmax(0,1fr) auto}
566
+ body.runv #panel{grid-area:1/2;position:relative!important;inset:auto!important;transform:none!important;visibility:visible!important;transition:width .18s;overflow:hidden;width:var(--rpanel-w,340px)!important;max-width:none;z-index:auto!important;border:0;box-shadow:none;background:var(--canvas);display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:auto minmax(0,1fr) auto}
567
567
  body.runv #panel>header{grid-area:1/1;border:0;padding:14px 12px 12px 18px}body.runv #pfoot{border:0;padding:12px 12px 14px 18px}
568
568
  body.runv #psub{display:block}body.runv #pbody{padding:8px 12px 12px 18px}body.runv #panel>header .t{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px}body.runv #psub{display:contents}.rmeta{font-size:11px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.rprog{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin-top:8px;font-size:11px;color:var(--dim)}.rprog span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:50%}.rprog b{position:relative;flex:1;height:3px;border-radius:2px;background:var(--line);overflow:hidden}.rprog i{position:absolute;inset:0 auto 0 0;border-radius:2px;background:var(--run);transition:width .6s cubic-bezier(.2,.8,.2,1)}.rprog.s-running i::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);animation:rsweep 1.6s ease-in-out infinite}.rprog.s-waiting i{background:var(--warn);animation:rpulse 1.8s ease-in-out infinite}.rprog.s-waiting span{color:var(--warn)}.rprog.s-stalled i{background:var(--danger)}.rprog.s-done i{background:var(--ok)}@keyframes rsweep{from{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes rpulse{50%{opacity:.45}}@media (prefers-reduced-motion:reduce){.rprog i,.rprog i::after{animation:none!important;transition:none}}body.runv #pbody{grid-area:2/1;min-height:0}body.runv #pfoot{grid-area:3/1}
569
569
  body.runv #pclose,body.runv #pterm{display:none}
@@ -599,7 +599,8 @@ body.runv #panel.parked,body.runv.rflip #panel.parked{display:none}
599
599
  @media(max-width:640px){.ppick{min-height:44px}.pk{min-height:44px}}
600
600
  @keyframes sheet{from{translate:0 100%}}
601
601
  /* hidden by width, not display, so it slides like the rail */
602
- @media(min-width:641px){body.runv.rflip #panel{width:0!important}body.runv #panel{grid-template-columns:296px 44px}}
602
+ @media(min-width:641px){body.runv.rflip #panel{width:0!important}body.runv #panel{grid-template-columns:calc(var(--rpanel-w,340px) - 44px) 44px}body.runv:not(.rflip) #rgrip{display:block;position:absolute;z-index:3;top:0;bottom:0;left:0;width:8px;cursor:col-resize;touch-action:none}body.runv #rgrip:hover,body.rdrag #rgrip{background:linear-gradient(90deg,var(--line),transparent)}body.rdrag{user-select:none}body.rdrag #panel{transition:none}}
603
+ #rgrip{display:none}
603
604
  @media(max-width:640px){body.runv .app{grid-template-columns:minmax(0,1fr)}.rsplit{display:none}body.runv #panel{display:none}body.runv.rflip #pclose{display:grid}body.runv.rflip #panel{display:grid;position:fixed!important;inset:auto 0 0 0!important;height:80%;width:auto!important;z-index:15!important;padding:18px 0 env(safe-area-inset-bottom);background:var(--bg-2);box-shadow:0 0 0 100vmax rgb(0 0 0/.4);border-radius:14px 14px 0 0;transition:translate .18s;animation:sheet .2s}
604
605
  /* the grab handle: the sheet follows a finger down and closes (run-view.ts) */
605
606
  body.runv.rflip #panel::before{content:"";position:absolute;top:7px;left:50%;width:36px;height:4px;margin-left:-18px;border-radius:2px;background:var(--line)}body.runv.rflip #panel>.body{overscroll-behavior:contain;scrollbar-width:none}body.runv.rflip #panel>.body::-webkit-scrollbar{display:none}body .prog .ph{display:flex;justify-content:space-between;gap:8px}body.runv.rflip #panel>header{padding-top:8px}body.runv.rflip .rmeta{max-width:64px}
@@ -1220,6 +1221,7 @@ html body.wsb:not(.paged) #board{grid-template-columns:repeat(4,minmax(200px,1fr
1220
1221
 
1221
1222
  <div class="scrim" id="scrim"></div>
1222
1223
  <aside id="panel" aria-label="detail">
1224
+ <div id="rgrip" title="Drag to resize, double-click to reset"></div>
1223
1225
  <header><div class="t"><div class="pwrap"><button type="button" class="ppick" id="ppick" aria-haspopup="listbox" aria-expanded="false" title="Choose a run"></button><div class="ppop" id="ppop" role="listbox" aria-label="Runs in this workspace" hidden></div></div><b id="ptitle"></b><div class="sub" id="psub"></div></div><button class="ib" id="pterm" aria-label="Terminal" title="Terminal" hidden><svg><use href="#i-term"/></svg></button><button class="ib" id="pclose" aria-label="Close" title="Close"><svg><use href="#i-close"/></svg></button></header>
1224
1226
  <div class="pstrip"><nav id="ptabs"></nav><button class="pnotes" id="pnotes" title="Project notes" aria-label="Project notes"><svg><use href="#t-book"/></svg></button></div>
1225
1227
  <div class="body md" id="pnlist"></div>