Use US English spelling throughout and check it in npm test

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-26 06:36:46 -07:00
1 parent e67aaabdce
commit 899b3a48d8
84 files changed
+319 -240

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ port, and the filesystem as transport; this CLI is the whole agent surface.
A bounded wait slice, sized below your shell timeout. Exit 0 = the
result is on stdout, 10 = still waiting ("Waiting on your answer
in the web console"; call again), 20 = server gone (open --resume
<sid>), 30 = cancelled. Exits 0 and 10 carry terminalLine.
<sid>), 30 = canceled. Exits 0 and 10 carry terminalLine.
Exit 0 may carry "chat" (Quick questions); with no card send it
is type: "chat" and actions is empty. Exit 0 may also carry
"workspace" (changes since you last heard, each once, with a
+1 -1
View File
@@ -73,7 +73,7 @@ export function useCli(cli) {
// PLAN2CODE_CONSOLE_TRACE=1 prints where the time goes, to stderr: the
// start path is what stands between someone and their first look at the page,
// and it is only worth optimising with numbers in hand.
// and it is only worth optimizing with numbers in hand.
const TRACE = Boolean(process.env.PLAN2CODE_CONSOLE_TRACE);
function trace(what) {
if (TRACE) process.stderr.write(`trace ${Math.round(performance.now())}ms ${what}\n`);
+2 -2
View File
@@ -50,9 +50,9 @@ first, and post before anything slow.
`state.scan` is `{ hasAgents, isGit, pending, specs: [{ dir, name, state, detail, touched }], handoffs, handoffsDir }`,
a snapshot of the last `open` (a spec created mid-session appears the next time
the session resumes as a dashboard). `pending` is how many files a commit would
take (`null` when git cannot say): the Git card never greys out, shows the count
take (`null` when git cannot say): the Git card never grays out, shows the count
when there is one, and outside a repository says Git can start one. The picker
greys the cards that do not fit the selected spec — or hides them, while the
grays the cards that do not fit the selected spec — or hides them, while the
**Hide unavailable workflows** switch under it is on (the default).
The `menu` you post (`note`, `recommend`, `details`) describes the initially
+1 -1
View File
@@ -59,7 +59,7 @@ export class NotepadError extends Error {
/* ------------------------------------------------------------------ names */
// `<folder-name>-<first 12 hex of sha256(foldKey(folder))>`: recognisable in a
// `<folder-name>-<first 12 hex of sha256(foldKey(folder))>`: recognizable in a
// file browser, safe on every OS, and one notepad per folder however its case
// is typed where the file system ignores case.
export function notepadKey(folder) {
+4 -4
View File
@@ -64,7 +64,7 @@ answer. `__git` names no question, like `__stop`.
| `plan` says | On the page |
| --- | --- |
| `confirm` | A `confirm` card with its `title`, `body`, `danger` and `consequences` verbatim (the consequences end with the exact command). Where the plan names files, add them as `files: [{ "path", "state" }]`. |
| `card.kind: "switch"` | A `choice`, "Bring your changes?": exactly the `options` given, labelled **Switch and bring them** (`bring`), **Commit first** (`commit-first`), **Cancel** (`cancel`); the files in `body`, and `reason` when git would refuse (then there is no `bring`). `allowOther: false`. |
| `card.kind: "switch"` | A `choice`, "Bring your changes?": exactly the `options` given, labeled **Switch and bring them** (`bring`), **Commit first** (`commit-first`), **Cancel** (`cancel`); the files in `body`, and `reason` when git would refuse (then there is no `bring`). `allowOther: false`. |
| `card.kind: "dirty"` | The same `choice` for a pull that needs a clean tree: **Commit first** / **Cancel**, `reason` in `body`. |
| `card.kind: "remote"` | A `choice`, "Publish to which remote?": one option per remote, `preset` recommended. Then `plan publish --remote <it>` and its `confirm`. |
| `ask: false` | No card: run it on the click. |
@@ -109,9 +109,9 @@ after each commit step (N commits made), and `run: { "event": "git-conflict",
"id": "conflict-<n>" }` once per conflict help, resolved or aborted.
**Finishing** (`console-finish.md`). **Done with git** (`op: "done"`). A `done`
that arrives while one of your cards is still open is the person cancelling it:
record that card as cancelled (`{ "items": [{ "id": "<id>", "status":
"answered", "answer": { "text": "Cancelled by Done with git" } }] }`, not
that arrives while one of your cards is still open is the person canceling it:
record that card as canceled (`{ "items": [{ "id": "<id>", "status":
"answered", "answer": { "text": "Canceled by Done with git" } }] }`, not
`settle`, which refuses a card nothing was sent to) in the same post as the
finish, or, with nothing done, before resuming as the dashboard. Never run what
the card was asking for. With something done this session: a `finish` with a
+1 -1
View File
@@ -8,7 +8,7 @@
import { spawn } from "node:child_process";
/** The link to open, normalised, or null when it is not a plain http or https link. */
/** The link to open, normalized, or null when it is not a plain http or https link. */
export function linkToOpen(raw) {
if (typeof raw !== "string" || raw.length > 4096) return null;
let url;
+1 -1
View File
@@ -249,7 +249,7 @@ export function pickerCommand(start, prompt) {
* Show the picker and settle on what the person did: `{ path }` for a pick,
* `{ cancelled: true }` when they closed it, `{ error }` when the picker
* itself failed or this OS has none. Pickers exit 0 or 1 with nothing printed
* when cancelled.
* when canceled.
*/
export function pickFolder(start, prompt, { spawnImpl = spawn } = {}) {
const picker = pickerCommand(start, prompt);
+4 -4
View File
@@ -244,7 +244,7 @@ export function suggestionFrom(item) {
if (!raw) return "";
const stripped = raw.replace(EXAMPLE_LEAD, "").trim();
if (!stripped) return "";
// Recapitalise only when a lead-in was actually removed, and never on a
// Recapitalize only when a lead-in was actually removed, and never on a
// field with a shape to match: "audit-export" must not become "Audit-export".
if (stripped !== raw && !item.pattern && /^[a-z]/.test(stripped)) {
return stripped[0].toUpperCase() + stripped.slice(1);
@@ -358,7 +358,7 @@ export function stopAction({ handoff } = {}) {
* answers into the files, and a request landing then is how a question ends up
* half recorded. `waiting` is the caller's "the agent is working or a reply is
* owed, and it has not gone adrift" -- an agent that has stopped checking in
* never replies, and a button greyed out forever would lock the person in. An
* never replies, and a button grayed out forever would lock the person in. An
* uncollected send still blocks even then, because the server takes one at a
* time.
*/
@@ -665,7 +665,7 @@ export function dashNoteKind({ menu, hasMenu, onInitial, working }) {
* availability — but its folder still goes along on a Pathfinder or Plan
* launch, since the files may be reference docs.
*
* Returns { on, reason?, note?, next? } — `reason` is the one line a greyed card
* Returns { on, reason?, note?, next? } — `reason` is the one line a grayed card
* shows, `note` the one line a clickable card shows when there is something to
* know before launching it, `next` marks the state's natural step. `lookup` is
* stateFor unless a test hands in its own table.
@@ -681,7 +681,7 @@ export function cardAvailability(entry, scan, sel, lookup = stateFor) {
if (entry.skill === "plan2code-init") return hasAgents ? off(rule.greyed.default) : ON;
if (entry.skill === "plan2code-init-update") return hasAgents ? ON : off(rule.greyed.default);
if (entry.skill === "plan2code-git") {
// Never greyed: a clean tree still has branches to switch, pull and push.
// Never grayed: a clean tree still has branches to switch, pull and push.
if (scan && scan.isGit === false) return { on: true, note: GIT_INIT_NOTE };
if (scan && Number.isInteger(scan.pending) && scan.pending > 0) return { on: true, note: pendingNote(scan.pending) };
return ON;
+2 -2
View File
@@ -1,4 +1,4 @@
// Planny's wake-up on a freshly opened dashboard: he sits powered down centre
// Planny's wake-up on a freshly opened dashboard: he sits powered down center
// stage until the first click or key, gets nudged awake (he rocks side to side
// for one snore), then about five seconds of him powering on, then a glide
// into the rail as the menu comes in.
@@ -68,7 +68,7 @@ export function playWake({ stage, bot, target, skipEl, stir, onStart, onGlide, o
// between the two top-left corners and the scale is the width ratio.
// The target's own box, not its bounding rect: the rail's Planny is
// usually tilted mid-flight, and a tilted box measures wider than he
// is. Centred on the rect, which the tilt barely moves.
// is. Centered on the rect, which the tilt barely moves.
const from = bot.getBoundingClientRect();
const rect = target.getBoundingClientRect();
const w = target.clientWidth || rect.width;
+1 -1
View File
@@ -147,7 +147,7 @@ const ABOUT_HISTORY = 3;
*
* The tracker is `{ history, about }`; each entry and `about` are
* `{ kind, id, label }` (`about` may be null), in the exact shape POST /chat
* takes. An old `{ about, frozen, dropped }` tracker normalises to an empty
* takes. An old `{ about, frozen, dropped }` tracker normalizes to an empty
* history.
*/
export function nextAbout(prev, event) {
+2 -2
View File
@@ -12,7 +12,7 @@
// className, id, type, value, checked, disabled, textContent, placeholder,
// title, open, href, target, rel, tabIndex. Text runs are h.el("span", null, text).
//
// Every button, input and select is made through control(), which greys it
// Every button, input and select is made through control(), which grays it
// out whenever controlAllowed(mode, role) says no and stamps data-gate with
// its role; one disabled for a reason of the view's own also carries
// data-own. The guard test in scripts/test-web-console-git-board.mjs holds
@@ -64,7 +64,7 @@ function control(ctx, tag, className, label, { role = "action", onClick, onInput
return node;
}
// A copy button is a control like any other: greyed while busy.
// A copy button is a control like any other: grayed while busy.
function copy(ctx, text, cls, codeEl) {
const b = ctx.h.copyButton(text, cls, codeEl);
b.setAttribute("data-gate", "action");
+1 -1
View File
@@ -194,7 +194,7 @@ const button = (shown, enabled, label, title) => ({ shown, enabled: shown && ena
/**
* Every board button as `{ shown, enabled, label, title? }`. Pull is enabled
* only with an upstream to pull from; Push shows with an upstream, Publish
* without one. `busy` greys everything out but Done; an operation in
* without one. `busy` grays everything out but Done; an operation in
* progress hides everything but Done (its banner carries Abort / Continue).
*/
export function boardActions(git, { busy = false } = {}) {
+2 -2
View File
@@ -7,11 +7,11 @@
// that reads and writes the user's files and holds the session cookie. Script
// running here could post arbitrary answers back to the agent, which would then
// act on them with the agent's full tool permissions. And the markdown is only
// nominally agent-authored: in practice the agent is summarising a dependency
// nominally agent-authored: in practice the agent is summarizing a dependency
// README, a scraped page, a PR description, a log. Treat it as hostile.
//
// Building nodes rather than parsing a string makes injection structurally
// impossible instead of filtered, so there is nothing for a sanitiser bypass to
// impossible instead of filtered, so there is nothing for a sanitizer bypass to
// bypass. `html` tokens render as visible text, on purpose.
import { marked } from "./vendor/marked.esm.js";
+3 -3
View File
@@ -245,7 +245,7 @@ export function buildPager(item) {
// Once this question is answered, the step is the next unanswered one, not
// Send. Send lighting up the moment a single answer is staged pulls people
// into sending one question at a time, which is three round trips where the
// workflow wanted one. So the emphasis moves to whichever neighbour still
// workflow wanted one. So the emphasis moves to whichever neighbor still
// needs them, and Send goes quiet until nothing does.
const here = Boolean(page.local.staged[item.id]);
const nextT = open[at + 1];
@@ -257,7 +257,7 @@ export function buildPager(item) {
const leadNext = here && needs(nextT);
const leadPrev = here && !leadNext && needs(prevT);
// An end of the queue is an empty slot, not a disabled button. A greyed
// An end of the queue is an empty slot, not a disabled button. A grayed
// "Previous" pointing at nothing is a control that exists only to say no.
const mk = (target, back, lead) => {
if (!target) return el("span", "pager-slot");
@@ -1348,7 +1348,7 @@ function buildList(card, item, staged) {
// over the array from render time. A reorder replaces that array, so a stale
// closure would quietly undo the reorder the next time a rename committed.
// A name still being typed counts too: the tool buttons below keep the
// field's focus (their mousedown is cancelled), so its `change` has not
// field's focus (their mousedown is canceled), so its `change` has not
// fired yet when they act, and the re-render would otherwise drop it.
const ul = el("ul", "rows");
const baseRows = () => {
+2 -2
View File
@@ -225,7 +225,7 @@ export function renderDashboard(main) {
if (!page.local.launching && !page.launchScoping && wantScope !== page.scopeMine) hooks.syncWorkspaceScope();
// "Unavailable" is the scan's verdict for the selected spec, not the
// momentary greying while a launch is in flight or the server is away, so
// momentary graying while a launch is in flight or the server is away, so
// cards never blink out of the menu mid-handoff.
const hide = looks.hideUnavailable;
const sel = selSpec();
@@ -640,7 +640,7 @@ function dashCard(entry, menu) {
const presentation = cardPresentation(entry, scan(), selSpec(), menu);
// The agent's `recommend` and detail describe the initially selected spec.
// Other picker choices derive both from the scan, so stale context never
// follows a person to a different spec or to "start from scratch". A greyed
// follows a person to a different spec or to "start from scratch". A grayed
// recommendation also yields to the selected spec's actual next step.
const going = page.local.launching && (page.local.launching.skill === entry.skill || page.local.launching.skill === entry.review);
const b = el(
+1 -1
View File
@@ -333,7 +333,7 @@ async function reorder(order, focus) {
}
// A tab is no longer there (deleted here, or from another page): off the bar,
// its unsaved text dropped without a save, and its neighbour on screen.
// its unsaved text dropped without a save, and its neighbor on screen.
async function gone(id, index = tabs.findIndex((t) => t.id === id), announce = true) {
const here = id === activeId;
if (here || id === saveTab) discard();
+1 -1
View File
@@ -21,7 +21,7 @@ const LAUNCH_QUIPS = [
let launchTicker = null;
// Planny flies centre stage: the same drawing as the dock's, cloned so the
// Planny flies center stage: the same drawing as the dock's, cloned so the
// markup stays the single source of him, and the same sky the dock fills.
function flightStage() {
const stage = el("div", "launch-stage");
+1 -1
View File
@@ -33,7 +33,7 @@
// always on whatever is picked; null for no card
// marksNext the card can be a state's natural next step, so its answer
// always says whether it is (`next`)
// greyed its greyed reasons: `default`, plus one per state whose
// greyed (the field keeps its old spelling) its grayed reasons: `default`, plus one per state whose
// wording differs, and `finished` for any finished state
// (spec-states.js); Init and Init update use `default` for the
// AGENTS.md check, which is a rule on the scan, not on the spec
+2 -2
View File
@@ -2,7 +2,7 @@
//
// Each spec state the dashboard scan can report; data only, imported by the
// page and by Node. In the order the scan's SPEC_STATES lists them. Which
// cards a state lights or greys lives on the skill list (skills.js), and how
// cards a state lights or grays lives on the skill list (skills.js), and how
// a folder's files map to a state stays with the scan (classifySpec in
// scan.mjs). No imports and no DOM access: nothing runs at load but building
// the frozen data.
@@ -14,7 +14,7 @@
// null when it has none
// finished the work is done: the spec is hidden while unavailable
// workflows are, never the picker's default, deleted after one
// confirm, and greyed with the card's `finished` reason
// confirm, and grayed with the card's `finished` reason
// (skills.js) on the cards that would otherwise take it
function state(label, next, finished = false) {
+4 -4
View File
@@ -51,7 +51,7 @@ export const TEMPLATES = Object.freeze({
"The engineers who will build and review it.",
"",
"## What it should pin down",
"The behaviour, the parts of the code it touches, the interfaces between them, the simpler options we're turning down, and how we'll know it works.",
"The behavior, the parts of the code it touches, the interfaces between them, the simpler options we're turning down, and how we'll know it works.",
"",
"## Out of scope",
"[what this deliberately won't do]",
@@ -181,7 +181,7 @@ export const TEMPLATES = Object.freeze({
"[the screen or component]",
"",
"## What looks or feels off",
"[spacing, alignment, colour, states, small screens]",
"[spacing, alignment, color, states, small screens]",
"",
"## What good looks like",
"[a reference, screenshot or description]",
@@ -204,7 +204,7 @@ export const TEMPLATES = Object.freeze({
]),
"add-a-test": template("add-a-test", "Add a test", [
"## Add a test",
"[the function, behaviour or bug]",
"[the function, behavior or bug]",
"",
"## Cases to cover",
"- [the normal case]",
@@ -234,7 +234,7 @@ export const TEMPLATES = Object.freeze({
"## Why now",
"[what the current shape makes hard]",
"",
"## Behaviour that must not change",
"## Behavior that must not change",
"[the public API, outputs or tests that must stay the same]",
"",
"## Done when",
+1 -1
View File
@@ -33,7 +33,7 @@
padding: 18px 22px;
display: flex; flex-direction: column; gap: 10px;
}
/* An empty conversation's starter questions, centred where the list is empty. */
/* An empty conversation's starter questions, centered where the list is empty. */
.ask-starters { display: flex; flex-direction: column; gap: 6px; margin: auto 0; width: 100%; max-width: 520px; align-self: center; }
.ask-starters-lead { color: var(--ink-3); font-size: 13.5px; margin: 0 0 4px; text-align: center; }
.ask-starter {
+6 -6
View File
@@ -26,7 +26,7 @@
font-size: 14px;
}
.dash-nudge-text { flex: 1 1 16em; }
/* The session meter at red: the same slot, in the careful colour. */
/* The session meter at red: the same slot, in the careful color. */
.dash-nudge.meter-banner {
background: var(--warn-soft);
border-color: var(--warn);
@@ -57,7 +57,7 @@
cursor: pointer;
}
.update-banner-open:hover { text-decoration: underline; }
/* Pinned to the right edge, out of the flow, so the label centres on the
/* Pinned to the right edge, out of the flow, so the label centers on the
whole banner rather than on what the × leaves of it. */
.update-banner-dismiss {
position: absolute;
@@ -239,7 +239,7 @@
.dash-card-go { color: var(--accent); font-weight: 700; transition: transform 0.15s ease; }
.dash-card:hover:not(:disabled) .dash-card-go { transform: translateX(3px); }
/* The reason a card is off. The card greys via :disabled; this line is why,
/* The reason a card is off. The card grays via :disabled; this line is why,
so the menu teaches the pipeline instead of just refusing clicks. */
.dash-card-off { font-size: 12px; color: var(--ink-3); font-style: italic; }
@@ -276,7 +276,7 @@
}
.spec-chip:not(.is-sel) .spec-chip-state { color: var(--ink-3); }
.spec-chip-detail { font-size: 11.5px; color: var(--ink-3); }
/* A handoff in the picker: the same lozenge, dashed, in the stage colour. */
/* A handoff in the picker: the same lozenge, dashed, in the stage color. */
.spec-chip.is-handoff { border-style: dashed; }
.spec-chip.is-handoff .spec-chip-state, .spec-chip.is-handoff:not(.is-sel) .spec-chip-state { color: var(--stage); }
.spec-chip.is-handoff.is-sel { border-style: solid; border-color: var(--stage); }
@@ -379,7 +379,7 @@
/* ------------------------------------------------- dashboard confirm */
/* The beat between "I clicked a card" and "it is running": what the pick is,
what it will do, and a START that means it. Narrower than the menu, centred
what it will do, and a START that means it. Narrower than the menu, centered
like the launching pane it precedes. */
.dash-confirm {
max-width: 560px;
@@ -448,7 +448,7 @@
mask-image: radial-gradient(120% 100% at 50% 40%, #000 42%, transparent 78%);
}
.launch-sky { opacity: 0.9; }
/* The dock only animates its stars while .is-flying; centre stage they are
/* The dock only animates its stars while .is-flying; center stage they are
the show, so the flight runs unconditionally. */
.launch-stage .sky .star { animation: star-fly var(--dur, 5s) linear var(--delay, 0s) infinite; }
+2 -2
View File
@@ -91,8 +91,8 @@
.presets-label { font-size: 12.5px; color: var(--ink-3); }
/* "Before you close this": three rows on every finished screen. The icon sits
in a coloured circle and the label says the same thing, so no meaning rests
on colour alone. */
in a colored circle and the label says the same thing, so no meaning rests
on color alone. */
.handoff-guide {
margin: 20px 0 0; padding: 14px 16px;
background: var(--panel-2); border: 1px solid var(--rule-2); border-radius: var(--radius);
+1 -1
View File
@@ -25,7 +25,7 @@
it does not stretch), so a note box grows with what is typed instead, where
the browser can, rather than scrolling inside a 96px box. */
.git-cards > .card textarea { field-sizing: content; max-height: 50vh; }
/* The card and the pager centre themselves with auto inline margins, and a
/* The card and the pager center themselves with auto inline margins, and a
grid item with auto margins shrinks to its content, so a short confirm sat
narrow in the middle of the board. In the slot both fill the board's width
instead; the slot's gap spaces them. */
+1 -1
View File
@@ -144,7 +144,7 @@
.help-mood-bot { width: 40px; height: 56px; }
.help-mood span { font-size: 12.5px; color: var(--ink-2); text-align: center; }
/* The travelling highlight on the flow diagrams: only on the visible panel,
/* The traveling highlight on the flow diagrams: only on the visible panel,
only while the dialog is open, and only when the system allows motion.
Otherwise the dashes simply sit still. */
@media (prefers-reduced-motion: no-preference) {
+1 -1
View File
@@ -101,7 +101,7 @@
/* The full-screen preview: the whole viewport, the picture contained in it,
on a near-black backdrop in both themes (a picture is judged against dark,
whatever the page's theme), so its colours are fixed, not tokens. */
whatever the page's theme), so its colors are fixed, not tokens. */
.modal.notepad-preview {
inset: 0;
width: 100vw;
+5 -5
View File
@@ -153,7 +153,7 @@
@keyframes foot-step-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.1px); } }
@keyframes foot-step-b { 0%, 100% { transform: translateY(-1.1px); } 50% { transform: translateY(0); } }
/* Something for you to do: star lit in the highlight colour, a wave. */
/* Something for you to do: star lit in the highlight color, a wave. */
.planny.is-point { animation: planny-lean 2.6s ease-in-out infinite; }
.planny.is-point .eye { fill: var(--accent); }
@@ -167,7 +167,7 @@
/* The server is up, but nothing is answering at the other end of it. Not the
faded, eye-shut `gone` look: this page is working perfectly, and the thing
that is not is somewhere else. Grey, still, and no arms: he has nothing to
that is not is somewhere else. Gray, still, and no arms: he has nothing to
do with them until someone answers. */
.planny.is-adrift .eye { fill: var(--ink-3); animation: none; }
.planny.is-adrift .smile { opacity: 0.6; }
@@ -178,7 +178,7 @@
.planny.is-done .eye { fill: var(--ok); animation: none; }
.planny.is-done .smile { stroke-width: 1.5; }
/* No server: faded, eye shut in the warning colour, arms hanging. */
/* No server: faded, eye shut in the warning color, arms hanging. */
.planny.is-gone { opacity: 0.5; }
.planny.is-gone .eye { fill: var(--warn); animation: none; transform: scaleY(0.12); }
@@ -293,13 +293,13 @@
/* ------------------------------------------------------------ wake-up
A freshly opened dashboard: Planny powers on centre stage, then glides
A freshly opened dashboard: Planny powers on center stage, then glides
into the rail (boot.js). Each beat is a keyframe on a delay under
`.booting`, one class for the whole run; the glide's target depends on
where the rail sits, so boot.js hands it over as --wake-glide. The layer
takes clicks so none lands on a card underneath while he wakes. */
.wake { position: fixed; inset: 0; z-index: 45; pointer-events: auto; }
/* Solid page colour behind the sleeping bot, following light/dark via --bg. */
/* Solid page color behind the sleeping bot, following light/dark via --bg. */
.wake::before { content: ""; position: absolute; inset: 0; background: var(--bg); }
.wake[hidden] { display: none; }
.wake-bot {
+6 -6
View File
@@ -2,7 +2,7 @@
/* ------------------------------------------------------------- banner */
/* A pill floated over the footer, centred on the bar. It used to be the top
/* A pill floated over the footer, centered on the bar. It used to be the top
grid row, and every time it appeared it pushed the whole page down a track;
overlaying it means the message lands without the layout moving under the
reader's cursor. It covers the footer's middle while it is up, which is
@@ -100,8 +100,8 @@
.ident { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
/* The session meter: a ring that fills with the points and a few words, in
the level's colour. Green, amber and red are the page's own done / staged /
careful colours, so both themes are covered by the variables. */
the level's color. Green, amber and red are the page's own done / staged /
careful colors, so both themes are covered by the variables. */
.meter-slot { position: relative; flex: none; align-self: center; }
.meter-pill {
--m: var(--ok);
@@ -478,8 +478,8 @@ h1 {
/* ------------------------------------------------------------- footer */
/* Three columns: summary, where, actions. Equal side tracks keep the middle
centred on the bar, and because they are tracks rather than an overlay, a
long summary wraps and a wide actions block nudges the centre over instead
centered on the bar, and because they are tracks rather than an overlay, a
long summary wraps and a wide actions block nudges the center over instead
of either running underneath it. The middle track gives way first: it can
shrink to an ellipsis, the summary and Send never do. */
.footer {
@@ -490,7 +490,7 @@ h1 {
}
.footer-summary { min-width: 200px; font-size: 13.5px; color: var(--ink-2); }
.footer-summary strong { color: var(--ink); }
/* Where this session is running: the workspace label, centred on the bar. A
/* Where this session is running: the workspace label, centered on the bar. A
click opens the Workspace dialog. The notification pill sits over the same
spot and covers it while it shows. */
.footer-where {
+2 -2
View File
@@ -1,4 +1,4 @@
/* tokens.css: Colours, type, sizes and the light and dark themes: the variables every other file reads. */
/* tokens.css: Colors, type, sizes and the light and dark themes: the variables every other file reads. */
/* Plan2Code Console.
Light by default, dark when the system asks. No external fonts: the page must
@@ -24,7 +24,7 @@
--warn: #9c3327;
--warn-soft: #fbe7e3;
--focus: #1f6feb;
/* Rank colours for low / mid / high badges (a helper's strength and effort). */
/* Rank colors for low / mid / high badges (a helper's strength and effort). */
--lvl-1: #23716a;
--lvl-1-soft: #e1f1ee;
--lvl-2: #9a6a12;
+3 -3
View File
@@ -11,7 +11,7 @@ import { SKILLS, subagentsFor } from "./skills.js";
// The skills that offer the switch, each with its instruction: an entry's
// `subagents` in skills.js is the one place a skill opts in (FR-1). Wording is
// behaviour-level and names no harness tool, so any agent can follow it or
// behavior-level and names no harness tool, so any agent can follow it or
// harmlessly ignore it.
export const SUBAGENT_WORKFLOWS = Object.freeze(
Object.fromEntries(
@@ -222,7 +222,7 @@ export function switchLabel(frame) {
// working-alone marker, so the note only draws when no helper was ever
// reported. A result shows once the helper ended, and a reported strength or
// effort as one line ("Standard, medium effort") plus a badge each, ranked 1-3
// so the page can colour them (0 for the session's own model, which has no rank).
// so the page can color them (0 for the session's own model, which has no rank).
export function helperRows(helpers) {
const list = Array.isArray(helpers) ? helpers.filter(isPlainObject) : [];
const real = list.filter((h) => h.alone !== true);
@@ -248,7 +248,7 @@ export function helperRows(helpers) {
}
const HELPER_STRENGTH_WORDS = Object.freeze({ light: "Light", standard: "Standard", strongest: "Strongest", inherit: "Session model" });
// Each value's rank for its badge colour; the session's own model has none.
// Each value's rank for its badge color; the session's own model has none.
const HELPER_STRENGTH_LEVELS = Object.freeze({ light: 1, standard: 2, strongest: 3, inherit: 0 });
const HELPER_EFFORT_LEVELS = Object.freeze({ low: 1, medium: 2, high: 3 });
+4 -4
View File
@@ -54,7 +54,7 @@ import { handle } from "./routes.mjs";
import { checkForUpdate } from "./update-check.mjs";
const args = parseArgs(process.argv.slice(2));
// Canonicalise before anything derives a path from it: a session dir reached
// Canonicalize before anything derives a path from it: a session dir reached
// through a junction or a subst'd drive is watched under the wrong spelling,
// which is the libuv assert described below. The native realpath resolves
// those AND expands 8.3 short names, which lets the watcher run in a TEMP
@@ -251,7 +251,7 @@ const subagents = serverSubagents({ dir: DIR, worktree: sessionWorktree });
// process's whole life (the env var that says so is set once, at spawn), so
// read once rather than on every frame. The page uses it to drop advice that
// only makes sense in a plain terminal (a command to copy into a new
// conversation) in favour of the app's own Restart and Update skills buttons.
// conversation) in favor of the app's own Restart and Update skills buttons.
const IN_APP = Boolean(inAppSignal());
// What the page needs to draw itself, in the shape of the SSE state frame.
@@ -525,12 +525,12 @@ setInterval(() => {
// This is the mechanism, not a nicety.
//
// Windows has no real SIGTERM, Node only synthesises SIGINT for Ctrl+C on an
// Windows has no real SIGTERM, Node only synthesizes SIGINT for Ctrl+C on an
// attached console, and this process is detached with no console at all.
// taskkill /F and Task Manager give zero cleanup opportunity. A Job Object with
// KILL_ON_JOB_CLOSE would be the proper fix and needs native code, which is out
// under zero-dependencies. So the only thing that reliably stops an orphan is
// the server deciding to stop. Do not "optimise" this away.
// the server deciding to stop. Do not "optimize" this away.
setInterval(() => {
const idle = Date.now() - lastContact;
// Answers nobody has collected yet keep the server up (bounded by MAX_LIFE_MS):
+1 -1
View File
@@ -1,4 +1,4 @@
// Plan2Code Web Console - serving the page's own files: the allow-list, types, caching and the accent colours.
// Plan2Code Web Console - serving the page's own files: the allow-list, types, caching and the accent colors.
import fs from "node:fs";
import path from "node:path";