Skip to content

Commit 8cb702e

Browse files
futurepaulclaude
andcommitted
The disk notice says Paul's words, in one line
"Your computer is almost full (3.2 GB left). Delete files you don't need, or ask an agent to tidy up.", the number its real free space as the notice carries it. One line, as the updating notice is; its test holds the words exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6da69fa commit 8cb702e

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
// cell/shell/computer.js's `diskSaid`: what the person is told of a disk
2-
// filling (the `disk_filling` notice), in plain words: the room left, and
3-
// what to do before it runs out.
2+
// filling (the `disk_filling` notice), in one line, Paul's words: the room
3+
// left, as the real free space, and what to do.
44
// Run by `cargo xtask check` on the pinned Node (xtask/src/js_syntax.rs).
55

66
import { test } from "node:test";
77
import assert from "node:assert/strict";
8-
import { DISK_TITLE, diskSaid } from "../shell/computer.js";
8+
import { diskSaid } from "../shell/computer.js";
99

1010
test("a disk filling: the room left, in GB, and what to do", () => {
11-
assert.equal(DISK_TITLE, "Your computer is almost full");
1211
assert.equal(
1312
diskSaid({ kind: "disk_filling", total: 20_000_002_048, free: 3_240_662_016 }),
14-
"It has 3.2 GB of space left. When it's full, your agents can't save their work. Delete files you don't need, or ask an agent to tidy up.",
13+
"Your computer is almost full (3.2 GB left). Delete files you don't need, or ask an agent to tidy up.",
1514
);
1615
});
1716

1817
test("under a GB, in MB", () => {
19-
assert.match(diskSaid({ kind: "disk_filling", total: 20_000_002_048, free: 420_000_000 }), /^It has 420 MB of space left\./);
18+
assert.equal(
19+
diskSaid({ kind: "disk_filling", total: 20_000_002_048, free: 420_000_000 }),
20+
"Your computer is almost full (420 MB left). Delete files you don't need, or ask an agent to tidy up.",
21+
);
2022
});

‎cell/shell/computer.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ export function setAsideSaid(aside) {
1818
}
1919

2020
// What the person is told of a disk filling (the `disk_filling` notice),
21-
// here too: how much room is left, and what to do before it runs out.
22-
export const DISK_TITLE = "Your computer is almost full";
21+
// here too, in one line (Paul's words): the room left, and what to do.
2322
export function diskSaid(n) {
24-
return `It has ${size(n.free)} of space left. When it's full, your agents can't save their work. Delete files you don't need, or ask an agent to tidy up.`;
23+
return `Your computer is almost full (${size(n.free)} left). Delete files you don't need, or ask an agent to tidy up.`;
2524
}
2625

2726
export function createComputer({ api, el, seg, named, section, line, actionLine, computer, agents, computerFailed, support, setupPending, made, computerIs, reopenSettings, openScreen, markOffer, reads, load }) {
@@ -142,7 +141,7 @@ export function createComputer({ api, el, seg, named, section, line, actionLine,
142141
say(ASIDE_TITLE, setAsideSaid(n.aside));
143142
} else if (n.kind === "disk_filling") {
144143
row.classList.add("warn");
145-
say(DISK_TITLE, diskSaid(n));
144+
copy.append(el("strong", null, diskSaid(n)));
146145
} else if (n.kind === "deploying") {
147146
copy.append(el("strong", null, "Updating — back in a moment"));
148147
} else if (n.kind === "refresh") {

0 commit comments

Comments
 (0)