kaizen-agent 1.69.0 → 1.69.1

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.
package/cli/install.ts CHANGED
@@ -30,7 +30,7 @@ const interactive = process.stdin.isTTY && !check && !upgrade && !args.has("--ye
30
30
  // installer, so a typo or a command from a newer kaizen reinstalled instead of failing.
31
31
  // cli/install-unknown.test.ts fails if a dispatched word is missing here.
32
32
  const COMMANDS = ["automation", "help", "init", "browser", "card", "chat", "computer", "config", "docs", "done", "gather", "handoff",
33
- "icebox", "issue", "prune", "recall", "related", "remember", "report", "roadmap", "settings", "setup", "sources",
33
+ "icebox", "issue", "preview", "prune", "recall", "related", "remember", "report", "roadmap", "settings", "setup", "sources",
34
34
  "state", "stats", "uninstall", "upgrade", "version", "web", "worker", "worktree"];
35
35
  const first = Bun.argv[2];
36
36
  const commandList = ` commands: ${COMMANDS.join(", ")}\n plain \`kaizen\` opens the board; \`kaizen --yes\` installs; \`kaizen init\` sets up this folder\n`;
@@ -274,6 +274,17 @@ if (Bun.argv[2] === "stats" || Bun.argv[2] === "related") {
274
274
  process.exit(0);
275
275
  }
276
276
 
277
+ // `kaizen preview <url|image>`: shows what an agent changed in the board's Browser tab, see cli/preview.ts.
278
+ if (Bun.argv[2] === "preview") {
279
+ const { locate } = await import("./state.ts");
280
+ const { setPreview } = await import("./preview.ts");
281
+ const state = locate();
282
+ const arg = Bun.argv[3] ?? "";
283
+ const why = !arg ? "kaizen preview <localhost url | screenshot.png>" : !state ? "no kaizen project here" : setPreview(state, arg, process.cwd());
284
+ console.log(why ? `\n ${why}\n` : `\n ${c.green("ok")} the open kaizen board shows it: a page in Browser, a screenshot in Preview\n`);
285
+ process.exit(why ? 1 : 0);
286
+ }
287
+
277
288
  // `kaizen remember …` / `kaizen recall …`: global knowledge, see cli/knowledge.ts.
278
289
  if (Bun.argv[2] === "remember" || Bun.argv[2] === "recall") {
279
290
  const { cli } = await import("./knowledge.ts");
@@ -1218,12 +1229,20 @@ function initProject() {
1218
1229
  // ("add a discount cap") does not reach kaizen unless the project says it should.
1219
1230
  // One line in the agent instructions is what makes it the default here.
1220
1231
  function writePointer() {
1221
- const block = `\n## Kaizen workflow\n\nNon-trivial work in this repository follows the staged workflow in\n\`.kaizen/spec.md\`: plan, human approval, build, independent review, bounded fix\nloop. Invoke the \`kaizen\` skill for it — do not carry the stages out inline.\n\nA run costs several times what the same change costs in one session, so spend it\nwhere being wrong is expensive: money, data loss, a migration or anything else hard\nto undo, work a customer sees, or a part of the system nobody has read in a year.\n\nWork where being wrong is cheap and obvious does not start a run. Answering a\nquestion, reading code, a one-line fix, a rename the compiler checks — do those\ndirectly. When it is genuinely unclear, ask rather than assuming the expensive path.\n\nBefore non-trivial work, run \`kaizen recall --track <track> --query "<topic>"\` and\ntreat what it returns as past experience from other projects to verify, not as rules.\n\nRun state lives in \`.kaizen/runs/<id>/\`. Read \`state.json\` first and continue from\nthe stage it names; never advance a run whose \`awaiting\` field is non-null without a\nrecorded human decision.\n`;
1232
+ const block = `\n## Kaizen workflow\n\nNon-trivial work in this repository follows the staged workflow in\n\`.kaizen/spec.md\`: plan, human approval, build, independent review, bounded fix\nloop. Invoke the \`kaizen\` skill for it — do not carry the stages out inline.\n\nA run costs several times what the same change costs in one session, so spend it\nwhere being wrong is expensive: money, data loss, a migration or anything else hard\nto undo, work a customer sees, or a part of the system nobody has read in a year.\n\nWork where being wrong is cheap and obvious does not start a run. Answering a\nquestion, reading code, a one-line fix, a rename the compiler checks — do those\ndirectly. When it is genuinely unclear, ask rather than assuming the expensive path.\n\nBefore non-trivial work, run \`kaizen recall --track <track> --query "<topic>"\` and\ntreat what it returns as past experience from other projects to verify, not as rules.\n\nAfter you change something a person can look at (a page, an app screen, a UI), show it\nbefore saying done: start the app\'s dev server if it is not running, then run\n\`kaizen preview <localhost url>\` (or \`kaizen preview <screenshot.png>\` for a static result).\nA page opens in the kaizen board\'s Browser tab and a screenshot in its Preview tab, never a new browser window.\n\nRun state lives in \`.kaizen/runs/<id>/\`. Read \`state.json\` first and continue from\nthe stage it names; never advance a run whose \`awaiting\` field is non-null without a\nrecorded human decision.\n`;
1222
1233
 
1223
1234
  for (const name of ["CLAUDE.md", "AGENTS.md"]) {
1224
1235
  const f = join(process.cwd(), name);
1225
1236
  const current = existsSync(f) ? readFileSync(f, "utf8") : "";
1226
- if (current.includes("## Kaizen workflow")) continue;
1237
+ if (current.includes("## Kaizen workflow")) {
1238
+ // Projects set up before `kaizen preview` get its paragraph on the next init.
1239
+ if (!current.includes("kaizen preview")) {
1240
+ const para = block.slice(block.indexOf("After you change something"), block.indexOf("Run state lives"));
1241
+ writeFileSync(f, current.replace("\nRun state lives in", "\n" + para + "Run state lives in"));
1242
+ step(`added the preview line to ${name}`);
1243
+ }
1244
+ continue;
1245
+ }
1227
1246
  if (!current && name === "AGENTS.md") continue; // do not create one that was never there
1228
1247
  const text = current ? (current.endsWith("\n") ? "" : "\n") + block : block.slice(1);
1229
1248
  appendFileSync(f, text);
package/cli/preview.ts ADDED
@@ -0,0 +1,29 @@
1
+ // `kaizen preview <url|image>`: tells the board's own Browser tab what the agent just
2
+ // changed. It only writes <state>/preview.json; the open board polls GET /preview and
3
+ // frames the page itself. This never launches a browser, so with no board open nothing opens.
4
+ import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
5
+ import { basename, extname, join, resolve } from "node:path";
6
+
7
+ export type Preview = { url?: string; image?: string; ws: string; at: number };
8
+
9
+ const IMG = /^\.(png|jpe?g|gif|webp)$/i;
10
+ const LOOPBACK = /^https?:\/\/(localhost|127\.0\.0\.1|\[::1\])(:\d+)?(\/|$)/;
11
+
12
+ // Returns an error message, or null once preview.json is written.
13
+ export function setPreview(state: string, arg: string, cwd: string): string | null {
14
+ const p: Preview = { ws: resolve(cwd), at: Date.now() };
15
+ if (/^https?:\/\//i.test(arg)) {
16
+ if (!LOOPBACK.test(arg)) return "only a localhost address (the dev server), e.g. http://localhost:3000";
17
+ p.url = arg;
18
+ } else {
19
+ const f = resolve(cwd, arg);
20
+ if (!existsSync(f) || !IMG.test(extname(f))) return "give a localhost URL or a png/jpg/gif/webp screenshot that exists";
21
+ // Under attachments/, where the board's /file route already serves from.
22
+ const name = `preview-${p.at}${extname(f).toLowerCase()}`;
23
+ mkdirSync(join(state, "attachments"), { recursive: true });
24
+ copyFileSync(f, join(state, "attachments", name));
25
+ p.image = `attachments/${basename(name)}`;
26
+ }
27
+ writeFileSync(join(state, "preview.json"), JSON.stringify(p));
28
+ return null;
29
+ }
package/cli/web.ts CHANGED
@@ -1112,6 +1112,13 @@ export async function web(repoDir: string, opts: Opts = {}) {
1112
1112
  if (!isLoopback(u)) return bad("only a localhost address", 400);
1113
1113
  return json({ ok: await openApp(u.href, join(home, ".kaizen", "app-window")) });
1114
1114
  }
1115
+ // What `kaizen preview` last wrote for this state dir (cli/preview.ts); the board's Browser tab polls it.
1116
+ if (req.method === "GET" && path === "/preview") {
1117
+ if (!local(req)) return bad("cross-origin request refused", 403);
1118
+ const dir = qdir() ?? state;
1119
+ if (!dir || !states(true).includes(dir)) return bad("unknown state dir", 404);
1120
+ try { return json(JSON.parse(readFileSync(join(dir, "preview.json"), "utf8"))); } catch { return json({}); }
1121
+ }
1115
1122
  // The loopback ports this workspace's own processes listen on (its dev server), so the
1116
1123
  // Browser opens the run's app and not another project's on the Preview's port. Linux only
1117
1124
  // (ss + /proc); elsewhere the answer is empty and the Preview's address is used.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaizen-agent",
3
- "version": "1.69.0",
3
+ "version": "1.69.1",
4
4
  "description": "Staged workflow for AI agents — code, writing, research, operations: plan, human approval, build, independent review, bounded fix loop.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -137,7 +137,7 @@ files its report names, so a changed path written any other way is left out of t
137
137
  commit, and a backticked path the run did not change is taken into it. Report failures honestly; a false claim of
138
138
  success poisons the review stage, which trusts this report.
139
139
 
140
- **A `## Preview` section says how to see the result.** For an app or service: the
140
+ **A `## Preview` section says how to see the result.** Where the result shows on a screen, also run `kaizen preview <localhost url | screenshot.png>` so the board shows it (a page in Browser, a screenshot in Preview) (never a new browser window). For an app or service: the
141
141
  commands to start it locally and the URL to open, copied from the material's own README
142
142
  where one exists. An app with a dev server: leave it running when the build ends
143
143
  (started in the background, its log in a file), and write its full `http://localhost:<port>`
@@ -45,6 +45,7 @@ anything.
45
45
  | `/kaizen config` | Show this project's settings and change them, one picker per setting |
46
46
  | `/kaizen init` | Set up this project folder: `.kaizen/` with the `spec*.md` files, config, and — in a git repo — the gitignore entry |
47
47
  | `/kaizen install` | Install the workflow itself globally or per-project |
48
+ | `kaizen preview <localhost url \| image>` | Show a change in the board (page → Browser tab, screenshot → Preview tab), not a new browser window |
48
49
  | `kaizen recall [--track t] [--tags a,b] [--query "<words>"]` | Lessons from other projects that match (global knowledge, `~/.kaizen/knowledge/`) |
49
50
  | `kaizen remember --track t --tags a,b --applies "<where>" --run <id> "<lesson>"` | Save a lesson that holds beyond this project; the reviewer calls it |
50
51
 
package/web/board/home.ts CHANGED
@@ -68,7 +68,7 @@ function msg(m, i) {
68
68
  const runs = runsIn(m.text + " " + (m.steps || []).map((s) => s.text).join(" "));
69
69
  // Nothing yet: the typing dots stand in for the reply.
70
70
  if (!steps.length && !m.text && !m.error && !active) return "";
71
- return html`<div class="hm a${anim}">${m.text ? html`<div class="hb md">${raw(md(m.text))}</div>` : ""}${steps.length ? html`<details class="hsteps"><summary>${steps.length} step${steps.length > 1 ? "s" : ""}</summary><ul>${steps}</ul></details>` : ""}${m.error ? html`<div class="herr">${m.error}</div>` : ""}${moved.map((s) => html`<div class="hmove${s.ok === false ? " bad" : ""}">${ico("board")}${s.text}</div>`)}${runs.map((id) => html`<button class="btn ghost sm hrun" data-run="${id}">${ico("board")}Open ${id}</button>`)}${active ? html`<div class="hactivity" role="status"><span class="hmascot" aria-hidden="true"><i class="mascot"></i><i class="hlaptop"></i></span><span class="hactivity-copy"><span>${m.activity || "Thinking…"}</span><span class="hdots" aria-hidden="true"><i></i><i></i><i></i></span></span></div>` : ""}</div>`;
71
+ return html`<div class="hm a${anim}">${m.text ? html`<div class="hb md">${raw(md(m.text))}</div>` : ""}${steps.length ? html`<details class="hsteps"><summary>${steps.length} step${steps.length > 1 ? "s" : ""}</summary><ul>${steps}</ul></details>` : ""}${m.error ? html`<div class="herr">${m.error}</div>` : ""}${moved.map((s) => html`<div class="hmove${s.ok === false ? " bad" : ""}">${ico("board")}${s.text}</div>`)}${runs.map((id) => html`<button class="btn ghost sm hrun" data-run="${id}">${ico("board")}Open ${id}</button>`)}${active ? html`<div class="hactivity" role="status"><span class="hmascot" aria-hidden="true"><i class="hlaptop"></i></span><span class="hactivity-copy"><span>${m.activity || "Thinking…"}</span><span class="hdots" aria-hidden="true"><i></i><i></i><i></i></span></span></div>` : ""}</div>`;
72
72
  }
73
73
 
74
74
  function hero() {
@@ -200,7 +200,7 @@ function draw() {
200
200
  grow(q);
201
201
  q.oninput = () => grow(q);
202
202
  q.onkeydown = (e) => {
203
- if (e.key === "Enter" && !e.shiftKey && !e.isComposing) {
203
+ if (e.key === "Enter" && !e.shiftKey && !e.isComposing && !phone()) { // no Shift on a phone: Enter is a new line, the Send button sends
204
204
  e.preventDefault();
205
205
  $("hbox").requestSubmit();
206
206
  }
@@ -1,6 +1,6 @@
1
1
  // ---- Phones: their own Home (devices, recent runs, usage) and the Runs page (this
2
2
  // machine's runs grouped waiting / active / done). The board, Tasks and Icebox are set up
3
- // on a computer; a phone has Home, Chat, Runs and Settings.
3
+ // on a computer; a phone has Home, Chat, Runs and Search (Settings is found through it).
4
4
  import { runPopup } from "./cards.ts";
5
5
  import { $, html, raw } from "./dom.ts";
6
6
  import { cardHref, logo, railData, stateOf, subline, titleOf, usageChips, wsHref } from "./workspace.ts";
@@ -537,6 +537,15 @@ async function openWindow(u: string) {
537
537
  // The run's Preview: its screenshots (each opens the image viewer on click), with an Open
538
538
  // app link when it names a localhost address. The address is framed only when the Preview
539
539
  // has no images: the dev server a run used is often gone, and a dead frame hides the proof.
540
+ // No run, no `## Preview`: what an agent last showed with `kaizen preview <image|url>` in this workspace.
541
+ async function directPreview(el: HTMLElement) {
542
+ if (!ctx) return false;
543
+ const p = await fetchPreview(ctx.dir, ctx.ws);
544
+ if (!p) return false;
545
+ const u = p.image ? fileUrl(ctx.dir, p.image) : p.url!;
546
+ el.insertAdjacentHTML("beforeend", String(p.image ? html`<div class="rprev"><figure><img src="${u}" alt="Latest change" style="max-width:100%"><figcaption>${p.image.split("/").pop()}</figcaption></figure></div>` : html`<iframe class="rframe" title="Preview" src="${u}"></iframe>`));
547
+ return true;
548
+ }
540
549
  async function previewPane(el: HTMLElement) {
541
550
  let doc = store.runDoc && store.runDoc.id === card?.id ? store.runDoc : null;
542
551
  if (!doc && card?.kind === "run")
@@ -544,6 +553,8 @@ async function previewPane(el: HTMLElement) {
544
553
  doc = await (await fetch(`/run/${encodeURIComponent(card.id)}?dir=${encodeURIComponent(card.state)}`)).json();
545
554
  } catch {}
546
555
  const pv = doc && preview(doc.impl);
556
+ (el as any).refresh = () => (el.replaceChildren(), void previewPane(el));
557
+ if (!pv && (await directPreview(el))) return;
547
558
  const url = loopbackUrl(pv);
548
559
  const shots = pv && /!\[[^\]]*\]\(/.test(pv);
549
560
  if (url && loopback && !shots) return void el.insertAdjacentHTML("beforeend", String(html`<iframe class="rframe" title="Preview" src="${url}"></iframe>`));
@@ -731,6 +742,25 @@ function onMoveMenu(e: Event) {
731
742
  m.style.left = Math.max(8, r.right - m.offsetWidth) + "px";
732
743
  }
733
744
 
745
+ // + makes a new tab; split right/down adds to the tab shown. `n` is a menu item's data-n.
746
+ function openNew(n: string, mode: string) {
747
+ const s = saved();
748
+ target = mode === "tab" || !s.on ? null : { screen: s.on, dir: mode as "cols" | "rows" };
749
+ if (n === "shell") void newPty();
750
+ else if (n.startsWith("agent:")) void newPty(n.slice(6));
751
+ else if (n === "local") addTab({ id: "local", kind: "local", title: "Browser" });
752
+ else if (n === "history") addTab({ id: "history", kind: "history", title: "History" });
753
+ else openPreview();
754
+ }
755
+ // Ctrl+Space r / d: a second terminal like the focused one (same agent, or a shell), split right or down.
756
+ // Anything else (Browser, Preview, notes) has no copy to make, so the menu opens to pick from.
757
+ function likeFocused(): string | null {
758
+ const sc = screens().find((x) => x.id === saved().on);
759
+ const t = sc && tabs().find((x) => x.id === sc.focus);
760
+ if (t?.kind === "shell") return "shell";
761
+ if (t?.kind === "agent") return "agent:" + (t.agent ?? (defAgent || agents[0]?.cmd || ""));
762
+ return null;
763
+ }
734
764
  function wire() {
735
765
  const bar = $("rtabs"),
736
766
  s = saved();
@@ -748,15 +778,8 @@ function wire() {
748
778
  const n = t.closest<HTMLElement>("[data-n]")?.dataset.n;
749
779
  if (n) {
750
780
  const d = t.closest<HTMLDetailsElement>(".radd")!;
751
- const mode = d.dataset.mode;
752
781
  d.open = false;
753
- // + makes a new tab; split right/down adds to the tab shown.
754
- target = mode === "tab" || !s.on ? null : { screen: s.on, dir: mode as "cols" | "rows" };
755
- if (n === "shell") void newPty();
756
- else if (n.startsWith("agent:")) void newPty(n.slice(6));
757
- else if (n === "local") addTab({ id: "local", kind: "local", title: "Browser" });
758
- else if (n === "history") addTab({ id: "history", kind: "history", title: "History" });
759
- else openPreview();
782
+ openNew(n, d.dataset.mode as string);
760
783
  return;
761
784
  }
762
785
  };
@@ -931,6 +954,42 @@ async function autoBrowse() {
931
954
  }
932
955
  }
933
956
 
957
+ // `kaizen preview <url|image>` (cli/preview.ts) wrote what an agent changed: the Browser tab opens
958
+ // on it, inside the board. Never an outside window. The newest one per workspace opens once; one
959
+ // older than two minutes at first sight is stale and is only recorded.
960
+ const previewAt = new Map<string, number>();
961
+ const fileUrl = (dir: string, image: string) => `${location.origin}/file?dir=${encodeURIComponent(dir)}&p=${encodeURIComponent(image)}`;
962
+ // The latest preview written for this workspace, or null.
963
+ async function fetchPreview(dir: string, ws: string) {
964
+ let p: { url?: string; image?: string; ws?: string; at?: number } = {};
965
+ try {
966
+ p = await (await fetch("/preview?dir=" + encodeURIComponent(dir))).json();
967
+ } catch {}
968
+ const same = p.ws && (p.ws === ws || p.ws.startsWith(ws + "/") || ws.startsWith(p.ws + "/"));
969
+ return p.at && same && (p.url || p.image) ? p : null;
970
+ }
971
+ async function pollPreview() {
972
+ if (!ctx) return;
973
+ const k = ctx.k, dir = ctx.dir;
974
+ const p = await fetchPreview(dir, ctx.ws);
975
+ if (!p || ctx?.k !== k || (previewAt.get(k) ?? 0) >= p.at!) return;
976
+ const first = !previewAt.has(k);
977
+ previewAt.set(k, p.at!);
978
+ if (first && Date.now() - p.at! > 120_000) return;
979
+ if (p.image) {
980
+ // A screenshot belongs in Preview; a live page in the Browser.
981
+ addTab({ id: "preview", kind: "preview", title: "Preview" });
982
+ (panes.get("preview")?.el as any)?.refresh?.();
983
+ return;
984
+ }
985
+ try {
986
+ localStorage.setItem("kz-browse:" + k, p.url!);
987
+ } catch {}
988
+ addTab({ id: "local", kind: "local", title: "Browser" });
989
+ (panes.get("local")?.el as any)?.browseTo?.(p.url!);
990
+ }
991
+ setInterval(() => void pollPreview(), 3000);
992
+
934
993
  // A phone's run sheet: drag it down from anywhere its content is at the top, or tap outside it.
935
994
  function initSheet() {
936
995
  const p = $("panel"),
@@ -1004,6 +1063,8 @@ function paneKey(k: string) {
1004
1063
  return;
1005
1064
  }
1006
1065
  const mode = { c: "tab", r: "cols", d: "rows" }[k];
1066
+ const same = mode && mode !== "tab" && !noPty ? likeFocused() : null;
1067
+ if (same) return void openNew(same, mode!);
1007
1068
  if (mode) {
1008
1069
  const add = $("rtabs").querySelector<HTMLDetailsElement>(`.radd[data-mode=${mode}]`);
1009
1070
  if (add) add.open = true;
@@ -1040,7 +1101,7 @@ function keyHint(on: boolean) {
1040
1101
  const h = document.createElement("div");
1041
1102
  h.id = "keyhint";
1042
1103
  h.setAttribute("role", "status");
1043
- const keys = [["←↓↑→", "pane"], ["1-9", "tab"], ["n p", "next, prev"], ["c", "new tab"], ["r", "split right"], ["d", "split down"], ["x", "close pane"], ["?", "all keys"]];
1104
+ const keys = [["←↓↑→", "pane"], ["1-9", "tab"], ["n p", "next, prev"], ["c", "new tab"], ["r", "split right, same as this pane"], ["d", "split down, same as this pane"], ["x", "close pane"], ["?", "all keys"]];
1044
1105
  h.innerHTML = String(html`${keys.map(([k, t]) => html`<span><kbd>${k}</kbd>${t}</span>`)}`);
1045
1106
  document.body.append(h);
1046
1107
  }
@@ -294,7 +294,7 @@ dialog.gs::backdrop{background:rgb(0 0 0/.35)}
294
294
  .gs-w{margin-left:auto;padding-left:8px;color:var(--dim);font-size:var(--fs-xs,11px);flex:none}
295
295
  .gs-none{padding:14px 8px;text-align:center;color:var(--dim);font-size:var(--fs-s,12px)}
296
296
  .gs-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
297
- @media(max-width:640px){.rail a.it.gs-it{display:none}}`;
297
+ @media(max-width:640px){.rail a.it.gs-it{order:4}}`;
298
298
 
299
299
  export function initSearch() {
300
300
  const st = document.createElement("style");
package/web/board.html CHANGED
@@ -139,13 +139,13 @@ body .rail a.upd::after{left:calc(50% + 6px);top:4px}body .toast{left:16px;botto
139
139
  [data-rail=min] .rail .psec{padding:0;margin:12px 0 2px;flex-direction:column}[data-rail=min] .rail .rbot{flex-direction:column}
140
140
  [data-rail=min] .plist .proj{justify-content:center;margin:10px 0 4px;padding:0}[data-rail=min] .plist .row{grid-template-columns:14px;justify-content:center;padding:0}
141
141
  @media(max-width:640px){.rail .psec,.rail .plist,.rail .rib{display:none}.rail .rbot,[data-rail=min] .rail .rbot{display:contents}.rail a.it[data-view=tasks]{order:3}.rail a.it[data-view=board]{order:4}.rail a.it .n,.rail a.it .srcs{display:none}}
142
- /* phones: Home, Chat, Runs, Settings. The board, Tasks and the Icebox are set up on a computer (web/board/phone.ts) */
142
+ /* phones: Home, Chat, Runs, Search (Settings is a Search result). The board, Tasks and the Icebox are set up on a computer (web/board/phone.ts) */
143
143
  @media(min-width:641px){.rail .rbot .lbl{display:none}.rail .rbot a.it{flex:none;width:var(--btn-xs);height:var(--btn-xs);padding:0;justify-content:center;margin-right:auto}[data-rail=min] .rail .rbot a.it{width:var(--btn-s);height:var(--btn-s);margin-right:0}}
144
144
  .rail a.it.ponly,#phome{display:none}
145
145
  @media(max-width:640px){
146
146
  .rail a.it:is([data-view=board],[data-view=tasks],[data-view=sources]),#foot,#ctx-open,body .rail .rbot .rib{display:none!important}
147
147
  .rail a.it.ponly{display:flex}
148
- .rail a.it[data-view=home]{order:1}.rail a.it[data-view=chat]{order:2}.rail a.it[data-view=device]{order:3}.rail a.it[data-view=settings]{order:4}
148
+ .rail a.it[data-view=home]{order:1}.rail a.it[data-view=chat]{order:2}.rail a.it[data-view=device]{order:3}.rail a.it[data-view=settings]{display:none}
149
149
  .rail,[data-rail=min] .rail{padding:8px 8px max(2px,calc(env(safe-area-inset-bottom) - 8px));border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent)}
150
150
  .rail a.it,[data-rail=min] .rail a.it{min-height:46px;gap:3px;font-size:10.5px;letter-spacing:.01em}
151
151
  .rail a.it svg{width:44px;height:26px;padding:4px 12px;box-sizing:border-box;border-radius:13px;transition:background .15s}
@@ -666,7 +666,7 @@ body.homev #home{flex:1;min-height:0;display:flex;position:relative;animation:fi
666
666
  .hactivity{display:flex;align-items:center;gap:10px;min-height:54px;font-size:12px;color:var(--dim);overflow-wrap:anywhere}
667
667
  .hmascot{position:relative;display:block;width:52px;height:52px;flex:none;border-radius:12px}
668
668
  .hmascot .mascot{display:block;width:100%;height:100%;background:var(--accent);animation:hfloat 2.4s ease-in-out infinite}
669
- .hlaptop{position:absolute;left:14px;bottom:5px;width:24px;height:13px;border:1.5px solid #dce9ff;border-radius:3px 3px 2px 2px;background:linear-gradient(145deg,#3269bd,#142e61);box-shadow:0 0 8px #4384ff66}
669
+ .hlaptop{position:absolute;left:14px;top:20px;animation:hfloat 2.4s ease-in-out infinite;width:24px;height:13px;border:1.5px solid #dce9ff;border-radius:3px 3px 2px 2px;background:linear-gradient(145deg,#3269bd,#142e61);box-shadow:0 0 8px #4384ff66}
670
670
  .hlaptop:after{content:"";position:absolute;left:-4px;right:-4px;bottom:-4px;height:2px;border-radius:0 0 5px 5px;background:#b8d0ff}
671
671
  .hactivity-copy{display:flex;min-width:0;flex-direction:column;gap:6px}
672
672
  .hdots{display:flex;align-items:center;gap:6px;height:7px}
@@ -1028,6 +1028,7 @@ a.schip:hover{color:var(--ink);border-color:color-mix(in srgb,var(--line) 60%,va
1028
1028
  @view-transition{navigation:auto}
1029
1029
  ::view-transition-group(*){animation-duration:.2s}
1030
1030
  @media(prefers-reduced-motion:reduce){:root:not([data-motion=full]) *,:root:not([data-motion=full]) *::before,:root:not([data-motion=full]) *::after,:root:not([data-motion=full])::view-transition-group(*),:root:not([data-motion=full])::view-transition-old(*),:root:not([data-motion=full])::view-transition-new(*){transition:none!important;animation:none!important}}
1031
+ @media(prefers-reduced-motion:reduce){:root:not([data-motion=full]):not([data-motion=reduce]) .hdots i{animation:hdot 1.05s ease-in-out infinite!important}:root:not([data-motion=full]):not([data-motion=reduce]) .hdots i:nth-child(2){animation-delay:.16s!important}:root:not([data-motion=full]):not([data-motion=reduce]) .hdots i:nth-child(3){animation-delay:.32s!important}}
1031
1032
  :root[data-motion=reduce] *,:root[data-motion=reduce] *::before,:root[data-motion=reduce] *::after,:root[data-motion=reduce]::view-transition-group(*),:root[data-motion=reduce]::view-transition-old(*),:root[data-motion=reduce]::view-transition-new(*){transition:none!important;animation:none!important}
1032
1033
  /* Every page's top bar (Board, Tasks, Icebox, Terminal, Settings, a run's tabs): one height, one divider. */
1033
1034
  /* Tasks uses the Board's own header, as the Icebox does; its extra filters go in #hx. */