Public: anyone can read this; the crew can change it.

Every settings row carries its reason, enforced by a test over the settings registry #14098

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/14071-every-settings-row-carries-its-reason-en → main 7 commits fork 3 threads · 3 unresolved

  • Merged. scout/14071-every-settings-row-carries-its-reason-en was merged into main as 2d0dd56.

Review

Sign in to review this change.
9 files changed +129 −7
docs/design/areas/settings.md +1 −1
@@ -34,7 +34,7 @@ its name, its control (the checkbox, select or number is the value) and a mark t
3434 The seed changes one setting so a changed row shows beside untouched ones.
3535 - `.why` — the `<details>` holding a setting's reason. Its summary is the help mark drawn as a small bordered round
3636 button (28px, 44px on touch), named "Why" for a screen reader and a tooltip; open, the reason takes the full width
37 under the row.
37 under the row. The capacity page's rows (`/settings/capacity`) carry it beside the key, in the row's title, so a row's reason is said once and its help follows as the row's own text.
3838
3939 ## Labels
4040
docs/features/capacity.md +8
@@ -7,3 +7,11 @@ A capacity count (`crew.concurrency`, `checks.concurrency`, `queue.depth` and th
77 - **The pace sentence** (Home, the terminal dashboard and Usage → Spend) says "Crew concurrency is set to X, below its ceiling of Y" while `crew.concurrency` is lowered, so the cap is not mistaken for pacing.
88
99 **Reset:** the row's **Put back** button is the reset. It is one same-origin POST to `/settings/capacity` with `reset=1`, it takes effect on the next pick, and it is logged under Changes like any other capacity change.
10
11 ## Why each setting is there
12
13 Every capacity setting carries a required one-sentence `reason` (`CAPACITY` in
14 `src/core/capacity.ts`; `test/settings-reasons.test.ts` fails without one, and
15 holds the limits on `/admin/limits` to the same). `/settings/capacity` shows it
16 first on each row, and the terminal's Capacity screen shows it as a muted line
17 under the row.
src/actions/capacity.ts +2
@@ -56,6 +56,7 @@ export const SETTABLE_CAPACITY = [
5656 export interface CapacityRow {
5757 readonly key: CapacityKey;
5858 readonly label: string;
59 readonly reason: string;
5960 readonly help: string;
6061 readonly value: string;
6162 /** Where `value` comes from: an admin's setting, or the boot default. */
@@ -145,6 +146,7 @@ function capacityRow(db: Database, key: CapacityKey, row: StoredRow | undefined)
145146 return {
146147 key,
147148 label: CAPACITY[key].label,
149 reason: CAPACITY[key].reason,
148150 help: CAPACITY[key].help,
149151 value: derived ? effectiveCapacity(db, key) : (stored ?? boot),
150152 source: derived ? "derived" : stored === undefined ? "default" : "setting",
src/core/capacity.ts +21 −1
@@ -51,6 +51,8 @@ interface Definition {
5151 readonly fallback: string;
5252 /** The default from the pod's CPUs, in place of `fallback` (#2549). */
5353 readonly sized?: (cpus: number) => number;
54 /** One sentence: why the setting is there. Required; a test fails without it. */
55 readonly reason: string;
5456 readonly help: string;
5557 }
5658
@@ -60,6 +62,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
6062 env: "FORGE_CREW_CONCURRENCY",
6163 kind: { type: "count", min: 1, max: 16 },
6264 fallback: "2",
65 reason: "The crew shares one machine; more runs at once slow every run and every page.",
6366 help: "How many agent runs go at once. Empty: one per 3 GiB of memory above the forge's own 2 GiB, from the pod's limit, at least 2 and at most 16. Lowering it lets running ones finish; the next one waits.",
6467 },
6568 "checks.concurrency": {
@@ -68,6 +71,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
6871 kind: { type: "count", min: 1, max: 16 },
6972 fallback: "1",
7073 sized: (cpus) => checksForCpus(cpus),
74 reason: "A check runs a whole test suite; more at once starve the web process of CPU.",
7175 help: "How many repository checks run at once. Lowering it lets running ones finish; the next one waits. Empty: the pod's CPUs over three per shard (shards × 3), from 1 to 16 — 80 CPUs give 6.",
7276 },
7377 "checks.shards": {
@@ -76,6 +80,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
7680 kind: { type: "count", min: 1, max: 32 },
7781 fallback: "1",
7882 sized: (cpus) => shardsForCpus(cpus),
83 reason: "Shards cut a check's wall time, but each one is another process on the same CPUs.",
7984 help: "How many parallel shards a check's test run uses (handed to checks and crew shells as FORGE_CHECK_SHARDS). Empty: the pod's CPUs, at most 4 — and, in a check, no more than its cell holds.",
8085 },
8186 "queue.depth": {
@@ -83,6 +88,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
8388 env: "FORGE_QUEUE_DEPTH",
8489 kind: { type: "count", min: 1, max: 4 },
8590 fallback: "2",
91 reason: "Gating on top of the one before lets pulls land back to back, but every gate holds a check slot.",
8692 help: "How many merge-queue candidates of one repository gate at once, each on top of the one before: while one gates on main the next gates on it, and lands right after it if both are green. Derived from Speed (half of it rounded up, 1 to 4), read-only; FORGE_QUEUE_DEPTH is ignored. A gate beyond the first takes a free check slot only, never one of the two kept for pull checks.",
8793 },
8894 "queue.batch": {
@@ -90,6 +96,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
9096 env: "FORGE_QUEUE_BATCH",
9197 kind: { type: "count", min: 1, max: 32 },
9298 fallback: "8",
99 reason: "A bigger batch lands more per green gate, but a red one costs more gates to find its culprit.",
93100 help: "The most pulls one merge-queue candidate carries. A bigger batch lands more pulls per green gate; a red one costs more search gates to find its culprit (one bad pull in 16 is found in two rounds, at most √16 = 4 gates each). The queue starts each line here, halves the batch after a red gate and doubles it back after two green gates in a row, never past this. Read on every sweep.",
94101 },
95102 "week.use": {
@@ -97,6 +104,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
97104 env: "FORGE_WEEK_USE",
98105 kind: { type: "count", min: 10, max: 100 },
99106 fallback: "90",
107 reason: "The crew must not spend the whole week's subscription, or conversations and a person's own requests would wait.",
100108 help: "The weekly budget knob: the most of the week's subscription the crew may spend. The rest is kept for conversations and a person's own requests; the crew stops at it. Read on every pump.",
101109 },
102110 "children.max": {
@@ -104,6 +112,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
104112 env: "FORGE_CHILDREN_MAX",
105113 kind: { type: "count", min: 1, max: 1000 },
106114 fallback: "",
115 reason: "Every hosted forge holds memory and disk on this machine, so how many it holds has a top.",
107116 help: "How many hosted child forges this one holds at once. Empty: one per 512 MiB of memory above this forge's own 2 GiB, from the pod's limit. Raising it lets the New forge door open again at once.",
108117 },
109118 "children.awake": {
@@ -111,6 +120,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
111120 env: "FORGE_CHILD_AWAKE_MAX",
112121 kind: { type: "count", min: 1, max: 1000 },
113122 fallback: "8",
123 reason: "An awake forge costs resident memory; more of them than the machine holds would swap every page.",
114124 help: "How many hosted child forges run at once; a sleeping one does not count, and a new one counts from its birth. At the ceiling, the forge idle longest (no request under way, no crew at work) is put to sleep to make room, and a visitor is told the forge is full only when every awake forge is in use. Empty: one per 720 MiB of memory above this forge's own 2 GiB, from the pod's limit (an awake idle small forge costs about 490 MiB resident), at least 8. Read on every wake.",
115125 },
116126 "cells.egress": {
@@ -120,6 +130,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
120130 env: "",
121131 kind: { type: "choice", values: ["enforce", "report"] },
122132 fallback: "enforce",
133 reason: "Loosening what a cell may reach is a security decision, so it is an admin's, with a reason kept.",
123134 help: "enforce refuses a host an app or check did not declare; report lets it through on 80 and 443 and lists it on the app's page. Enforce unless an admin sets report here, with a reason. Takes effect on the next cell started.",
124135 },
125136 "cells.servingCores": {
@@ -128,13 +139,15 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
128139 kind: { type: "count", min: 0, max: 16 },
129140 fallback: "0",
130141 sized: (cpus) => servingCoresForCpus(cpus),
131 help: "Why: cells and checks busy on every core stall the forge's own serving thread, so pages wait. This many CPUs (the first ones this process may run on) are left to the forge alone; every cell and check is pinned to the rest (taskset), never more than half. 0 keeps none. Empty: none below 8 CPUs, else one per 16, 1 to 4. Without taskset nothing is pinned, and the log says so. Takes effect on the next cell started.",
142 reason: "Cells and checks busy on every core stall the forge's own serving thread, so pages wait.",
143 help: "This many CPUs (the first ones this process may run on) are left to the forge alone; every cell and check is pinned to the rest (taskset), never more than half. 0 keeps none. Empty: none below 8 CPUs, else one per 16, 1 to 4. Without taskset nothing is pinned, and the log says so. Takes effect on the next cell started.",
132144 },
133145 "children.modelEgress": {
134146 label: "Model provider a child forge cell may reach",
135147 env: "FORGE_CHILDREN_MODEL_EGRESS",
136148 kind: { type: "choice", values: ["off", "openrouter", "anthropic", "both"] },
137149 fallback: "off",
150 reason: "A child's cell reaches a model provider only when its crew needs one, never by default.",
138151 help: "off keeps a child forge's cell to its parent alone; openrouter also lets it reach openrouter.ai on 443, anthropic api.anthropic.com on 443, both the two, so the child's crew can call its model on the child's own key. Nothing else opens, and the cell enforces this even when cells.egress is report. Takes effect on the next child cell started.",
139152 },
140153 "children.registryEgress": {
@@ -142,6 +155,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
142155 env: "FORGE_CHILDREN_REGISTRY_EGRESS",
143156 kind: { type: "choice", values: ["off", "npm", "build"] },
144157 fallback: "off",
158 reason: "Package registries let a child's checks fill their install cache, so they are opened on purpose.",
145159 help: "off keeps a child forge's cell from the package registries, so its checks cannot fill their install cache; npm also lets it reach registry.npmjs.org on 443; build opens the hosts ordinary app builds fetch from, on 443 alone: npm and yarn, PyPI, GitHub (git dependencies and release tarballs), crates.io and the Go module proxy. Nothing else opens, and the cell enforces this even when cells.egress is report. Takes effect on the next child cell started.",
146160 },
147161 "children.paymentEgress": {
@@ -149,6 +163,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
149163 env: "FORGE_CHILDREN_PAYMENT_EGRESS",
150164 kind: { type: "choice", values: ["off", "stripe"] },
151165 fallback: "stripe",
166 reason: "An app built in a child forge can only take a payment if its cell may reach the payment provider.",
152167 help: "stripe lets a child forge's cell reach api.stripe.com on 443, so an app a customer builds there can take a payment; off closes it. Only an app whose forge.json egress names the host reaches it: an app that does not, and the child's crew sandbox, get none of it. Nothing else opens, and the cell enforces this even when cells.egress is report. Takes effect on the next child cell started.",
153168 },
154169 "children.originEgress": {
@@ -156,6 +171,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
156171 env: "FORGE_CHILDREN_ORIGIN_EGRESS",
157172 kind: { type: "choice", values: ["off", "git"] },
158173 fallback: "git",
174 reason: "A person connecting an origin or sending a change back needs the public git hosts, and nothing else.",
159175 help: "git lets a child forge's cell reach, on 443 alone, github.com, api.github.com, codeload.github.com, gitlab.com, codeberg.org and bitbucket.org, this forge's own host, and the forges this forge holds beside it and their apps (one name ending in --<this forge's host>), so a person can connect an origin, mirror a repository they already have, and send a change back; off keeps it from all of them. No other name under this forge's domain opens, and nothing else does. It reaches a running forge at once. The switch, the other names a hosted forge may reach and what each one asked for are on Settings, Hosted forges (/settings/hosted-forges#reach).",
160176 },
161177 "children.ownFilesystem": {
@@ -164,6 +180,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
164180 env: "",
165181 kind: { type: "choice", values: ["off", "on"] },
166182 fallback: "off",
183 reason: "A child that fills a shared disk takes the forge and its siblings down with it.",
167184 help: "on refuses to start a child forge whose data directory (<data>/children/<id>) is not a filesystem of its own, so no child can fill the disk this forge and its other children share; the refusal names the child and says why. off starts it on the shared disk, held only by its cell's disk watch. Off by default, because a forge mounts nothing itself: turn it on once the platform mounts one per child. A child already running is not stopped. Read on every start.",
168185 },
169186 "guard_new_accounts": {
@@ -171,6 +188,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
171188 env: "FORGE_GUARD_NEW_ACCOUNTS",
172189 kind: { type: "choice", values: ["on", "off"] },
173190 fallback: "off",
191 reason: "Fresh accounts are where spam and abuse start, so repository creation can wait for a week.",
174192 help: "on refuses repository creation and forks for accounts younger than 7 days (agents and admins are exempt); off leaves it to the usual permissions. Takes effect immediately. Replaces the hand-installed database trigger that used to do this with no toggle.",
175193 },
176194 "signin.edge": {
@@ -178,6 +196,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
178196 env: "FORGE_SIGNIN_EDGE",
179197 kind: { type: "choice", values: ["on", "off"] },
180198 fallback: "on",
199 reason: "Trusting the platform edge's identity headers is a choice about who vouches for a person, so it can be switched off.",
181200 help: "on reads the platform edge's identity headers (when the forge has an edge secret) and offers its sign-in; off ignores them on every door, so people sign in with the forge's own methods — password and passkey. Accounts the edge made keep their names but have no password until they set one. Takes effect on the next request.",
182201 },
183202 "pace.floor": {
@@ -185,6 +204,7 @@ export const CAPACITY: Record<CapacityKey, Definition> = {
185204 env: "FORGE_PACE_FLOOR",
186205 kind: { type: "count", min: 1, max: 16 },
187206 fallback: "2",
207 reason: "Reviews and assigned work are a person waiting, so the pace never slows them to nothing.",
188208 help: "While the week's pace allows any slots, this many reviews and issues a person assigned may run at once, apart from the crew's own picks, however hard the pace slows them; also the fewest slots a fast burn slows a repository to. At the reserve's wall everything waits. Derived from Speed (half of it, at least 1), read-only; FORGE_PACE_FLOOR is ignored; read on every pump.",
189209 },
190210 };
src/tui/screens/capacity.ts +1
@@ -67,6 +67,7 @@ export function capacityScreen(f: Session, ctx: Ctx): Screen {
6767 return {
6868 title: `${r.label} (${r.key})`,
6969 meta: `${shown(r.value)} · ${r.source === "derived" ? "derived from Speed" : r.source} · takes ${boundsOf(r.key)}${r.source === "setting" ? ` · default ${shown(r.default)}` : ""}${low === null ? "" : ` · below ceiling ${low.ceiling}`}`,
70 note: r.reason,
7071 ...(low === null ? {} : { tone: "attn" as const }),
7172 };
7273 });
src/web/pages/capacity.ts +4 −3
@@ -18,6 +18,7 @@ import { field, readForm } from "../form.ts";
1818 import { html, when, type Html } from "../html.ts";
1919 import { flashTo } from "../layout.ts";
2020 import { badge, btn, row, time } from "../ui.ts";
21 import { why } from "../setting_line.ts";
2122 import { usageShell } from "./usage-tabs.ts";
2223 import { REACH_SETTINGS } from "../../actions/child_reach.ts";
2324
@@ -96,18 +97,18 @@ export function capacityPage(ctx: Ctx): Response {
9697 // It lives where a person looks for it now; this row says where, and holds no second control.
9798 if (s.key === "children.originEgress")
9899 return row({
99 title: html`<span id="children-origin-egress">${s.label}</span> <span class="muted small mono">${s.key}</span>`,
100 title: html`<span id="children-origin-egress">${s.label}</span> <span class="muted small mono">${s.key}</span> ${why(`cap-${s.key}`, s.reason)}`,
100101 meta: html`Now <span class="mono">${s.value === "git" ? "on" : "off"}</span>. This moved to
101102 <a href="${REACH_SETTINGS}">Settings, Hosted forges</a>, with the other names a hosted forge may reach and what each one asked for.`,
102103 trail: btn("Open it there", { href: REACH_SETTINGS, size: "sm" }),
103104 });
104105 const low = belowCeiling(ctx.app.db, s.key);
105106 return row({
106 title: html`${s.label} <span class="muted small mono">${s.key}</span>${when(
107 title: html`${s.label} <span class="muted small mono">${s.key}</span> ${why(`cap-${s.key}`, s.reason)}${when(
107108 low !== null,
108109 () => html` ${badge(`below ceiling ${low?.ceiling}`, { tone: "attn" })}`,
109110 )}`,
outdated

Principle 1 and 7: .reason has no style and is not in docs/design/areas/settings.md, where .why already holds a setting's reason. Use the named component. Do not chain reason and help with <br />; the page says the same thing twice.

110 meta: html`${s.help} <br />Now <span class="mono">${s.value === "" ? "auto" : s.value}</span>. ${s.source === "setting"
111 meta: html`${s.help} Now <span class="mono">${s.value === "" ? "auto" : s.value}</span>. ${s.source === "setting"
111112 ? html`Set here; the boot default is
112113 <span class="mono">${s.default === "" ? "auto" : s.default}</span>${s.env === ""
113114 ? "."
test/serving-cores.test.ts +1 −1
@@ -56,7 +56,7 @@ test("cells always keep at least half the cores", () => {
5656
5757 test("the default keeps none below 8 CPUs, one per 16 above, at most 4", () => {
5858 expect([1, 4, 7, 8, 16, 32, 64, 80, 256].map(servingCoresForCpus)).toEqual([0, 0, 0, 1, 1, 2, 4, 4, 4]);
59 expect(CAPACITY["cells.servingCores"].help).toStartWith("Why:");
59 expect(CAPACITY["cells.servingCores"].reason.length).toBeGreaterThan(0);
6060 });
6161
6262 test("the reserve is read from the forge's setting on every cell, 0 when unreadable", () => {
test/settings-reasons.test.ts added +90
@@ -0,0 +1,90 @@
1 /**
2 * Every setting row carries its reason (#14071): a registry entry without one fails the suite, and
3 * the page shows it.
4 */
5 import { afterAll, beforeAll, describe, expect, test } from "bun:test";
6 import { mkdtemp, rm } from "node:fs/promises";
7 import { tmpdir } from "node:os";
8 import { join } from "node:path";
9 import { createApp, type App } from "../src/app.ts";
10 import { CAPACITY, CAPACITY_KEYS } from "../src/core/capacity.ts";
11 import { createUser } from "../src/core/users.ts";
12 import { createForgeApp } from "../src/tui/forge.ts";
13 import { capacityScreen } from "../src/tui/screens/capacity.ts";
14 import { headlessTerminal } from "../src/tui/term/terminal.ts";
15 import { settleApp } from "./helpers/tui.ts";
16 import { serve, type Servers } from "../src/http/server.ts";
17 import { LIMITS, type LimitKey } from "../src/settings/limits.ts";
18 import { seedAdmin } from "./helpers/admin.ts";
19
20 const esc = (s: string): string => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
21 const sentence = (s: unknown): boolean => typeof s === "string" && s.trim().length >= 20 && /[.!?]$/.test(s.trim());
22
23 describe("the registries", () => {
24 test("every limit has a one-sentence reason", () => {
25 for (const key of Object.keys(LIMITS) as LimitKey[]) expect([key, sentence(LIMITS[key].reason)]).toEqual([key, true]);
26 });
27 test("every capacity setting has a one-sentence reason", () => {
28 expect(CAPACITY_KEYS.length).toBeGreaterThan(0);
29 for (const key of CAPACITY_KEYS) expect([key, sentence(CAPACITY[key].reason)]).toEqual([key, true]);
30 });
31 });
32
33 describe("the capacity page", () => {
34 let dataDir = "";
35 let app: App, servers: Servers, bearer = "";
36 beforeAll(async () => {
37 dataDir = await mkdtemp(join(tmpdir(), "forge-reasons-"));
38 app = createApp({ dataDir, port: 0 });
39 servers = await serve(app);
40 const admin = await seedAdmin(app, { username: "alice", email: "[email protected]", password: "correct-horse-battery" });
41 if (!admin.ok) throw new Error(admin.error);
42 const minted = await fetch(`${servers.url}/api/v1/tokens`, {
43 method: "POST",
44 headers: { "content-type": "application/json" },
45 body: JSON.stringify({ adminConfirm: true, username: "alice", password: "correct-horse-battery", name: "cli", scope: "admin" }),
46 });
47 bearer = ((await minted.json()) as { token: string }).token;
48 });
49 afterAll(async () => {
50 servers.stop();
51 app.close();
52 await rm(dataDir, { recursive: true, force: true });
53 });
54
55 test("shows each setting's reason in its row, the pointer row too", async () => {
56 const res = await fetch(`${servers.url}/settings/capacity`, { headers: { authorization: `Bearer ${bearer}` } });
outdated

The skip for children.originEgress leaves a row without a reason on the page. Give that row a reason and remove the skip.

57 expect(res.status).toBe(200);
58 const body = await res.text();
59 for (const key of CAPACITY_KEYS) {
60 const at = body.indexOf(`<details class="hint why" id="why-cap-${key}">`);
61 expect([key, at > -1]).toEqual([key, true]);
62 expect([key, body.indexOf(`<p>${esc(CAPACITY[key].reason)}</p>`, at) > -1]).toEqual([key, true]);
63 }
64 });
65 });
outdated

This greps source text. Render the screen headlessly and assert the reason shows on screen; the test must fail if the row stops rendering it.

66
67 describe("the terminal", () => {
68 test("shows each capacity setting's reason on the rendered screen", async () => {
69 const dir = await mkdtemp(join(tmpdir(), "forge-reasons-tui-"));
70 const tuiApp = createApp({ dataDir: dir, port: 0 });
71 try {
72 const made = await createUser(tuiApp.db, { origin: "seed", trusted: true, username: "carol", email: "[email protected]", password: "a-good-passphrase", adminIfFirst: true });
73 if (!made.ok) throw new Error(made.error);
74 const identity = { sshUsername: "carol", remoteAddress: "127.0.0.1", fingerprint: "SHA256:test", user: made.value };
75 const { app: tui, session } = createForgeApp(tuiApp, identity, { terminal: headlessTerminal(300, 200), exitHooks: false });
76 tui.start();
77 tui.ctx.push(capacityScreen(session, tui.ctx));
78 await settleApp(tui);
79 const screen = tui.screen.toText().replace(/\s+/g, " ");
80 for (const key of CAPACITY_KEYS) {
81 const reason = CAPACITY[key].reason.replace(/\s+/g, " ");
82 expect([key, screen.includes(reason)]).toEqual([key, true]);
83 }
84 tui.stop?.();
85 } finally {
86 tuiApp.close();
87 await rm(dir, { recursive: true, force: true });
88 }
89 });
90 });
test/tui-capacity.test.ts +1 −1
@@ -32,7 +32,7 @@ let bot: User;
3232 const identity = (user?: User) => ({ sshUsername: user?.username ?? "git", remoteAddress: "127.0.0.1", fingerprint: "SHA256:test", user });
3333 const crew = () => capacityValue(app.db, "crew.concurrency");
3434
35 function boot(user: User, rows = 40) {
35 function boot(user: User, rows = 60) {
3636 const { app: tui, session } = createForgeApp(app, identity(user), { terminal: headlessTerminal(140, rows), exitHooks: false });
3737 tui.start();
3838 tui.ctx.push(capacityScreen(session, tui.ctx));

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs