mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-20 05:11:18 -08:00
Restyle the web console and tidy its labels, Ask tab, cleanup and help
AI Assisted
This commit is contained in:
1 parent
710c751c2f
commit
e9679c47b9
103 files changed
+4054
-2273
No files matched your search
@@ -10,13 +10,13 @@ Nothing yet says what to prototype: before Step 1, one `--wait` card (a Notebook
|
||||
|
||||
## Starting card
|
||||
|
||||
One `--wait` batch after Step 1. A card cannot open with its boxes ticked, so the carry-over card's preset ticks every found item in one press, and a Skip on it keeps everything found (all ticked is the default); leave the card out for a project with no screens:
|
||||
One `--wait` batch after Step 1. The carry card is required and opens ticked as suggested: each found option carries `tag` ("Keep" or "Free up"), `ticked: true` when Keep, and `detail` = what was found, then ` · ` and the reason; a "none found" option has neither. Presets: `Suggested` (the ticked keys; leave it out when no row is Keep) and `Everything found` (every found key, only when it differs from Suggested). A reply of `none` means free up everything found. Leave the card out for a project with no screens:
|
||||
|
||||
```jsonc
|
||||
{"title":"UI prototype","headline":{"stage":"Start","cleared":0,"total":3},"items":[{"id":"carry","kind":"multi","title":"Carry over","required":false,"body":"Ticked items look the same in every variant; unticked ones are where each variant tries its own take. Skip keeps everything found; tick only what should stay the same to free the rest. Attach screenshots or images in this card's note.","options":[{"k":"1","text":"Colors","detail":"src/styles/theme.css: accent #0f766e, gray #64748b"},{"k":"2","text":"Fonts","detail":"none found"}],"presets":[{"label":"Everything found","ks":["1"]}]},{"id":"spread","kind":"choice","title":"How different","allowOther":false,"body":"How far apart should the variants be?","options":[{"text":"Subtle","detail":"Same layout, different treatment"},{"text":"Balanced","detail":"One layout difference each","recommended":true},{"text":"Radical","detail":"Different layouts"}]},{"id":"direction","kind":"text","title":"Direction","required":false,"body":"Anything every variant should stay inside.","placeholder":"Calmer colors, bigger type, room around the totals."}]}
|
||||
{"title":"UI prototype","headline":{"stage":"Start","cleared":0,"total":3},"items":[{"id":"carry","kind":"multi","title":"Carry over","body":"Ticked items look the same in every variant; unticked ones are where each variant tries its own take. Untick everything to free them all. Attach screenshots or images in this card's note.","options":[{"k":"1","text":"Colors","tag":"Keep","ticked":true,"detail":"src/styles/theme.css: accent #0f766e · a new screen in your app"},{"k":"2","text":"Layout","tag":"Free up","detail":"src/App.tsx: sidebar and header · you asked to rethink the table"},{"k":"3","text":"Fonts","detail":"none found"}],"presets":[{"label":"Suggested","ks":["1"]},{"label":"Everything found","ks":["1","2"]}]},{"id":"spread","kind":"choice","title":"How different","allowOther":false,"body":"How far apart should the variants be?","options":[{"text":"Subtle","detail":"Same layout, different treatment"},{"text":"Balanced","detail":"One layout difference each","recommended":true},{"text":"Radical","detail":"Different layouts"}]},{"id":"direction","kind":"text","title":"Direction","required":false,"body":"Anything every variant should stay inside.","placeholder":"Calmer colors, bigger type, room around the totals."}]}
|
||||
```
|
||||
|
||||
A "none found" option is never in the preset. Attached files arrive as `Image:` and `File:` paths in `reply`: open each, then say per image, in your next post, whether it goes in the page or is a look to match (a `notice`, or the line in the paste card's `body`).
|
||||
A "none found" option is never in a preset. Attached files arrive as `Image:` and `File:` paths in `reply`: open each, then say per image, in your next post, whether it goes in the page or is a look to match (a `notice`, or the line in the paste card's `body`).
|
||||
|
||||
## The page
|
||||
|
||||
@@ -28,7 +28,7 @@ A `text` item, `--wait`, `"title":"Paste your choice"`, a new id per round (`pas
|
||||
|
||||
## Next steps
|
||||
|
||||
After the read-back, a `menu`, `--wait`: Save, Narrow from my pick, Fresh set, Done, each with a one-line `detail`; the read-back is its `body`. Fresh set's brief goes back up as the three starting cards with new ids (`carry-2`, `spread-2`, `direction-2`), each choice as it stood marked `recommended` or in the preset.
|
||||
After the read-back, a `menu`, `--wait`: Save, Narrow from my pick, Fresh set, Done, each with a one-line `detail`; the read-back is its `body`. Fresh set's brief goes back up as the three starting cards with new ids (`carry-2`, `spread-2`, `direction-2`), each choice as it stood: the carry card with `ticked` as last sent, the spread card marked `recommended`.
|
||||
|
||||
## Save questions
|
||||
|
||||
|
||||
@@ -993,10 +993,11 @@ export const MAX_OPEN_REQUIRED = 3;
|
||||
// The `more` body is markdown drawn under its row: kept short enough to read.
|
||||
export const MAX_MORE_BYTES = 4096;
|
||||
export const MAX_GROUP_CHARS = 40;
|
||||
export const MAX_TAG_CHARS = 16;
|
||||
|
||||
// A multi's optional pick-list fields: `group`, `more`, `batch` and `locked` on
|
||||
// options, and no preset naming a locked option (a preset only ticks what can
|
||||
// be picked).
|
||||
// A multi's optional pick-list fields: `group`, `more`, `batch`, `locked`,
|
||||
// `ticked` and `tag` on options, and no preset naming a locked option (a preset
|
||||
// only ticks what can be picked).
|
||||
function pickListProblems(item, at) {
|
||||
const problems = [];
|
||||
const locked = new Set();
|
||||
@@ -1016,6 +1017,14 @@ function pickListProblems(item, at) {
|
||||
problems.push(rule(at, "options", `${which} has a "locked" that is not true or false`, { text: "left-pad 1.0.0 to 2.0.0", locked: true }));
|
||||
}
|
||||
if (o.locked === true && typeof o.k === "string") locked.add(o.k);
|
||||
if (o.ticked != null && typeof o.ticked !== "boolean") {
|
||||
problems.push(rule(at, "options", `${which} has a "ticked" that is not true or false (true starts the row ticked)`, { text: "Colors", ticked: true }));
|
||||
} else if (o.ticked === true && o.locked === true) {
|
||||
problems.push(rule(at, "options", `${which} is locked and ticked; a locked option can never be picked. Drop "ticked"`, { text: "left-pad 1.0.0 to 2.0.0", locked: true }));
|
||||
}
|
||||
if (o.tag != null && (typeof o.tag !== "string" || !o.tag.trim() || o.tag.trim().length > MAX_TAG_CHARS)) {
|
||||
problems.push(rule(at, "options", `${which} has a "tag" that is not a string of 1 to ${MAX_TAG_CHARS} characters (the small pill beside the label)`, { text: "Colors", tag: "Keep" }));
|
||||
}
|
||||
}
|
||||
if (locked.size && Array.isArray(item.presets)) {
|
||||
for (const p of item.presets) {
|
||||
@@ -1101,6 +1110,13 @@ export function validate(state) {
|
||||
rule(at, "options", `option "${o.k}" needs "text" (the label) and optionally "detail". Options use "text"/"detail", not "label"/"desc"`, OPTION_RIGHT),
|
||||
);
|
||||
}
|
||||
if (item.kind === "choice" && isPlainObject(o)) {
|
||||
for (const field of ["ticked", "tag"]) {
|
||||
if (o[field] != null) {
|
||||
problems.push(rule(at, "options", `option "${o.k}" has "${field}", which only goes on a multi's options`, { kind: "multi" }));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// The long pick list's optional fields (group headings, rows that open,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
// No DOM, no `local`, no fetch. If a function in here needs any of those, it
|
||||
// belongs in app.js instead.
|
||||
|
||||
import { NOT_CONNECTED } from "./labels.js";
|
||||
import { FIXED_REASON, FLOW_SKILLS, SKILLS, labelFor, skillByName, skillFor } from "./skills.js";
|
||||
import { SPEC_STATES, stateFor } from "./spec-states.js";
|
||||
|
||||
@@ -165,6 +166,11 @@ export function answerLines(item, v) {
|
||||
if (v.skipped) out.push("Skipped");
|
||||
if (v.k) out.push(optionLabel(item, v.k));
|
||||
if (Array.isArray(v.ks)) for (const k of v.ks) out.push(optionLabel(item, k));
|
||||
// A card that opened ticked can be sent with nothing ticked: say so, so the
|
||||
// settled card is not blank. Other multis keep their record as it was.
|
||||
if (item && Array.isArray(v.ks) && v.ks.length === 0 && !v.skipped && startsTicked(item)) {
|
||||
out.push("None ticked");
|
||||
}
|
||||
if (typeof v.yes === "boolean") out.push(v.yes ? item.yesLabel || "Yes" : item.noLabel || "No");
|
||||
if (typeof v.ok === "boolean") {
|
||||
out.push(v.ok ? item.yesLabel || "Yes, that is right" : item.noLabel || "Not quite");
|
||||
@@ -527,7 +533,7 @@ export function turnGate({ gone = false, pendingResult = false, waiting = false
|
||||
export const HOME_REPLY = "Save my place and take me back to the dashboard, right here in this session.";
|
||||
|
||||
const HOME_TITLES = {
|
||||
gone: "Not connected right now.",
|
||||
gone: NOT_CONNECTED,
|
||||
pending: "Your last answers are still being picked up. You can leave once they have been.",
|
||||
waiting: "Plan2Code is working on your answers. You can leave once it replies.",
|
||||
};
|
||||
@@ -1067,7 +1073,7 @@ export function staleLaunchFeedback(title, adrift, inApp = false) {
|
||||
if (!adrift) return null;
|
||||
return {
|
||||
kicker: "Saved",
|
||||
title: `${title || "Your workflow"} is saved and waiting`,
|
||||
title: `${title || "Your skill"} is saved and waiting`,
|
||||
quip: "Plan2Code is not running right now.",
|
||||
hint: inApp
|
||||
? "Press Reconnect to agent below. Plan2Code will collect this launch and continue here."
|
||||
@@ -1242,6 +1248,46 @@ export function suggestReplyLines(title, text, attachments) {
|
||||
];
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------- starting ticks */
|
||||
|
||||
/**
|
||||
* A multi with a row that starts ticked (`ticked: true`, never a locked one).
|
||||
* On such a card an empty pick is an answer ("none"), not
|
||||
* the absence of one, so the page stages it, the reply says it and the
|
||||
* settled card shows it. Every other card keeps today's behavior.
|
||||
*/
|
||||
export function startsTicked(item) {
|
||||
return Boolean(item) && item.kind === "multi" && (item.options || []).some((o) => o && o.ticked === true && o.locked !== true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stage the ticks a multi card asks to start with. A row with `ticked: true`
|
||||
* (never a locked one) starts ticked the first time the card shows: the pick
|
||||
* is staged exactly as if the person had made it, so Send, drafts, the settled
|
||||
* record and the reply words all work on it as they do on any other pick.
|
||||
* The page does it, not the server, because an `answer` on the item would
|
||||
* settle the card. A card is seeded once: `seeded` remembers it, so a card the
|
||||
* person cleared is never ticked again by a redraw or a reload. Cards already
|
||||
* staged, already sent or no longer open are left alone. Returns new objects,
|
||||
* never changing the inputs: `{ staged, seeded, changed }`.
|
||||
*/
|
||||
export function seedStaged(items, staged, seeded, sent = {}) {
|
||||
const outStaged = { ...(staged || {}) };
|
||||
const outSeeded = { ...(seeded || {}) };
|
||||
let changed = false;
|
||||
for (const item of items || []) {
|
||||
if (!item || !item.id || item.kind !== "multi" || !Array.isArray(item.options)) continue;
|
||||
if (item.status !== "open" && item.status !== "reopened") continue;
|
||||
if (outStaged[item.id] || outSeeded[item.id] || (sent && sent[item.id])) continue;
|
||||
const ks = item.options.filter((o) => o && o.ticked === true && o.locked !== true).map((o) => o.k);
|
||||
if (!ks.length) continue;
|
||||
outStaged[item.id] = { type: "answer", kind: "multi", ks };
|
||||
outSeeded[item.id] = true;
|
||||
changed = true;
|
||||
}
|
||||
return { staged: outStaged, seeded: outSeeded, changed };
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- stale picks */
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,6 +96,28 @@ export function agentFound(id) {
|
||||
tellApp("agent-found", { id });
|
||||
}
|
||||
|
||||
// The keys the desktop app's shell answers to (plan2code-app/ui/meter.js SHORTCUTS, held to the same
|
||||
// table by scripts/test-app-meter.mjs): Cmd on a Mac, Ctrl elsewhere. A key pressed here, inside the
|
||||
// frame, never reaches the shell's own listener, so the page forwards the id and nothing else.
|
||||
export const SHORTCUT_KEYS = Object.freeze([
|
||||
{ id: "toggle-terminal", key: "`", shift: false },
|
||||
{ id: "focus-console", key: "1", shift: false },
|
||||
{ id: "focus-terminal", key: "2", shift: false },
|
||||
{ id: "new-session", key: "n", shift: true },
|
||||
{ id: "change-project", key: "o", shift: false },
|
||||
{ id: "preferences", key: ",", shift: false },
|
||||
]);
|
||||
|
||||
/** The shortcut id a key press stands for, or null. `mac` picks Cmd over Ctrl. */
|
||||
export function shortcutIdFor(e, mac) {
|
||||
if (e.altKey) return null;
|
||||
const chord = mac ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey;
|
||||
if (!chord) return null;
|
||||
const key = String(e.key || "").toLowerCase();
|
||||
const hit = SHORTCUT_KEYS.find((s) => s.key === key && s.shift === Boolean(e.shiftKey));
|
||||
return hit ? hit.id : null;
|
||||
}
|
||||
|
||||
/** Post `message` to the frame's parent, as `{ plan2code: kind, ...extra }`; nothing outside a frame. */
|
||||
export function tellApp(kind, extra = {}) {
|
||||
if (!framed()) return;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
import { page, onRedraw, onSave, useHooks, bootData } from "./state.js";
|
||||
import {
|
||||
adopt, askSuggestions, banner, connect, fillSky, fitGrowBox, loadState, markSent, maybeWelcome, render, renderFooter,
|
||||
adopt, askSuggestions, banner, clearBanner, connect, fillSky, fitGrowBox, loadState, markSent, maybeWelcome, render, renderFooter,
|
||||
renderSidebar, renderWhere, save, startClock, startLooks, stagedPayload, syncWorkspaceScope,
|
||||
wakeHoldsChime, wireAsk, wireCards, wireChrome, wireCleanup, wireDashboard, wireDocs, wireEnding,
|
||||
wireActivities, wireLoopSetup, wireHelp, launchSkill, sendLearning, beginLearningSave, renderLearningRow, learningBlocked, openHelpOn, openLoopSetup, wireLooks, wireNotepad, wirePrefs, wireWorkspace,
|
||||
@@ -37,7 +37,7 @@ import { sound } from "./sound.js";
|
||||
// and the few calls a screen makes into another are handed to state.js first.
|
||||
onSave(save);
|
||||
useHooks({
|
||||
launchSkill, sendLearning, beginLearningSave, renderLearningRow, learningBlocked, openHelpOn, openLoopSetup, askSuggestions, banner, fitGrowBox, markSent, maybeWelcome, renderFooter, renderSidebar, renderWhere, stagedPayload, syncWorkspaceScope,
|
||||
launchSkill, sendLearning, beginLearningSave, renderLearningRow, learningBlocked, openHelpOn, openLoopSetup, askSuggestions, banner, clearBanner, fitGrowBox, markSent, maybeWelcome, renderFooter, renderSidebar, renderWhere, stagedPayload, syncWorkspaceScope,
|
||||
openPrefs, markSaved, confirmUnsaved, loadAgentsView, wireAgentsView, hasUnsaved, unsavedName, saveOpen, discardOpen, focusOpen,
|
||||
renderCard, send, refreshLessonsSend,
|
||||
});
|
||||
|
||||
@@ -13,9 +13,9 @@ export const CHAT_MAX_CHARS = 4000;
|
||||
export const CHAT_MAX_ATTACHMENTS = MAX_ATTACHMENTS;
|
||||
export const CHAT_MAX_IMAGES = CHAT_MAX_ATTACHMENTS;
|
||||
|
||||
export const CHAT_LIMIT_TEXT = "That's 10 questions in this conversation — start a new one to keep going.";
|
||||
export const CHAT_OFFLINE_TEXT = "No agent available — wait for one to become available (your terminal might be working on a task or waiting a permission approval)";
|
||||
export const CHAT_LAST_WAIT_TEXT = "That was the last question in this conversation — its answer will land here.";
|
||||
export const CHAT_LIMIT_TEXT = "That's 10 questions in this conversation: start a new one to keep going.";
|
||||
export const CHAT_OFFLINE_TEXT = "No agent is free right now. It may be mid-task or waiting on a permission approval in your terminal.";
|
||||
export const CHAT_LAST_WAIT_TEXT = "That was the last question in this conversation: its answer will land here.";
|
||||
export const CHAT_WAITING_TEXT = "Plan2Code will answer at its next check-in";
|
||||
export const CHAT_WORKING_TEXT = "Plan2Code is working on the answer…";
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export function continueButton(label = "continue", cls = "agent-key agent-key-bt
|
||||
* Null when there is nothing to offer.
|
||||
*/
|
||||
export function reconnectOffer(cls = "reconnect-offer") {
|
||||
if (page.inApp) return continueButton("Reconnect to agent", "btn small " + cls);
|
||||
if (page.inApp) return continueButton("Reconnect to agent", "btn sm " + cls);
|
||||
const note = el("p", cls + " help");
|
||||
note.appendChild(document.createTextNode("To wake the agent, type "));
|
||||
note.appendChild(el("strong", "agent-key", "continue"));
|
||||
|
||||
@@ -41,6 +41,7 @@ function renameLabel(f) {
|
||||
}
|
||||
|
||||
const STATUS_WORD = { added: "Added", deleted: "Deleted", renamed: "Renamed" };
|
||||
const STATUS_TONE = { added: "is-ok", deleted: "is-warn", renamed: "is-accent" };
|
||||
|
||||
function counts(f) {
|
||||
const box = el("span", "diff-counts");
|
||||
@@ -71,8 +72,8 @@ async function askAgain(button, status, reply) {
|
||||
});
|
||||
if (res.status === 409) throw Object.assign(new Error("pending"), { pending: true });
|
||||
if (!res.ok) throw new Error(String(res.status));
|
||||
hooks.banner("Asked for the changes again. The tab updates when they are read.", "good");
|
||||
setTimeout(() => hooks.banner(null), 5000);
|
||||
const again = hooks.banner("Asked for the changes again. The tab updates when they are read.", "good");
|
||||
setTimeout(() => hooks.clearBanner(again), 5000);
|
||||
page.pendingResult = true;
|
||||
redraw();
|
||||
} catch (err) {
|
||||
@@ -89,7 +90,7 @@ function stateBox(kind, message, buttonLabel, reply) {
|
||||
const box = el("div", "diff-state diff-" + kind);
|
||||
box.appendChild(el("p", "diff-state-msg", message));
|
||||
if (buttonLabel) {
|
||||
const btn = el("button", "btn small diff-again", buttonLabel);
|
||||
const btn = el("button", "btn sm diff-again", buttonLabel);
|
||||
btn.type = "button";
|
||||
const status = el("p", "diff-state-why");
|
||||
status.setAttribute("role", "status");
|
||||
@@ -167,7 +168,7 @@ function drawReady(b, result) {
|
||||
totals.appendChild(el("span", "diff-minus", `-${removed}`));
|
||||
view.appendChild(totals);
|
||||
if (result.tooLarge) {
|
||||
view.appendChild(el("p", "diff-notice", "This change is too large to show in full: every file is listed, but some show no lines."));
|
||||
view.appendChild(el("p", "callout is-stage diff-notice", "This change is too large to show in full: every file is listed, but some show no lines."));
|
||||
}
|
||||
|
||||
const cols = el("div", "diff-cols");
|
||||
@@ -182,7 +183,7 @@ function drawReady(b, result) {
|
||||
row.setAttribute("role", "option");
|
||||
const name = el("span", "diff-file-name");
|
||||
name.appendChild(el("strong", null, f.status === "renamed" ? renameLabel(f) : baseName(f.path)));
|
||||
if (STATUS_WORD[f.status]) name.appendChild(el("span", "diff-status diff-status-" + f.status, STATUS_WORD[f.status]));
|
||||
if (STATUS_WORD[f.status]) name.appendChild(el("span", "code-tag " + STATUS_TONE[f.status] + " diff-status diff-status-" + f.status, STATUS_WORD[f.status]));
|
||||
row.appendChild(name);
|
||||
const folder = folderOf(f.path);
|
||||
if (folder) row.appendChild(el("span", "diff-file-dir", folder));
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
import {
|
||||
BRANCH_TYPES,
|
||||
GIT_TABS,
|
||||
NOT_CONNECTED,
|
||||
PR_HOST_LABELS,
|
||||
boardActions,
|
||||
boardBranchLink,
|
||||
@@ -74,7 +75,7 @@ function copy(ctx, text, cls, codeEl) {
|
||||
}
|
||||
|
||||
// "Open pull request": a link while it can open, an inert look-alike while busy.
|
||||
function prLink(ctx, url, cls = "btn small primary") {
|
||||
function prLink(ctx, url, cls = "btn sm primary") {
|
||||
const label = "Open pull request";
|
||||
if (!controlAllowed(ctx.mode, "action")) {
|
||||
const span = ctx.h.el("span", `${cls} git-pr-open is-disabled`, label);
|
||||
@@ -109,7 +110,7 @@ export function drawGitBoard(ctx) {
|
||||
const cardSlot = h.el("div", "git-cards");
|
||||
if (git.error) {
|
||||
node.appendChild(cardSlot);
|
||||
const warn = h.el("div", "git-warn", git.error);
|
||||
const warn = h.el("div", "callout is-warn git-warn", git.error);
|
||||
warn.setAttribute("role", "alert");
|
||||
node.appendChild(warn);
|
||||
return { node, cardSlot };
|
||||
@@ -167,7 +168,7 @@ function header(ctx) {
|
||||
row.appendChild(
|
||||
h.el("span", "git-track", head.upstream && head.gone ? "remote copy deleted" : head.upstream ? `↑${head.ahead || 0} ↓${head.behind || 0}` : "not published")
|
||||
);
|
||||
if (remotes.length > 1 && cur && cur.upstreamRemote) row.appendChild(h.el("span", "badge", cur.upstreamRemote));
|
||||
if (remotes.length > 1 && cur && cur.upstreamRemote) row.appendChild(h.el("span", "pill is-accent is-caps badge", cur.upstreamRemote));
|
||||
}
|
||||
box.appendChild(row);
|
||||
|
||||
@@ -177,7 +178,7 @@ function header(ctx) {
|
||||
const cmd = "git remote add origin <url>";
|
||||
const code = h.el("code", "md-code", cmd);
|
||||
meta.appendChild(code);
|
||||
meta.appendChild(copy(ctx, cmd, "btn small", code));
|
||||
meta.appendChild(copy(ctx, cmd, "btn sm", code));
|
||||
} else meta.appendChild(h.el("span", "git-refreshed", refreshedLine(git, ctx.now)));
|
||||
if (ctx.mode === "running" && ctx.activity) meta.appendChild(activityLine(ctx, "span", ctx.activity));
|
||||
box.appendChild(meta);
|
||||
@@ -226,8 +227,8 @@ function tabStrip(ctx, active) {
|
||||
strip.appendChild(b);
|
||||
}
|
||||
bar.appendChild(strip);
|
||||
const done = control(ctx, "button", "btn small git-done", "Done with git", { role: "done", onClick: () => ctx.on.send("done") });
|
||||
if (ctx.mode === "offline") done.title = ctx.offlineReason === "pending" ? "Your last click is still being picked up." : "Not connected right now.";
|
||||
const done = control(ctx, "button", "btn sm git-done", "Done with git", { role: "done", onClick: () => ctx.on.send("done") });
|
||||
if (ctx.mode === "offline") done.title = ctx.offlineReason === "pending" ? "Your last click is still being picked up." : NOT_CONNECTED;
|
||||
bar.appendChild(done);
|
||||
return bar;
|
||||
}
|
||||
@@ -294,6 +295,13 @@ function stepLabel(ctx, s) {
|
||||
return `Commit ${plural(tablePicks(ctx).files.length, "file", "files")}`;
|
||||
}
|
||||
|
||||
// Whether the step strip over the Changes tab already carries a plain commit
|
||||
// button (the same one the commit table would draw).
|
||||
function stripCommits(ctx) {
|
||||
const p = ctx.step && ctx.step.primary;
|
||||
return Boolean(p && p.op === "commit" && ctx.step.tab === "changes");
|
||||
}
|
||||
|
||||
// The commit table's ticked files and .gitignore picks, checked against the snapshot.
|
||||
function tablePicks(ctx) {
|
||||
const ch = ctx.git.changes || {};
|
||||
@@ -310,7 +318,7 @@ function stepStrip(ctx, id) {
|
||||
if (id !== step.tab) {
|
||||
if (!p) return null;
|
||||
const where = GIT_TABS.find((t) => t.id === step.tab);
|
||||
return control(ctx, "button", "git-hint", `Next step is on ${where ? where.label : step.tab}: ${stepLabel(ctx, p)} →`, {
|
||||
return control(ctx, "button", "btn sm standby git-hint", `Next step is on ${where ? where.label : step.tab}: ${stepLabel(ctx, p)} →`, {
|
||||
role: "nav",
|
||||
onClick: () => ctx.on.pickTab(step.tab),
|
||||
});
|
||||
@@ -322,7 +330,7 @@ function stepStrip(ctx, id) {
|
||||
// much is not yours" rather than one loud suggestion to commit it all.
|
||||
if (ctx.notice && ctx.notice.op) {
|
||||
const duo = h.el("div", "git-duo");
|
||||
const landed = h.el("div", "git-landed");
|
||||
const landed = h.el("div", "callout is-ok git-landed");
|
||||
landed.setAttribute("role", "status");
|
||||
landed.appendChild(h.el("div", "git-step-kicker", "Just landed"));
|
||||
landed.appendChild(h.el("h3", "git-step-title", ctx.notice.title || ""));
|
||||
@@ -352,10 +360,10 @@ function stepStrip(ctx, id) {
|
||||
const acts = h.el("div", "git-step-actions");
|
||||
if (theirs) {
|
||||
acts.appendChild(stepButton(ctx, { ...theirs, label: "Commit other changes" }, "btn primary"));
|
||||
for (const s of step.secondary.slice(1)) acts.appendChild(stepButton(ctx, s, "btn small"));
|
||||
for (const s of step.secondary.slice(1)) acts.appendChild(stepButton(ctx, s, "btn sm"));
|
||||
} else {
|
||||
if (p) acts.appendChild(stepButton(ctx, p, "btn primary"));
|
||||
for (const s of step.secondary) acts.appendChild(stepButton(ctx, s, "btn small"));
|
||||
for (const s of step.secondary) acts.appendChild(stepButton(ctx, s, "btn sm"));
|
||||
}
|
||||
if (acts.children.length) left.appendChild(acts);
|
||||
duo.appendChild(left);
|
||||
@@ -381,7 +389,7 @@ function stepStrip(ctx, id) {
|
||||
const second = step.secondary[0];
|
||||
if (second) actions.appendChild(stepButton(ctx, second, "btn ghost"));
|
||||
} else {
|
||||
for (const s of step.secondary) actions.appendChild(stepButton(ctx, s, "btn small"));
|
||||
for (const s of step.secondary) actions.appendChild(stepButton(ctx, s, "btn sm"));
|
||||
}
|
||||
box.appendChild(actions);
|
||||
return box;
|
||||
@@ -392,7 +400,7 @@ function staleLine(ctx, text) {
|
||||
const line = ctx.h.el("p", "git-stale");
|
||||
const word = "Refresh?";
|
||||
line.appendChild(ctx.h.el("span", null, text.endsWith(word) ? text.slice(0, -word.length) : `${text} `));
|
||||
line.appendChild(control(ctx, "button", "btn small ghost git-stale-refresh", word, { onClick: () => ctx.on.send("refresh") }));
|
||||
line.appendChild(control(ctx, "button", "btn sm ghost git-stale-refresh", word, { onClick: () => ctx.on.send("refresh") }));
|
||||
return line;
|
||||
}
|
||||
|
||||
@@ -402,7 +410,7 @@ function panelFrame(ctx, title, { closable = true, disabled = false } = {}) {
|
||||
const p = ctx.h.el("section", "git-panel");
|
||||
const head = ctx.h.el("div", "git-panel-head");
|
||||
head.appendChild(ctx.h.el("h3", "git-panel-title", title));
|
||||
if (closable) head.appendChild(control(ctx, "button", "btn small ghost", "Close", { disabled, onClick: () => ctx.on.closePanel() }));
|
||||
if (closable) head.appendChild(control(ctx, "button", "btn sm ghost", "Close", { disabled, onClick: () => ctx.on.closePanel() }));
|
||||
p.appendChild(head);
|
||||
return p;
|
||||
}
|
||||
@@ -424,7 +432,7 @@ function changesBody(ctx) {
|
||||
const ch = git.changes || {};
|
||||
const any = list(ch.files).length || list(ch.untrackedDirs).length;
|
||||
if (!any) {
|
||||
body.appendChild(h.el("p", "git-empty", `No changes. Nothing to commit on ${(git.head || {}).branch || "this commit"}.`));
|
||||
body.appendChild(h.el("p", "empty", `No changes. Nothing to commit on ${(git.head || {}).branch || "this commit"}.`));
|
||||
return body;
|
||||
}
|
||||
body.appendChild(commitPanel(ctx, frozen));
|
||||
@@ -492,7 +500,7 @@ function commitPanel(ctx, frozen) {
|
||||
tr.appendChild(h.el("td", "git-path", f.path));
|
||||
const state = h.el("td", "git-state", f.state || "");
|
||||
if (f.risky) {
|
||||
state.appendChild(h.el("span", "badge git-badge is-held", "held back"));
|
||||
state.appendChild(h.el("span", "pill is-stage is-caps badge git-badge is-held", "held back"));
|
||||
state.appendChild(ignoreToggle(`git-ignore-f${i}`, f.path));
|
||||
}
|
||||
tr.appendChild(state);
|
||||
@@ -520,30 +528,33 @@ function commitPanel(ctx, frozen) {
|
||||
if (detached) {
|
||||
// No branch to commit on: the commit makes one, .gitignore-only picks included.
|
||||
actions.appendChild(
|
||||
control(ctx, "button", "btn small primary", "Create branch", {
|
||||
control(ctx, "button", "btn sm primary", "Create branch", {
|
||||
disabled: frozen || (!files.length && !ignore.length),
|
||||
onClick: () => on.openPanel("create", { commit: true, files, ignore }),
|
||||
})
|
||||
);
|
||||
} else if (!files.length && ignore.length) {
|
||||
// Only .gitignore picks: the commit takes .gitignore alone.
|
||||
actions.appendChild(control(ctx, "button", "btn small primary", `Add ${ignore.length} to .gitignore`, { disabled: frozen, onClick: send }));
|
||||
actions.appendChild(control(ctx, "button", "btn sm primary", `Add ${ignore.length} to .gitignore`, { disabled: frozen, onClick: send }));
|
||||
} else if (!first && head.branch && head.branch === git.defaultBranch) {
|
||||
actions.appendChild(h.el("p", "git-offer", `You're on ${head.branch}. Make a branch for this?`));
|
||||
actions.appendChild(
|
||||
control(ctx, "button", "btn small primary", "Create branch", {
|
||||
control(ctx, "button", "btn sm primary", "Create branch", {
|
||||
disabled: frozen || !files.length,
|
||||
onClick: () => on.openPanel("create", { commit: true, files, ignore }),
|
||||
})
|
||||
);
|
||||
actions.appendChild(control(ctx, "button", "btn small", `Commit on ${head.branch}`, { disabled: frozen || !files.length, onClick: send }));
|
||||
} else {
|
||||
actions.appendChild(control(ctx, "button", "btn sm", `Commit on ${head.branch}`, { disabled: frozen || !files.length, onClick: send }));
|
||||
} else if (!stripCommits(ctx)) {
|
||||
// The step above this table already offers this same "Commit N files" (its
|
||||
// count follows the ticks), so a second one here would be a duplicate; the
|
||||
// table keeps its own only when the step is somewhere else.
|
||||
actions.appendChild(
|
||||
control(ctx, "button", "btn small primary", `Commit ${plural(files.length, "file", "files")}`, { disabled: frozen || !files.length, onClick: send })
|
||||
control(ctx, "button", "btn sm primary", `Commit ${plural(files.length, "file", "files")}`, { disabled: frozen || !files.length, onClick: send })
|
||||
);
|
||||
}
|
||||
if (opened) actions.appendChild(control(ctx, "button", "btn small ghost", "Cancel", { disabled: frozen, onClick: () => on.closePanel() }));
|
||||
p.appendChild(actions);
|
||||
if (opened) actions.appendChild(control(ctx, "button", "btn sm ghost", "Cancel", { disabled: frozen, onClick: () => on.closePanel() }));
|
||||
if (actions.children.length) p.appendChild(actions);
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -556,7 +567,7 @@ function branchesBody(ctx) {
|
||||
if (frozen) body.appendChild(waitLine(ctx));
|
||||
|
||||
const tools = h.el("div", "git-tools");
|
||||
const search = control(ctx, "input", "git-search", null, {
|
||||
const search = control(ctx, "input", "is-compact git-search", null, {
|
||||
role: "nav",
|
||||
disabled: frozen,
|
||||
onInput: () => {
|
||||
@@ -572,7 +583,7 @@ function branchesBody(ctx) {
|
||||
tools.appendChild(search);
|
||||
// Not mid-operation, and not before the first commit, when there is nothing to branch from.
|
||||
const first = git.hasCommits === false;
|
||||
const nb = control(ctx, "button", "btn small", "New branch", {
|
||||
const nb = control(ctx, "button", "btn sm", "New branch", {
|
||||
disabled: frozen || first,
|
||||
title: first ? "Make the first commit, then you can branch from it." : frozen ? "Finish or abort what is in progress first." : undefined,
|
||||
onClick: () => on.openPanel("create"),
|
||||
@@ -588,7 +599,7 @@ function branchesBody(ctx) {
|
||||
else if (sweep) {
|
||||
const offer = h.el("p", "git-sweep-offer");
|
||||
offer.appendChild(h.el("span", null, `${plural(sweep, "branch", "branches")} merged or gone on the remote. `));
|
||||
offer.appendChild(control(ctx, "button", "btn small ghost", "Choose which to clean up…", { disabled: frozen, onClick: () => on.openPanel("cleanup") }));
|
||||
offer.appendChild(control(ctx, "button", "btn sm ghost", "Choose which to clean up…", { disabled: frozen, onClick: () => on.openPanel("cleanup") }));
|
||||
body.appendChild(offer);
|
||||
}
|
||||
|
||||
@@ -599,7 +610,7 @@ function branchesBody(ctx) {
|
||||
const { top, remoteOnly } = orderBranches(rows);
|
||||
const locals = filterBranches(top, board.query);
|
||||
if (locals.length) body.appendChild(branchTable(ctx, locals, frozen));
|
||||
else body.appendChild(h.el("p", "git-empty", board.query ? "No local branch matches." : "No local branches yet."));
|
||||
else body.appendChild(h.el("p", "empty", board.query ? "No local branch matches." : "No local branches yet."));
|
||||
|
||||
if (remoteOnly.length) {
|
||||
const fold = foldRemote(remoteOnly, { showAll: board.showAll, query: board.query });
|
||||
@@ -615,10 +626,10 @@ function branchesBody(ctx) {
|
||||
});
|
||||
det.appendChild(h.el("summary", null, `Remote only (${board.query ? fold.shown.length : remoteOnly.length})`));
|
||||
if (fold.shown.length) det.appendChild(branchTable(ctx, fold.shown, frozen));
|
||||
else det.appendChild(h.el("p", "git-empty", "No remote branch matches."));
|
||||
else det.appendChild(h.el("p", "empty", "No remote branch matches."));
|
||||
if (fold.hidden) {
|
||||
det.appendChild(
|
||||
control(ctx, "button", "btn small ghost", `Show all ${remoteOnly.length}`, {
|
||||
control(ctx, "button", "btn sm ghost", `Show all ${remoteOnly.length}`, {
|
||||
role: "nav",
|
||||
disabled: frozen,
|
||||
onClick: () => {
|
||||
@@ -647,12 +658,12 @@ function branchTable(ctx, rows, frozen) {
|
||||
const name = h.el("td", "git-cell-name");
|
||||
name.appendChild(h.el("span", "git-name", b.remote ? `${b.remote}/${b.name}` : b.name));
|
||||
const badges = [
|
||||
[b.current, "current", "is-current"],
|
||||
[b.default, "default", "is-default"],
|
||||
[b.merged, "Merged", "is-merged"],
|
||||
[b.gone, "Remote copy deleted", "is-gone"],
|
||||
[b.current, "current", "is-current is-accent"],
|
||||
[b.default, "default", "is-default is-accent"],
|
||||
[b.merged, "Merged", "is-merged is-ok"],
|
||||
[b.gone, "Remote copy deleted", "is-gone is-stage"],
|
||||
];
|
||||
for (const [shown, label, cls] of badges) if (shown) name.appendChild(h.el("span", `badge git-badge ${cls}`, label));
|
||||
for (const [shown, label, cls] of badges) if (shown) name.appendChild(h.el("span", `pill is-caps badge git-badge ${cls}`, label));
|
||||
tr.appendChild(name);
|
||||
|
||||
let track = "not published";
|
||||
@@ -671,9 +682,9 @@ function branchTable(ctx, rows, frozen) {
|
||||
const acts = h.el("td", "git-cell-actions");
|
||||
const branch = b.remote ? `${b.remote}/${b.name}` : b.name;
|
||||
// Mid-operation a row's Switch or Delete would ask for a second git op on top of the first.
|
||||
if (!b.current) acts.appendChild(control(ctx, "button", "btn small", "Switch", { disabled: frozen, onClick: () => on.send("switch", { branch }) }));
|
||||
if (!b.current) acts.appendChild(control(ctx, "button", "btn sm", "Switch", { disabled: frozen, onClick: () => on.send("switch", { branch }) }));
|
||||
if (!b.remote && !b.current && !b.default) {
|
||||
acts.appendChild(control(ctx, "button", "btn small danger", "Delete", { disabled: frozen, onClick: () => on.send("delete", { branch: b.name }) }));
|
||||
acts.appendChild(control(ctx, "button", "btn sm danger", "Delete", { disabled: frozen, onClick: () => on.send("delete", { branch: b.name }) }));
|
||||
}
|
||||
tr.appendChild(acts);
|
||||
tbody.appendChild(tr);
|
||||
@@ -714,7 +725,7 @@ function createPanel(ctx, frozen) {
|
||||
fromRow.appendChild(fromLabel);
|
||||
if (src.here && c.from !== src.here) {
|
||||
fromRow.appendChild(
|
||||
control(ctx, "button", "btn small ghost", `From ${src.here}`, {
|
||||
control(ctx, "button", "btn sm ghost", `From ${src.here}`, {
|
||||
disabled: frozen,
|
||||
onClick: () => {
|
||||
c.from = src.here;
|
||||
@@ -739,7 +750,7 @@ function createPanel(ctx, frozen) {
|
||||
type.value = c.type;
|
||||
typeLabel.appendChild(type);
|
||||
const descLabel = h.el("label", "git-field is-wide", "Short description ");
|
||||
const desc = control(ctx, "input", null, null, {
|
||||
const desc = control(ctx, "input", "is-compact", null, {
|
||||
disabled: frozen,
|
||||
onInput: () => {
|
||||
c.description = desc.value;
|
||||
@@ -754,7 +765,7 @@ function createPanel(ctx, frozen) {
|
||||
p.appendChild(parts);
|
||||
|
||||
const nameLabel = h.el("label", "git-field is-wide", "Branch name ");
|
||||
const name = control(ctx, "input", "git-new-name", null, {
|
||||
const name = control(ctx, "input", "is-compact git-new-name", null, {
|
||||
disabled: frozen,
|
||||
onInput: () => {
|
||||
c.name = name.value;
|
||||
@@ -771,7 +782,7 @@ function createPanel(ctx, frozen) {
|
||||
// The name mirrors the two fields until it is edited directly.
|
||||
const currentName = () => (c.name == null ? composeBranchName(c) : c.name);
|
||||
const actions = h.el("div", "git-panel-actions");
|
||||
const go = control(ctx, "button", "btn small primary", "Create", {
|
||||
const go = control(ctx, "button", "btn sm primary", "Create", {
|
||||
disabled: true,
|
||||
onClick: () => {
|
||||
const fields = { name: currentName(), from: c.from };
|
||||
@@ -781,7 +792,7 @@ function createPanel(ctx, frozen) {
|
||||
},
|
||||
});
|
||||
actions.appendChild(go);
|
||||
actions.appendChild(control(ctx, "button", "btn small ghost", "Cancel", { disabled: frozen, onClick: () => on.closePanel() }));
|
||||
actions.appendChild(control(ctx, "button", "btn sm ghost", "Cancel", { disabled: frozen, onClick: () => on.closePanel() }));
|
||||
p.appendChild(actions);
|
||||
|
||||
// Typing updates the name box, the status line and Create in place, never a redraw.
|
||||
@@ -807,7 +818,7 @@ function nameLine(ctx, line, st, frozen) {
|
||||
line.className = "git-name-status is-" + st.kind;
|
||||
const say = (text) => line.appendChild(h.el("span", null, text));
|
||||
const switchTo = (branch) =>
|
||||
line.appendChild(control(ctx, "button", "btn small", "Switch to it", { disabled: frozen, onClick: () => on.send("switch", { branch }) }));
|
||||
line.appendChild(control(ctx, "button", "btn sm", "Switch to it", { disabled: frozen, onClick: () => on.send("switch", { branch }) }));
|
||||
if (st.kind === "empty") say("Fill in the fields above, or type a name.");
|
||||
else if (st.kind === "invalid") say(st.reason);
|
||||
else if (st.kind === "free") say("That name is free.");
|
||||
@@ -855,12 +866,12 @@ function cleanupPanel(ctx, frozen) {
|
||||
const branches = [...sweep].filter((n) => known.has(n));
|
||||
const actions = h.el("div", "git-panel-actions");
|
||||
actions.appendChild(
|
||||
control(ctx, "button", "btn small danger", `Delete ${plural(branches.length, "branch", "branches")}`, {
|
||||
control(ctx, "button", "btn sm danger", `Delete ${plural(branches.length, "branch", "branches")}`, {
|
||||
disabled: frozen || !branches.length,
|
||||
onClick: () => on.send("cleanup", { branches }),
|
||||
})
|
||||
);
|
||||
actions.appendChild(control(ctx, "button", "btn small ghost", "Cancel", { disabled: frozen, onClick: () => on.closePanel() }));
|
||||
actions.appendChild(control(ctx, "button", "btn sm ghost", "Cancel", { disabled: frozen, onClick: () => on.closePanel() }));
|
||||
p.appendChild(actions);
|
||||
return p;
|
||||
}
|
||||
@@ -884,7 +895,7 @@ function syncBody(ctx) {
|
||||
const a = acts[key];
|
||||
if (!a.shown) continue;
|
||||
row.appendChild(
|
||||
control(ctx, "button", "btn small" + (key === primaryOp ? " primary" : ""), a.label, {
|
||||
control(ctx, "button", "btn sm" + (key === primaryOp ? " primary" : ""), a.label, {
|
||||
disabled: ctx.mode === "idle" && !a.enabled,
|
||||
title: a.title,
|
||||
onClick: () => runStep(ctx, { op: key }),
|
||||
@@ -902,7 +913,7 @@ function syncBody(ctx) {
|
||||
// Mid-operation: one block that is the step, its files and its two buttons.
|
||||
function opBlock(ctx) {
|
||||
const { git, h, on, step } = ctx;
|
||||
const box = h.el("div", "git-op git-step is-warn");
|
||||
const box = h.el("div", "callout is-stage git-op git-step");
|
||||
box.setAttribute("role", "alert");
|
||||
box.appendChild(h.el("div", "git-step-kicker", "Next step"));
|
||||
box.appendChild(h.el("h3", "git-op-title", `${OP_WORDS[git.inProgress] || "An operation"} is in progress`));
|
||||
@@ -961,13 +972,13 @@ function prBlock(ctx) {
|
||||
if (!link.host) return null;
|
||||
box.appendChild(h.el("span", "git-pr-ask", `Which host is ${link.host}?`));
|
||||
for (const [kind, label] of Object.entries(PR_HOST_LABELS)) {
|
||||
box.appendChild(control(ctx, "button", "btn small", label, { onClick: () => on.pickPrHost(link.host, kind) }));
|
||||
box.appendChild(control(ctx, "button", "btn sm", label, { onClick: () => on.pickPrHost(link.host, kind) }));
|
||||
}
|
||||
return box;
|
||||
}
|
||||
if (!link.url || !/^https:\/\//i.test(link.url)) return null;
|
||||
box.appendChild(prLink(ctx, link.url));
|
||||
box.appendChild(copy(ctx, link.url, "btn small"));
|
||||
box.appendChild(copy(ctx, link.url, "btn sm"));
|
||||
if (bases.length) {
|
||||
const label = h.el("label", "git-pr-base", "into ");
|
||||
const sel = control(ctx, "select", null, null, {
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
// this file.
|
||||
|
||||
import { prUrl, branchUrl } from "./pr-url.js";
|
||||
// Re-exported so the view, which imports only this file, says it the one way.
|
||||
export { NOT_CONNECTED } from "./labels.js";
|
||||
|
||||
export const BRANCH_TYPES = Object.freeze(["feature", "fix", "chore", "docs", "refactor", "test"]);
|
||||
export const REMOTE_FOLD = 50;
|
||||
|
||||
@@ -26,7 +26,7 @@ export const HELP_TABS = Object.freeze([
|
||||
tab("loop", "Implementation Loop", true),
|
||||
tab("git", "The git board", false),
|
||||
tab("deps", "Update dependencies", false),
|
||||
tab("subagents", "Helpers (subagents)", false),
|
||||
tab("subagents", "Subagents", false),
|
||||
tab("ask", "Ask a quick question", false),
|
||||
tab("activities", "Activities", false),
|
||||
tab("finishing", "Stopping and finishing", false),
|
||||
@@ -35,6 +35,22 @@ export const HELP_TABS = Object.freeze([
|
||||
tab("privacy", "Privacy and where things are saved", false),
|
||||
]);
|
||||
|
||||
// Four group headings over the same order: each group is a run of neighbors in
|
||||
// HELP_TABS, so grouping never moves a tab (the stuck topic stays second).
|
||||
// The headings are drawn by wireTabs() and are never tab stops.
|
||||
export const HELP_GROUPS = Object.freeze([
|
||||
Object.freeze({ title: "Start here", from: "about" }),
|
||||
Object.freeze({ title: "Working in a session", from: "workspace" }),
|
||||
Object.freeze({ title: "Tools", from: "dashboard" }),
|
||||
Object.freeze({ title: "Reference", from: "finishing" }),
|
||||
]);
|
||||
|
||||
// The heading a tab opens a new group under, or null when it continues one.
|
||||
export function helpGroupStart(id) {
|
||||
const group = HELP_GROUPS.find((g) => g.from === id);
|
||||
return group ? group.title : null;
|
||||
}
|
||||
|
||||
// Not labels.js's BUILD_WORKFLOWS: that one leaves out quick-task, which is a
|
||||
// build as far as the person watching it is concerned. Every build in skills.js.
|
||||
const HELP_BUILD_WORKFLOWS = new Set(SKILLS.filter((s) => isBuild(s.workflow)).map((s) => s.workflow));
|
||||
|
||||
+223
-166
@@ -110,7 +110,7 @@
|
||||
<header class="topbar">
|
||||
<div class="topbar-row">
|
||||
<div class="ident">
|
||||
<span class="badge" id="badge">Pathfinder</span>
|
||||
<span class="pill is-accent is-caps badge" id="badge">Pathfinder</span>
|
||||
<h1 id="title">Plan2Code Console</h1>
|
||||
<!-- The session meter: how much this console session has done. The
|
||||
ring fills with the points (full at 15); the color is the
|
||||
@@ -138,10 +138,12 @@
|
||||
stroke-dashoffset="100"
|
||||
/>
|
||||
</svg>
|
||||
<span id="meter-words">Session: fresh</span>
|
||||
<span id="meter-words">Conversation: fresh</span>
|
||||
</button>
|
||||
<div class="meter-pop" id="meter-pop" role="dialog" aria-label="Session meter" hidden>
|
||||
<p class="meter-tip" id="meter-tip"></p>
|
||||
<!-- Shown once, the first time the pill leaves green; looks.meterTipSeen. -->
|
||||
<p class="meter-once" id="meter-once" hidden></p>
|
||||
<ul class="meter-list" id="meter-list" aria-label="What the points are made of" hidden></ul>
|
||||
<div class="meter-fresh" id="meter-fresh" hidden></div>
|
||||
<button type="button" class="linky" id="meter-help">What is this?</button>
|
||||
@@ -160,62 +162,65 @@
|
||||
<div class="progress-fill" id="progress-fill"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
id="btn-looks"
|
||||
title="Colors, theme and sound"
|
||||
aria-label="Colors, theme and sound"
|
||||
>
|
||||
<!-- A gear: ring, hub and eight teeth. -->
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<path class="gr-teeth" d="M12 8h2.6M8 12v2.6M4 8H1.4M8 4V1.4M10.83 10.83l1.84 1.84M5.17 10.83l-1.84 1.84M5.17 5.17L3.33 3.33M10.83 5.17l1.84-1.84" />
|
||||
<circle cx="8" cy="8" r="4.2" class="gr-ring" />
|
||||
<circle cx="8" cy="8" r="1.6" class="gr-hub" />
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
id="btn-about"
|
||||
title="Help"
|
||||
aria-label="Help"
|
||||
>
|
||||
<!-- Drawn, not a "?" glyph, so it does not depend on a font. -->
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<circle cx="8" cy="8" r="7" class="ab-ring" />
|
||||
<path class="ab-mark" d="M6.1 6.05a1.95 1.95 0 1 1 2.4 1.9v1.25" />
|
||||
<circle cx="8" cy="11.7" r="0.85" class="ab-dot" />
|
||||
</svg>
|
||||
</button>
|
||||
<a
|
||||
class="icon-btn"
|
||||
id="btn-feedback"
|
||||
href="https://github.com/jparkerweb/plan2code/issues/new/choose"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="Report a bug or suggest an idea"
|
||||
aria-label="Report a bug or suggest an idea (opens GitHub in a new tab)"
|
||||
>
|
||||
<!-- A megaphone: horn, handle and two sound waves. -->
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<path class="mg-body" d="M1.8 6.2h2.8L10.4 3v10L4.6 9.8H1.8z" />
|
||||
<path class="mg-line" d="M4.6 9.8l.9 3.4h1.6l-.6-2.7M12.4 6.1a2.6 2.6 0 0 1 0 3.8M13.8 4.5a5 5 0 0 1 0 7" />
|
||||
</svg>
|
||||
</a>
|
||||
<!-- Activities: small games for a long wait. Opens a dialog that pauses
|
||||
the moment Plan2Code needs the person; nothing in it reaches the agent. -->
|
||||
<button type="button" class="icon-btn" id="btn-activities" title="Activities" aria-label="Activities">
|
||||
<!-- A die: a rounded square and five pips. -->
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<rect class="dc-body" x="2" y="2" width="12" height="12" rx="2.6" />
|
||||
<circle class="dc-pip" cx="5.4" cy="5.4" r="1" />
|
||||
<circle class="dc-pip" cx="10.6" cy="5.4" r="1" />
|
||||
<circle class="dc-pip" cx="8" cy="8" r="1" />
|
||||
<circle class="dc-pip" cx="5.4" cy="10.6" r="1" />
|
||||
<circle class="dc-pip" cx="10.6" cy="10.6" r="1" />
|
||||
</svg>
|
||||
</button>
|
||||
<!-- The four tools, one group: the margin and gap live here, not on each button. -->
|
||||
<div class="topbar-tools">
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
id="btn-looks"
|
||||
title="User Preferences"
|
||||
aria-label="User Preferences"
|
||||
>
|
||||
<!-- A gear: ring, hub and eight teeth. -->
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<path class="gr-teeth" d="M12 1v2M12 21v2M1 12h2M21 12h2M18.4 5.6l1.4-1.4M5.6 5.6L4.2 4.2M18.4 18.4l1.4 1.4M5.6 18.4l-1.4 1.4" />
|
||||
<circle cx="12" cy="12" r="6.5" class="gr-ring" />
|
||||
<circle cx="12" cy="12" r="2.5" class="gr-hub" />
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
id="btn-about"
|
||||
title="Help"
|
||||
aria-label="Help"
|
||||
>
|
||||
<!-- Drawn, not a "?" glyph, so it does not depend on a font. -->
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<circle cx="12" cy="12" r="10" class="ab-ring" />
|
||||
<path class="ab-mark" d="M9.2 9.2a2.9 2.9 0 1 1 4.2 2.6c-.9.5-1.4 1-1.4 2" />
|
||||
<circle cx="12" cy="17.3" r="0.9" class="ab-dot" />
|
||||
</svg>
|
||||
</button>
|
||||
<a
|
||||
class="icon-btn"
|
||||
id="btn-feedback"
|
||||
href="https://github.com/jparkerweb/plan2code/issues/new/choose"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="Report a bug or suggest an idea"
|
||||
aria-label="Report a bug or suggest an idea (opens GitHub in a new tab)"
|
||||
>
|
||||
<!-- A megaphone: horn, handle and two sound waves. -->
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<path class="mg-body" d="M3 9.5h4l7-4v13l-7-4H3z" />
|
||||
<path class="mg-line" d="M7 14.5l1.2 5h2.4l-.9-3.8M17.5 9.5a4 4 0 0 1 0 5M20 7a7.5 7.5 0 0 1 0 10" />
|
||||
</svg>
|
||||
</a>
|
||||
<!-- Activities: small games for a long wait. Opens a dialog that pauses
|
||||
the moment Plan2Code needs the person; nothing in it reaches the agent. -->
|
||||
<button type="button" class="icon-btn" id="btn-activities" title="Activities" aria-label="Activities">
|
||||
<!-- A die: a rounded square and five pips. -->
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<rect class="dc-body" x="3" y="3" width="18" height="18" rx="4" />
|
||||
<circle class="dc-pip" cx="8" cy="8" r="1.3" />
|
||||
<circle class="dc-pip" cx="16" cy="8" r="1.3" />
|
||||
<circle class="dc-pip" cx="12" cy="12" r="1.3" />
|
||||
<circle class="dc-pip" cx="8" cy="16" r="1.3" />
|
||||
<circle class="dc-pip" cx="16" cy="16" r="1.3" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topbar-row second">
|
||||
<div class="row-left">
|
||||
@@ -223,39 +228,41 @@
|
||||
filled triangle in the highlight color, pointing the way home. -->
|
||||
<button
|
||||
type="button"
|
||||
class="btn ghost small home-btn"
|
||||
class="btn ghost sm home-btn"
|
||||
id="btn-home"
|
||||
title="Back to the dashboard"
|
||||
aria-label="Back to the dashboard"
|
||||
hidden
|
||||
>
|
||||
<svg viewBox="0 0 12 12" aria-hidden="true" focusable="false"><path d="M9.5 1.5v9L2 6z" /></svg>
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M18 4.5v15L5.5 12z" /></svg>
|
||||
<span class="topbar-label">Dashboard</span>
|
||||
</button>
|
||||
<button type="button" class="btn ghost small stop-btn" id="btn-stop">Stop session</button>
|
||||
<button type="button" class="btn ghost small brief-btn" id="btn-brief" hidden>
|
||||
<button type="button" class="btn ghost sm stop-btn" id="btn-stop">Stop session</button>
|
||||
<button type="button" class="btn ghost sm brief-btn" id="btn-brief" hidden>
|
||||
Write a brief
|
||||
</button>
|
||||
<!-- Subagents: opted-in skills only. Lit while helpers are on; a click
|
||||
opens the Subagents dialog and never toggles them itself. -->
|
||||
<button type="button" class="btn ghost small subagents-btn" id="btn-subagents" aria-pressed="false" hidden>
|
||||
<button type="button" class="btn ghost sm subagents-btn" id="btn-subagents" aria-haspopup="dialog" hidden>
|
||||
<!-- An orchestrator and its helpers: one larger node linked to three smaller ones. -->
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<path class="sa-link" d="M6.9 6.6L10.9 3.9M7.4 8h3.5M6.9 9.4l4 2.7" />
|
||||
<circle cx="4.6" cy="8" r="2.6" class="sa-hub" />
|
||||
<circle cx="12.4" cy="3" r="1.5" class="sa-node" />
|
||||
<circle cx="12.4" cy="8" r="1.5" class="sa-node" />
|
||||
<circle cx="12.4" cy="13" r="1.5" class="sa-node" />
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<path class="sa-link" d="M9.7 10.3l5.9-4.2M10 12h5.8M9.7 13.7l5.9 4.2" />
|
||||
<circle cx="6.5" cy="12" r="3.5" class="sa-hub" />
|
||||
<circle cx="18" cy="4.5" r="2.2" class="sa-node" />
|
||||
<circle cx="18" cy="12" r="2.2" class="sa-node" />
|
||||
<circle cx="18" cy="19.5" r="2.2" class="sa-node" />
|
||||
</svg>
|
||||
<span class="topbar-label" id="subagents-label">Subagents: off</span>
|
||||
</button>
|
||||
<!-- Notebook: every screen, never hidden. The person's private notes for this
|
||||
folder; a tab reaches the agent only through a send the person
|
||||
starts on the dashboard. -->
|
||||
<button type="button" class="btn ghost small notepad-btn" id="btn-notepad" title="Notebook" aria-label="Notebook">
|
||||
<button type="button" class="btn ghost sm notepad-btn" id="btn-notepad" title="Notebook" aria-label="Notebook">
|
||||
<!-- A pocket notebook: a closed cover with a spine line and an elastic band. -->
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<rect class="np-page" x="3.5" y="1.8" width="9" height="12.4" rx="1.3" />
|
||||
<path class="np-line" d="M10.2 1.8v12.4" />
|
||||
<rect class="np-band" x="9.4" y="6.5" width="1.6" height="3" rx=".5" />
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<rect class="np-page" x="5" y="2.5" width="14" height="19" rx="2" />
|
||||
<path class="np-line" d="M15 2.5v19" />
|
||||
<rect class="np-band" x="13.8" y="9.5" width="2.4" height="4.5" rx="0.8" />
|
||||
</svg>
|
||||
<span class="notepad-label">Notebook</span>
|
||||
</button>
|
||||
@@ -482,6 +489,33 @@
|
||||
<path d="m3.3 7 8.7 5 8.7-5" />
|
||||
<path d="M12 21.5V12" />
|
||||
</symbol>
|
||||
<!-- State marks and controls, drawn to the same standard (24 units, 1.8
|
||||
stroke, round caps) and used through <use> (render.js icon()): a
|
||||
check, an empty and a half and a filled circle, a grip and a close. -->
|
||||
<symbol id="ci-check" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M5 12.5l4.5 4.5L19 7.5" />
|
||||
</symbol>
|
||||
<symbol id="ci-circle" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="12" cy="12" r="7.5" />
|
||||
</symbol>
|
||||
<symbol id="ci-half" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="12" cy="12" r="7.5" />
|
||||
<path d="M12 4.5a7.5 7.5 0 0 1 0 15z" fill="currentColor" />
|
||||
</symbol>
|
||||
<symbol id="ci-dot" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="12" cy="12" r="5.5" fill="currentColor" />
|
||||
</symbol>
|
||||
<symbol id="ci-grip" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="9" cy="6" r="1.4" fill="currentColor" />
|
||||
<circle cx="15" cy="6" r="1.4" fill="currentColor" />
|
||||
<circle cx="9" cy="12" r="1.4" fill="currentColor" />
|
||||
<circle cx="15" cy="12" r="1.4" fill="currentColor" />
|
||||
<circle cx="9" cy="18" r="1.4" fill="currentColor" />
|
||||
<circle cx="15" cy="18" r="1.4" fill="currentColor" />
|
||||
</symbol>
|
||||
<symbol id="ci-close" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M6 6l12 12M18 6L6 18" />
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<!-- Planny acting out each skill while it starts up and while it works.
|
||||
@@ -1252,7 +1286,7 @@
|
||||
This page and <span data-app="Plan2Code in the terminal panel">Plan2Code in your terminal</span> are two programs, and either
|
||||
can stop without the other. Nothing you have typed is lost either way.
|
||||
</p>
|
||||
<div class="help-callout" role="note">
|
||||
<div class="callout is-stage help-callout" role="note">
|
||||
<svg class="help-callout-icon" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M12 3.5 22 20.5H2Z" />
|
||||
<path d="M12 10v5" />
|
||||
@@ -1589,8 +1623,8 @@
|
||||
on.
|
||||
</li>
|
||||
<li>
|
||||
Images go in the strip under the text. Paste one, drop one on the
|
||||
notebook or press <strong>Add image</strong>. Click a picture to see
|
||||
Pictures go in the strip under the text. Paste one, drop one on the
|
||||
notebook or press <strong>Add picture</strong>. Click a picture to see
|
||||
it full screen: the arrow keys step through them and
|
||||
<kbd>Esc</kbd> closes it. The <strong>×</strong> on a picture asks
|
||||
before it deletes it.
|
||||
@@ -1602,14 +1636,14 @@
|
||||
<li>
|
||||
It is private to this machine and never sent to Plan2Code.
|
||||
Private: the agent never reads your Notebook. A tab reaches it only
|
||||
when you start a workflow with it.
|
||||
when you start a skill with it.
|
||||
</li>
|
||||
<li>
|
||||
A lit card's confirm pane can offer <strong>Start with a note from
|
||||
your Notebook</strong>. On the dashboard, Pathfinder, Plan, Quick
|
||||
Task and UI Prototype offer it on Start fresh, Diagnose whenever
|
||||
it is lit, and Revise plan on a picked spec with no plan change
|
||||
waiting. A tab you started a workflow with wears a
|
||||
waiting. A tab you started a skill with wears a
|
||||
small <strong>sent</strong> badge.
|
||||
</li>
|
||||
<li>
|
||||
@@ -1893,8 +1927,8 @@
|
||||
while there is something to send.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Clear</strong> throws away everything you have not sent yet. It
|
||||
asks first.
|
||||
<strong>Clear</strong> throws away everything you have not sent yet, at
|
||||
once, and offers <strong>Undo</strong> for ten seconds.
|
||||
</li>
|
||||
</ul>
|
||||
<h4>Sending</h4>
|
||||
@@ -2110,17 +2144,18 @@
|
||||
</figure>
|
||||
<h4>Asking for your role</h4>
|
||||
<p>
|
||||
Until you pick a role, a one-line banner at the top asks for it, so the
|
||||
starter templates can be ordered for you.
|
||||
<strong>Set up preferences</strong> opens User Preferences;
|
||||
<strong>Not now</strong> puts the banner away. Either way it does not
|
||||
come back, and you can change your role any time from the swatch
|
||||
button.
|
||||
Your first dashboard offers only the cards. After you have started a
|
||||
skill, one quiet line at the top mentions two optional extras:
|
||||
<strong>set your role</strong>, so the starter templates can be
|
||||
ordered for you, and <strong>switch on Learning</strong>. Setting a
|
||||
role opens User Preferences; <strong>Not now</strong> puts the line
|
||||
away. Either way it does not come back, and you can change your role
|
||||
any time from the gear button.
|
||||
</p>
|
||||
<h4>When an update is out</h4>
|
||||
<p id="help-update-text">
|
||||
When a newer Plan2Code release is out, the dashboard shows
|
||||
<strong>UPDATE AVAILABLE</strong> at the top. Click it for the command
|
||||
<strong>Update available</strong> at the top. Click it for the command
|
||||
to run in your terminal, <code>plan2code update</code>; × hides it until the next
|
||||
<code>/plan2code</code>. The version at the bottom of Help links to
|
||||
the Releases page.
|
||||
@@ -2140,7 +2175,7 @@
|
||||
why.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Hide unavailable workflows</strong>, under the picker, hides
|
||||
<strong>Hide unavailable skills</strong>, under the picker, hides
|
||||
them instead. It is on to begin with, and remembered on this machine.
|
||||
</p>
|
||||
<p>
|
||||
@@ -2307,16 +2342,16 @@
|
||||
<h4>The three colors</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Green, "Session: fresh".</strong> Under
|
||||
<strong>Green, "Conversation: fresh".</strong> Under
|
||||
<span data-fact="meterYellow">5</span> points. Carry on.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Yellow, "Session: getting long".</strong> From
|
||||
<strong>Yellow, "Conversation: getting long".</strong> From
|
||||
<span data-fact="meterYellow">5</span> points. Fine for now; think
|
||||
about a fresh start after this step.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Red, "Session: time for a fresh start".</strong> From
|
||||
<strong>Red, "Conversation: time for a fresh one".</strong> From
|
||||
<span data-fact="meterRed">10</span> points. The dashboard also says so
|
||||
in a banner.
|
||||
</li>
|
||||
@@ -2489,7 +2524,7 @@
|
||||
or <strong>Match my session</strong>. A phase you leave untouched runs on
|
||||
the launch model. The one retry after a crash or a quiet agent (when retry
|
||||
is on) goes one step up (Match my session stays on the launch model),
|
||||
and the phase's helpers follow.
|
||||
and the phase's subagents follow.
|
||||
</p>
|
||||
<p>
|
||||
Click a dot in a phase's row to pick (the arrow keys move along a row);
|
||||
@@ -2497,7 +2532,7 @@
|
||||
</p>
|
||||
<h4>What is locked while it runs</h4>
|
||||
<p>
|
||||
Answers, sign-offs, launches, Workspace, Helpers and
|
||||
Answers, sign-offs, launches, Workspace, Subagents and
|
||||
<strong>Back</strong> are read-only, starting a new session is held
|
||||
back, and Ask is off, except for a question the loop is waiting on. Still
|
||||
open: Activities, Notebook, Help, Preferences, the docs and the code
|
||||
@@ -2739,22 +2774,22 @@
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<!-- Tab 16: Helpers (subagents) -->
|
||||
<!-- Tab 16: Subagents -->
|
||||
<section class="help-panel" data-tab="subagents">
|
||||
<h3>Helpers (subagents)</h3>
|
||||
<h3>Subagents</h3>
|
||||
<p>
|
||||
On most skills (all but the dashboard, Finalize, Changelog, Git and
|
||||
Handoff), Plan2Code
|
||||
can hand independent pieces of work to helpers (subagents) while it
|
||||
can hand independent pieces of work to subagents while it
|
||||
keeps the conversation with you. The <strong>Subagents</strong> button in the top bar, after
|
||||
Stop session, is lit while helpers are on.
|
||||
Stop session, is lit while subagents are on.
|
||||
</p>
|
||||
<h4>The switch</h4>
|
||||
<ul>
|
||||
<li>
|
||||
Clicking the button opens the <strong>Subagents</strong> dialog; it
|
||||
never switches helpers on or off by itself. Pick <strong>Use
|
||||
helpers</strong> or <strong>Work alone</strong>, edit the instruction
|
||||
never switches subagents on or off by itself. Pick <strong>Use
|
||||
subagents</strong> or <strong>Work alone</strong>, edit the instruction
|
||||
Plan2Code follows (<strong>Reset to default</strong> puts the
|
||||
shipped one back), and say how many may run at once.
|
||||
</li>
|
||||
@@ -2764,20 +2799,20 @@
|
||||
</li>
|
||||
<li>
|
||||
The change reaches Plan2Code at its next check-in, as a setting,
|
||||
not as something you typed. How many helpers it can really start is
|
||||
up to your agent; some have no helpers at all.
|
||||
not as something you typed. How many subagents it can really start is
|
||||
up to your agent; some have no subagents at all.
|
||||
</li>
|
||||
<li>The button only appears on skills that use helpers, and only when Plan2Code can pass the setting on.</li>
|
||||
<li>The button only appears on skills that use subagents, and only when Plan2Code can pass the setting on.</li>
|
||||
</ul>
|
||||
<h4>Helper strength</h4>
|
||||
<h4>Subagent strength</h4>
|
||||
<p>
|
||||
Under Helpers, the dialog also asks how strong the helpers should be.
|
||||
Under Subagents, the dialog also asks how strong the subagents should be.
|
||||
Like the rest of the dialog it is saved for this project and this
|
||||
skill, and it does nothing under <strong>Work alone</strong>.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Balanced</strong> (the default): each helper gets the
|
||||
<strong>Balanced</strong> (the default): each subagent gets the
|
||||
strength its job needs: light for lookups, stronger for reviews and
|
||||
design work.
|
||||
</li>
|
||||
@@ -2790,36 +2825,36 @@
|
||||
everything except lookups.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Match my session</strong>: helpers run on whatever your
|
||||
<strong>Match my session</strong>: subagents run on whatever your
|
||||
session uses; nothing is set for them.
|
||||
</li>
|
||||
</ul>
|
||||
<h4>The Subagents tab</h4>
|
||||
<ul>
|
||||
<li>
|
||||
With the first helper, a <strong>Subagents</strong> tab appears before
|
||||
With the first subagent, a <strong>Subagents</strong> tab appears before
|
||||
Ask: one row each, with what it was asked, whether it is running, done
|
||||
or failed, and a one-line result at the end. The number on the tab is
|
||||
how many are still running.
|
||||
</li>
|
||||
<li>
|
||||
Helpers report through Plan2Code, so the rows change at its
|
||||
check-ins, not live. The page cannot stop a helper; ask Plan2Code
|
||||
Subagents report through Plan2Code, so the rows change at its
|
||||
check-ins, not live. The page cannot stop a subagent; ask Plan2Code
|
||||
on the Ask tab if one should stop.
|
||||
</li>
|
||||
<li>
|
||||
Under each helper, a line such as "Standard, medium effort" shows
|
||||
what that helper actually ran with. "Session model" means the agent
|
||||
Under each subagent, a line such as "Standard, medium effort" shows
|
||||
what that subagent actually ran with. "Session model" means the agent
|
||||
could not set a strength for it, so it ran on the session's own
|
||||
model. A helper that reported neither shows no line.
|
||||
model. A subagent that reported neither shows no line.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Working alone</strong> means your agent reported it has no
|
||||
way to start helpers here. If it starts one after all, the note
|
||||
goes away and the helper's row shows instead.
|
||||
way to start subagents here. If it starts one after all, the note
|
||||
goes away and the subagent's row shows instead.
|
||||
</li>
|
||||
<li>
|
||||
Pathfinder always uses helpers for its research questions, whatever
|
||||
Pathfinder always uses subagents for its research questions, whatever
|
||||
the switch says, and they show here too.
|
||||
</li>
|
||||
<li>The tab clears when you go back to the dashboard.</li>
|
||||
@@ -2919,7 +2954,7 @@
|
||||
<li class="for-app">
|
||||
"No agent is available right now" means the session has finished or
|
||||
Plan2Code has gone quiet. Check the terminal panel, or press
|
||||
<strong>New Session</strong> if the agent has ended, to ask.
|
||||
<strong>New Session</strong> if the agent has stopped, to ask.
|
||||
</li>
|
||||
</ul>
|
||||
<p>Either way, the conversation above stays readable.</p>
|
||||
@@ -3459,14 +3494,14 @@
|
||||
nothing to copy but the command that opens the dashboard.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Paused.</strong> You pressed <strong>Stop session</strong>.
|
||||
<strong>Stopped.</strong> You pressed <strong>Stop session</strong>.
|
||||
The screen names what was saved and gives the command that picks it
|
||||
up later. Nothing else is offered.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Paused means there is more to do and your place is kept. Finished means
|
||||
this step is over.
|
||||
Stopped means there is more to do and your place is kept. Finished means
|
||||
this skill is over.
|
||||
</p>
|
||||
<h4>Running the next command</h4>
|
||||
<p id="help-finishing-command-text">
|
||||
@@ -3526,6 +3561,10 @@
|
||||
<td><kbd>Ctrl</kbd>+<kbd>Enter</kbd> (<kbd>⌘</kbd>+<kbd>Enter</kbd> on a Mac)</td>
|
||||
<td>Send your answers (not while this Help is open). In the Ask box, send the question.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>?</kbd></td>
|
||||
<td>Open Help on the topic for where you are. It does nothing while you type in a box, an editor or a dialog, or play a game.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>Enter</kbd> in the Ask box</td>
|
||||
<td>Start a new line.</td>
|
||||
@@ -3561,8 +3600,8 @@
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Appearance</strong>: Theme, Card width, Highlight color and
|
||||
Role.
|
||||
<strong>Appearance</strong>: Theme, Card width, Highlight color,
|
||||
Role and Intro.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Agents & models</strong>: the agents you can start and
|
||||
@@ -3709,7 +3748,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<strong>Back to default</strong> resets only the tab on screen:
|
||||
<strong>Reset this tab</strong> resets only the tab on screen, and offers
|
||||
Undo for a few seconds:
|
||||
Appearance's four settings (Role goes back to Not set), or every sound
|
||||
and the two Activities switches. Agents & models and System have
|
||||
nothing to reset, so it is not shown there. Your Activities best
|
||||
@@ -3879,6 +3919,7 @@
|
||||
|
||||
<dialog class="modal looks prefs" id="looks-modal" aria-labelledby="looks-title">
|
||||
<h2 id="looks-title">User Preferences</h2>
|
||||
<p class="prefs-lead" id="prefs-lead">Changes save as you make them. Agents have their own Save.</p>
|
||||
<div class="prefs-body">
|
||||
<div class="prefs-layout">
|
||||
<div id="prefs-tabs" class="prefs-tabs" role="tablist" aria-orientation="vertical" aria-label="Preference groups"></div>
|
||||
@@ -3920,7 +3961,7 @@
|
||||
</fieldset>
|
||||
<fieldset data-section="intro" class="modal-ranges">
|
||||
<legend>Intro</legend>
|
||||
<label><input type="checkbox" id="looks-skip-intro" /> <span>Always SKIP Intro</span></label>
|
||||
<label><input type="checkbox" id="looks-skip-intro" /> <span>Skip the wake-up intro</span></label>
|
||||
<p class="help">A newly opened dashboard starts with Planny asleep, waiting to be woken. Tick this to go straight to the dashboard every time.</p>
|
||||
</fieldset>
|
||||
</section>
|
||||
@@ -3928,7 +3969,7 @@
|
||||
<div class="prefs-agents" data-section="agents">
|
||||
<div class="roster-head">
|
||||
<p class="help" id="agents-intro" data-av="intro">Most people never need to change this. Plan2Code finds the agents installed on this machine and ships an up-to-date model list with every release. Open an agent to choose the models the loop uses for each strength.</p>
|
||||
<button type="button" class="btn small primary" id="agents-add" data-av="add">Add agent</button>
|
||||
<button type="button" class="btn sm primary" id="agents-add" data-av="add">Add agent</button>
|
||||
</div>
|
||||
<div class="roster" id="agents-table" data-av="table"></div>
|
||||
<span class="help" id="agents-status" data-av="status" role="status"></span>
|
||||
@@ -3942,11 +3983,15 @@
|
||||
<section class="prefs-panel" data-tab="system">
|
||||
<fieldset data-section="cleanup" class="modal-ranges">
|
||||
<legend>Cleanup</legend>
|
||||
<p class="help">Finds what Plan2Code doesn't need in your <code>~/.plan2code</code> folder: sessions nobody has opened for 30 days, and files or folders that ended up there by mistake. It also lists this project's <code>specs--completed/</code> folders nobody has touched for 30 days, and deletes one only when git tracks it, so git can restore it; one git does not track (the folder is usually gitignored) is kept, with the reason shown. You see the list before anything is deleted. Your preferences, saved folders, models, the launcher and this session always stay.</p>
|
||||
<p class="help">Finds sessions nobody has opened for 30 days, stray files in your <code>~/.plan2code</code> folder, Notebooks untouched for a month and this project's <code>specs--completed/</code> folders untouched for 30 days. You see the list and tick what to delete before anything goes.</p>
|
||||
<details class="cleanup-kept-note">
|
||||
<summary>What is kept</summary>
|
||||
<p class="help">Your preferences, saved folders, models, the launcher and this session always stay. A completed spec is deleted only when git tracks it, so git can restore it; one git does not track (the folder is usually gitignored) is kept, with the reason shown. A Notebook starts unticked, since it is your own writing.</p>
|
||||
</details>
|
||||
<div class="cleanup-list" id="cleanup-list" aria-label="What would be deleted"></div>
|
||||
<div class="models-actions">
|
||||
<button type="button" class="btn small" id="cleanup-scan">Find files to clean up</button>
|
||||
<button type="button" class="btn small danger" id="cleanup-delete" hidden>Delete these</button>
|
||||
<button type="button" class="btn sm" id="cleanup-scan">Find files to clean up</button>
|
||||
<button type="button" class="btn sm danger" id="cleanup-delete" hidden>Delete these</button>
|
||||
<span class="help" id="cleanup-status" role="status"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -4022,7 +4067,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button type="button" class="btn ghost" id="looks-reset">Back to default</button>
|
||||
<button type="button" class="btn ghost" id="looks-reset">Reset this tab</button>
|
||||
<button type="button" class="btn primary" id="looks-done">Close</button>
|
||||
</div>
|
||||
</dialog>
|
||||
@@ -4034,22 +4079,22 @@
|
||||
<dialog class="modal looks subagents" id="subagents-modal" aria-labelledby="subagents-title">
|
||||
<h2 id="subagents-title">Subagents</h2>
|
||||
<p class="modal-blurb">
|
||||
Let Plan2Code hand independent work to helpers in this skill. Saved for this
|
||||
Let Plan2Code hand independent work to subagents in this skill. Saved for this
|
||||
project and this skill.
|
||||
</p>
|
||||
<!-- On a wide dialog the switch and the cap share a row, and the four
|
||||
strengths sit side by side, so the dialog stays short. -->
|
||||
<div class="subagents-top">
|
||||
<fieldset class="modal-ranges looks-row">
|
||||
<legend>Helpers</legend>
|
||||
<label><input type="radio" name="subagents-on" value="on" /> <span>Use helpers</span></label>
|
||||
<legend>Subagents</legend>
|
||||
<label><input type="radio" name="subagents-on" value="on" /> <span>Use subagents</span></label>
|
||||
<label><input type="radio" name="subagents-on" value="off" checked /> <span>Work alone</span></label>
|
||||
</fieldset>
|
||||
<fieldset class="modal-ranges">
|
||||
<legend>At most</legend>
|
||||
<label>
|
||||
<input type="number" id="subagents-max" min="1" max="20" step="1" aria-label="At most this many helpers at once" />
|
||||
<span>helpers at once</span>
|
||||
<input type="number" id="subagents-max" min="1" max="20" step="1" aria-label="At most this many subagents at once" />
|
||||
<span>subagents at once</span>
|
||||
</label>
|
||||
<p class="help">Advisory: your agent's own limit still applies.</p>
|
||||
</fieldset>
|
||||
@@ -4058,7 +4103,7 @@
|
||||
to: Thrifty light, Balanced standard, Best strongest, and the
|
||||
session's own model with no rank. -->
|
||||
<fieldset class="modal-ranges looks-row" id="subagents-strength-row">
|
||||
<legend>Helper strength</legend>
|
||||
<legend>Subagent strength</legend>
|
||||
<label><input type="radio" name="subagents-strength" value="thrifty" /> <span class="sa-badge lvl-1"><span class="sa-bars" aria-hidden="true"><i class="on"></i><i></i><i></i></span>Thrifty</span></label>
|
||||
<label><input type="radio" name="subagents-strength" value="balanced" checked /> <span class="sa-badge lvl-2"><span class="sa-bars" aria-hidden="true"><i class="on"></i><i class="on"></i><i></i></span>Balanced</span></label>
|
||||
<label><input type="radio" name="subagents-strength" value="best" /> <span class="sa-badge lvl-3"><span class="sa-bars" aria-hidden="true"><i class="on"></i><i class="on"></i><i class="on"></i></span>Best</span></label>
|
||||
@@ -4069,7 +4114,7 @@
|
||||
<legend>Instruction</legend>
|
||||
<div id="subagents-instruction"></div>
|
||||
<div class="models-actions">
|
||||
<button type="button" class="btn small ghost" id="subagents-default">Reset to default</button>
|
||||
<button type="button" class="btn sm ghost" id="subagents-default">Reset to default</button>
|
||||
<span class="help">Passed to the agent as written, at its next check-in.</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -4089,26 +4134,27 @@
|
||||
fills the editor on open. -->
|
||||
<dialog class="modal notepad" id="notepad-modal" aria-labelledby="notepad-title">
|
||||
<h2 id="notepad-title">Notebook</h2>
|
||||
<p class="modal-blurb">A private space to keep track of notes and uploaded images related to your in-progress work on this project. Saved on this machine. <strong class="private-note">Private</strong>: the agent never reads your Notebook. A tab reaches it only when you start a workflow with it.</p>
|
||||
<p class="modal-blurb">A private space to keep track of notes and uploaded pictures related to your in-progress work on this project. Saved on this machine. <strong class="private-note">Private</strong>: the agent never reads your Notebook. A tab reaches it only when you start a skill with it.</p>
|
||||
<div class="notepad-tabbar">
|
||||
<div class="notepad-tabs" id="notepad-tabs" role="tablist" aria-label="Notebook tabs"></div>
|
||||
<button type="button" class="btn small ghost notepad-tab-new" id="notepad-tab-new">+ New tab</button>
|
||||
<button type="button" class="btn sm ghost notepad-tab-new" id="notepad-tab-new">+ New tab</button>
|
||||
</div>
|
||||
<div class="notepad-empty" id="notepad-empty" hidden>
|
||||
<p>No tabs yet. Make one to start writing.</p>
|
||||
<button type="button" class="btn small primary" id="notepad-empty-new">+ New tab</button>
|
||||
<button type="button" class="btn sm primary" id="notepad-empty-new">+ New tab</button>
|
||||
</div>
|
||||
<div class="notepad-body" id="notepad-body">
|
||||
<div class="notepad-editor" id="notepad-editor"></div>
|
||||
<p class="help notepad-sent" id="notepad-sent" hidden></p>
|
||||
<div class="notepad-images" id="notepad-images">
|
||||
<button type="button" class="btn small ghost notepad-add" id="notepad-add">Add image</button>
|
||||
<button type="button" class="btn sm ghost notepad-add" id="notepad-add">Add picture</button>
|
||||
<input type="file" accept="image/*" multiple id="notepad-file" hidden />
|
||||
<ul class="notepad-strip" id="notepad-strip" role="list" aria-label="Notebook images"></ul>
|
||||
<ul class="notepad-strip" id="notepad-strip" role="list" aria-label="Notebook pictures"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-actions notepad-actions">
|
||||
<p class="help notepad-status" id="notepad-status" aria-live="polite"></p>
|
||||
<button type="button" class="btn sm ghost" id="notepad-retry" hidden>Try again</button>
|
||||
<button type="button" class="btn ghost" id="notepad-close">Close</button>
|
||||
</div>
|
||||
</dialog>
|
||||
@@ -4119,7 +4165,7 @@
|
||||
<dialog class="modal notepad-sub" id="notepad-name-dlg" aria-labelledby="notepad-name-label">
|
||||
<form class="notepad-name-form" id="notepad-name-form" novalidate>
|
||||
<h2 id="notepad-name-label">Name this tab</h2>
|
||||
<input type="text" id="notepad-name" autocomplete="off" spellcheck="false" aria-describedby="notepad-name-error notepad-name-count" />
|
||||
<input type="text" id="notepad-name" class="is-compact" autocomplete="off" spellcheck="false" aria-describedby="notepad-name-error notepad-name-count" />
|
||||
<p class="help notepad-name-count" id="notepad-name-count"></p>
|
||||
<p class="help notepad-name-error" id="notepad-name-error" aria-live="polite"></p>
|
||||
<div class="modal-actions">
|
||||
@@ -4146,7 +4192,7 @@
|
||||
<button type="button" class="picview-step is-next" id="picview-next" aria-label="Next image">›</button>
|
||||
<div class="picview-bar">
|
||||
<p class="picview-count" id="picview-count" aria-live="polite"></p>
|
||||
<button type="button" class="btn small picview-close" id="picview-close">Close</button>
|
||||
<button type="button" class="btn sm picview-close" id="picview-close">Close</button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
@@ -4158,8 +4204,8 @@
|
||||
<p class="modal-blurb">Something to play while you wait. Private to this page, and it pauses whenever Plan2Code needs you.</p>
|
||||
<div class="activities-banner" id="activities-banner" role="status" hidden>
|
||||
<span class="activities-banner-text" id="activities-banner-text"></span>
|
||||
<button type="button" class="btn small" id="activities-unpause" hidden>Unpause game</button>
|
||||
<button type="button" class="btn small primary" id="activities-goto">Go to it</button>
|
||||
<button type="button" class="btn sm" id="activities-unpause" hidden>Unpause game</button>
|
||||
<button type="button" class="btn sm primary" id="activities-goto">Go to it</button>
|
||||
</div>
|
||||
<div class="activities-picker" id="activities-picker" hidden></div>
|
||||
<!-- The stage: the board, and in full screen the side panel beside it,
|
||||
@@ -4175,7 +4221,7 @@
|
||||
<p class="activities-rail-best" id="activities-rail-best"></p>
|
||||
<div class="activities-rail-score" id="activities-rail-score"></div>
|
||||
<p class="activities-rail-keys"><kbd>P</kbd> pauses · <kbd>R</kbd> restarts · <kbd>F</kbd> or <kbd>Esc</kbd> leaves full screen</p>
|
||||
<button type="button" class="btn small" id="activities-rail-exit">Exit full screen</button>
|
||||
<button type="button" class="btn sm" id="activities-rail-exit">Exit full screen</button>
|
||||
</aside>
|
||||
</div>
|
||||
<p class="activities-score" id="activities-score"></p>
|
||||
@@ -4223,10 +4269,10 @@
|
||||
title="Help on the workspace"
|
||||
aria-label="Help on the workspace"
|
||||
>
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<circle cx="8" cy="8" r="7" class="ab-ring" />
|
||||
<path class="ab-mark" d="M6.1 6.05a1.95 1.95 0 1 1 2.4 1.9v1.25" />
|
||||
<circle cx="8" cy="11.7" r="0.85" class="ab-dot" />
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||||
<circle cx="12" cy="12" r="10" class="ab-ring" />
|
||||
<path class="ab-mark" d="M9.2 9.2a2.9 2.9 0 1 1 4.2 2.6c-.9.5-1.4 1-1.4 2" />
|
||||
<circle cx="12" cy="17.3" r="0.9" class="ab-dot" />
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="btn primary" id="workspace-done">Close</button>
|
||||
@@ -4238,7 +4284,11 @@
|
||||
<dialog class="modal help" id="help-modal" aria-labelledby="help-title">
|
||||
<h2 id="help-title">Help</h2>
|
||||
<div class="help-layout">
|
||||
<div id="help-tabs" class="help-tabs" role="tablist" aria-orientation="vertical" aria-label="Help topics"></div>
|
||||
<div class="help-side">
|
||||
<input type="search" class="help-filter" id="help-filter" placeholder="Filter topics" aria-label="Filter topics" autocomplete="off" />
|
||||
<p class="help-filter-empty" id="help-filter-empty" role="status" hidden>No topic matches.</p>
|
||||
<div id="help-tabs" class="help-tabs" role="tablist" aria-orientation="vertical" aria-label="Help topics"></div>
|
||||
</div>
|
||||
<div id="help-panels" class="help-panels"></div>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
@@ -4268,28 +4318,28 @@
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="3.5" y="9" width="12" height="9" rx="1.6" transform="rotate(-12 9.5 13.5)" /><rect x="8.5" y="6" width="12" height="9" rx="1.6" /></svg>
|
||||
</span>
|
||||
<h3>Pick a card</h3>
|
||||
<p>Start with <strong>Suggested</strong>. Pathfinder for a foggy idea, Quick Task for something small.</p>
|
||||
<p>Start with <strong>Suggested</strong>.</p>
|
||||
</div>
|
||||
<div class="welcome-col">
|
||||
<span class="welcome-dot is-stage">
|
||||
<svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><circle cx="10" cy="10" r="7" opacity="0.35" /><circle cx="10" cy="10" r="7" pathLength="100" stroke-dasharray="50 100" stroke-dashoffset="25" transform="rotate(-90 10 10)" /></svg>
|
||||
</span>
|
||||
<h3>Refresh at half way</h3>
|
||||
<p id="welcome-refresh-text">Once the session meter passes half, finish the step and start a new conversation.</p>
|
||||
<h3>Answer, then Send</h3>
|
||||
<p>Nothing leaves this page until you press <strong>Send to Plan2Code</strong>.</p>
|
||||
</div>
|
||||
<div class="welcome-col">
|
||||
<span class="welcome-dot is-bare">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="3.5" y="5" width="17" height="14" rx="2" /><path d="M7.5 10l3 2-3 2M12.5 14.5h4" /></svg>
|
||||
</span>
|
||||
<h3>Come back</h3>
|
||||
<p><code>/plan2code</code> in your agent, or <code>plan2code</code> in any folder.</p>
|
||||
<h3>Watch the terminal</h3>
|
||||
<p id="welcome-terminal-text">If the page goes quiet, your agent may be asking permission there.</p>
|
||||
</div>
|
||||
<div class="welcome-col">
|
||||
<span class="welcome-dot is-plain">
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M12 8h2.6M8 12v2.6M4 8H1.4M8 4V1.4M10.83 10.83l1.84 1.84M5.17 10.83l-1.84 1.84M5.17 5.17L3.33 3.33M10.83 5.17l1.84-1.84" /><circle cx="8" cy="8" r="4.2" /><circle cx="8" cy="8" r="1.6" /></svg>
|
||||
</span>
|
||||
<h3>Get help</h3>
|
||||
<p><kbd>?</kbd> opens Help. The gear holds your role, theme and sounds.</p>
|
||||
<p>Press <kbd>?</kbd> or the <strong>?</strong> button for Help; the gear holds your preferences.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
@@ -4355,7 +4405,7 @@
|
||||
</dialog>
|
||||
|
||||
<dialog class="modal" id="home-modal" aria-labelledby="home-title">
|
||||
<h2 id="home-title">Leave this workflow?</h2>
|
||||
<h2 id="home-title">Leave this skill?</h2>
|
||||
<p class="modal-blurb" id="home-blurb"></p>
|
||||
<!-- The same warning Stop shows: going home saves the way a stop does,
|
||||
so it loses what a stop would lose. -->
|
||||
@@ -4403,7 +4453,7 @@
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<!-- Opened from the dashboard's UPDATE AVAILABLE banner. The versions and
|
||||
<!-- Opened from the dashboard's Update available banner. The versions and
|
||||
the two copy rows are filled by app.js; the update itself runs in a
|
||||
terminal, never from this page. -->
|
||||
<dialog class="modal" id="update-modal" aria-labelledby="update-title">
|
||||
@@ -4413,13 +4463,20 @@
|
||||
<li>
|
||||
<span id="update-step-run">Run this in your terminal (not in this page or your agent):</span>
|
||||
<div class="update-command" id="update-command"></div>
|
||||
It updates everything that was installed (the skills, the <code>plan2code</code>
|
||||
command and any extras you added), with no menu. If the <code>plan2code</code>
|
||||
command is not installed, run this instead:
|
||||
<div class="update-command" id="update-fallback"></div>
|
||||
Back at your prompt with no output at all? npm
|
||||
could not reach the repository and hid the reason: run
|
||||
<code>git ls-remote https://github.com/jparkerweb/plan2code.git</code> to see it.
|
||||
<details class="update-more" id="update-more">
|
||||
<summary>Command not found, or nothing happened?</summary>
|
||||
<p>
|
||||
The command updates everything that was installed (the skills, the
|
||||
<code>plan2code</code> command and any extras you added), with no menu. If the
|
||||
<code>plan2code</code> command is not installed, run this instead:
|
||||
</p>
|
||||
<div class="update-command" id="update-fallback"></div>
|
||||
<p>
|
||||
Back at your prompt with no output at all? npm
|
||||
could not reach the repository and hid the reason: run
|
||||
<code>git ls-remote https://github.com/jparkerweb/plan2code.git</code> to see it.
|
||||
</p>
|
||||
</details>
|
||||
</li>
|
||||
<li id="update-step-restart">When it finishes, close this console and start <code>plan2code</code> again.</li>
|
||||
</ol>
|
||||
|
||||
@@ -12,6 +12,13 @@ import { SKILLS, isPhased } from "./skills.js";
|
||||
// from skills.js.
|
||||
export const BUILD_WORKFLOWS = new Set(SKILLS.filter((s) => isPhased(s.workflow)).map((s) => s.workflow));
|
||||
|
||||
// The one phrase for a page that has lost the server (Help's "Not connected"
|
||||
// state). A place may add its own tail. "Not running" and "gone quiet" are for
|
||||
// the agent only.
|
||||
export const NOT_CONNECTED = "Not connected right now.";
|
||||
export const NOT_CONNECTED_KEPT = "Your text is kept and saves when it is back.";
|
||||
export const notConnected = (tail) => (tail ? `${NOT_CONNECTED} ${tail}` : NOT_CONNECTED);
|
||||
|
||||
const PHASE_TASK = /^Task (\d+)\.(\d+) of (\d+)/;
|
||||
|
||||
export function taskLabel(text) {
|
||||
@@ -33,3 +40,44 @@ export function workingLine(agent, headline, workflow) {
|
||||
if (typeof agent.activity === "string" && agent.activity.trim()) return activityLabel(agent.activity.trim(), workflow);
|
||||
return typeof headline?.note === "string" ? headline.note.trim() : "";
|
||||
}
|
||||
|
||||
// One way to write a time: how long ago, then the short date and time, "6 h ago
|
||||
// · Nov 15, 3:42 PM". `now` is a parameter so a test can fix it. Nothing for an
|
||||
// unreadable time. The full stamp goes in a title (whenTitle).
|
||||
const MINUTE = 60_000;
|
||||
const HOUR = 60 * MINUTE;
|
||||
const DAY = 24 * HOUR;
|
||||
|
||||
export function agoWords(ms) {
|
||||
if (ms < MINUTE) return "just now";
|
||||
if (ms < HOUR) return `${Math.floor(ms / MINUTE)} min ago`;
|
||||
if (ms < DAY) return `${Math.floor(ms / HOUR)} h ago`;
|
||||
if (ms < 14 * DAY) {
|
||||
const days = Math.floor(ms / DAY);
|
||||
return `${days} ${days === 1 ? "day" : "days"} ago`;
|
||||
}
|
||||
if (ms < 60 * DAY) return `${Math.floor(ms / (7 * DAY))} weeks ago`;
|
||||
if (ms < 365 * DAY) return `${Math.floor(ms / (30 * DAY))} months ago`;
|
||||
const years = Math.floor(ms / (365 * DAY));
|
||||
return `${years} ${years === 1 ? "year" : "years"} ago`;
|
||||
}
|
||||
|
||||
export function whenWords(iso, now = Date.now()) {
|
||||
const at = new Date(iso);
|
||||
if (!iso || Number.isNaN(at.getTime())) return "";
|
||||
const shortStamp = at.toLocaleString(undefined, {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
...(at.getFullYear() === new Date(now).getFullYear() ? {} : { year: "numeric" }),
|
||||
hour: "numeric",
|
||||
minute: "2-digit",
|
||||
});
|
||||
// A time ahead of the clock (a skewed file date) reads as just now.
|
||||
return `${agoWords(Math.max(0, now - at.getTime()))} · ${shortStamp}`;
|
||||
}
|
||||
|
||||
/** The full stamp, for a title: the one place the whole date and time live. */
|
||||
export function whenTitle(iso) {
|
||||
const at = new Date(iso);
|
||||
return !iso || Number.isNaN(at.getTime()) ? "" : at.toLocaleString();
|
||||
}
|
||||
@@ -33,8 +33,14 @@ export const DEFAULT_LOOKS = {
|
||||
...soundFilePrefs(null),
|
||||
width: DEFAULT_CARD_WIDTH,
|
||||
hideUnavailable: true,
|
||||
// Always SKIP Intro: never play the dashboard's first-open wake-up (Planny asleep), off by default.
|
||||
// Skip the wake-up intro: never play the dashboard's first-open wake-up (Planny asleep), off by default.
|
||||
skipIntro: false,
|
||||
// First launch: set once a skill has been launched from this machine, and
|
||||
// never cleared (not by Back to default either). Until then the dashboard
|
||||
// holds the optional extras (the role banner, Learning at the top).
|
||||
skillLaunched: false,
|
||||
// The meter's one-time "what the colors mean" line: set once it has shown.
|
||||
meterTipSeen: false,
|
||||
// Activities: the top bar's die (hidden until someone turns on Show Activities), whether its games play sounds (under Play
|
||||
// sounds, which silences them too), the game last picked, and one best score
|
||||
// per listed game (activityBestSnake) or, for a game with courses, per
|
||||
@@ -72,6 +78,8 @@ export function adoptLooks(saved) {
|
||||
if (typeof looks.hideUnavailable !== "boolean") looks.hideUnavailable = DEFAULT_LOOKS.hideUnavailable;
|
||||
looks.width = cardWidth(looks.width);
|
||||
if (typeof looks.skipIntro !== "boolean") looks.skipIntro = DEFAULT_LOOKS.skipIntro;
|
||||
if (typeof looks.skillLaunched !== "boolean") looks.skillLaunched = DEFAULT_LOOKS.skillLaunched;
|
||||
if (typeof looks.meterTipSeen !== "boolean") looks.meterTipSeen = DEFAULT_LOOKS.meterTipSeen;
|
||||
if (typeof looks.hideActivities !== "boolean") looks.hideActivities = DEFAULT_LOOKS.hideActivities;
|
||||
if (typeof looks.activitySounds !== "boolean") looks.activitySounds = DEFAULT_LOOKS.activitySounds;
|
||||
if (typeof looks.gameMusic !== "boolean") looks.gameMusic = DEFAULT_LOOKS.gameMusic;
|
||||
@@ -184,9 +192,10 @@ const effectiveTheme = () => (looks.theme === "system" ? (systemDark() ? "dark"
|
||||
|
||||
export function applyLooks() {
|
||||
const root = document.documentElement;
|
||||
// The desktop app's bar lights its buttons in the same highlight. That bar
|
||||
// is always dark, so it gets the dark shades whatever this page's theme is.
|
||||
tellApp("looks", { accent: ACCENTS[looks.accent].dark });
|
||||
// The desktop app's shell wears this page's theme and highlight: the resolved
|
||||
// theme and both shade sets, so a theme change restyles it at once. `accent`
|
||||
// stays the dark shades for an older shell.
|
||||
tellApp("looks", { accent: ACCENTS[looks.accent].dark, theme: effectiveTheme(), light: ACCENTS[looks.accent].light, dark: ACCENTS[looks.accent].dark });
|
||||
// The server's stand-in for the saved accent, which only has to last until
|
||||
// this runs. From here on the colors are set below, and a stale rule left
|
||||
// switched on would win over "Back to default".
|
||||
@@ -293,7 +302,7 @@ export function renderSwatches() {
|
||||
}
|
||||
|
||||
// "Back to default": every look returns to its default, but the role is
|
||||
// marked as asked, the welcome stays seen, and the Activities' best scores
|
||||
// marked as asked, the welcome stays seen, the first-launch and meter-tip flags stay, and the Activities' best scores
|
||||
// and last pick stay (only Reset best scores clears those), and so do the
|
||||
// played times and the picker's order (nothing clears those). Given `keys` (one
|
||||
// Preferences tab's, prefsResetScope() in prefs.js), only those change: the
|
||||
@@ -310,5 +319,5 @@ export function resetLooks(keys) {
|
||||
kept[memoKey(a.id)] = looks[memoKey(a.id)];
|
||||
kept[playedKey(a.id)] = looks[playedKey(a.id)];
|
||||
}
|
||||
looks = { ...DEFAULT_LOOKS, ...kept, role: ROLE_NOT_SET, welcomeSeen: looks.welcomeSeen };
|
||||
looks = { ...DEFAULT_LOOKS, ...kept, role: ROLE_NOT_SET, welcomeSeen: looks.welcomeSeen, skillLaunched: looks.skillLaunched, meterTipSeen: looks.meterTipSeen };
|
||||
}
|
||||
@@ -275,31 +275,31 @@ export function ringFraction(points) {
|
||||
}
|
||||
|
||||
export const WORDS = Object.freeze({
|
||||
green: "Session: fresh",
|
||||
yellow: "Session: getting long",
|
||||
red: "Session: time for a fresh start",
|
||||
green: "Conversation: fresh",
|
||||
yellow: "Conversation: getting long",
|
||||
red: "Conversation: time for a fresh one",
|
||||
});
|
||||
|
||||
export function tooltipFor(points) {
|
||||
const count = `${points} ${points === 1 ? "point" : "points"}`;
|
||||
switch (levelFor(points)) {
|
||||
case "green":
|
||||
return `This session is fresh (${count}).`;
|
||||
return `This conversation is fresh (${count}).`;
|
||||
case "yellow":
|
||||
return `This session is getting long (${count}). A fresh one will soon be sharper.`;
|
||||
return `This conversation is getting long (${count}). A fresh one will soon be sharper.`;
|
||||
default:
|
||||
return `This session has done a lot (${count}). The agent may start missing things.`;
|
||||
return `This conversation has done a lot (${count}). The agent may start missing things.`;
|
||||
}
|
||||
}
|
||||
|
||||
export const RED_BANNER =
|
||||
"This console session has done a lot. Starting a new console session will keep the agent sharp.";
|
||||
"This conversation has done a lot. Starting a new console session will keep the agent sharp.";
|
||||
|
||||
// The same advice, worded for the desktop app: there the app's own New
|
||||
// Session button already replaces the agent on a fresh context in one click,
|
||||
// so this never tells anyone to copy a command into a new conversation.
|
||||
export const RED_BANNER_IN_APP =
|
||||
"This console session has done a lot. Press New Session at the top of the window to start the agent fresh.";
|
||||
"This conversation has done a lot. Press New Session at the top of the window to start the agent fresh.";
|
||||
|
||||
// Everything the pill draws, from the ledger alone.
|
||||
export function meterView(entries) {
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
so the page's own CSS does not reach in: the console's tokens do, since custom
|
||||
properties inherit across the boundary, and one block covers both themes.
|
||||
Classes only: inline styles are refused too. */
|
||||
* { scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
|
||||
:host { display: block; height: 100%; }
|
||||
.notepad-cm { height: 100%; }
|
||||
.cm-editor { height: 100%; background: var(--panel); color: var(--ink); font-family: var(--sans); font-size: 15px; }
|
||||
.cm-editor { height: 100%; background: var(--panel); color: var(--ink); font-family: var(--sans); font-size: var(--fs-base); }
|
||||
div.cm-editor.cm-focused { outline: none; }
|
||||
div.cm-editor .cm-scroller { overflow: auto; line-height: 1.6; font-family: inherit; }
|
||||
div.cm-editor .cm-content { padding: 16px; caret-color: var(--accent); }
|
||||
@@ -34,7 +35,7 @@ div.cm-editor .cm-h2 { font-size: 1.45em; padding-top: 0.25em; }
|
||||
.cm-em { font-style: italic; }
|
||||
.cm-strike { text-decoration: line-through; color: var(--ink-3); }
|
||||
.cm-link { color: var(--accent); text-decoration: underline; }
|
||||
.cm-code { font-family: var(--mono); font-size: 0.92em; background: color-mix(in srgb, var(--rule) 70%, transparent); border-radius: 4px; padding: 0 3px; }
|
||||
.cm-code { font-family: var(--mono); font-size: 0.92em; background: color-mix(in srgb, var(--rule) 70%, transparent); border-radius: var(--radius-xs); padding: 0 3px; }
|
||||
.cm-codeblock { font-family: var(--mono); font-size: 0.92em; background: color-mix(in srgb, var(--rule) 55%, transparent); }
|
||||
.cm-fence { color: var(--ink-3); }
|
||||
div.cm-editor .cm-quote { color: var(--ink-2); border-left: 3px solid var(--accent-line); padding-left: 10px; }
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// notepad.js owns the rules for order.
|
||||
|
||||
import { dropTab } from "./notepad.js";
|
||||
import { el } from "./render.js";
|
||||
import { el, icon } from "./render.js";
|
||||
|
||||
const $ = (id) => document.getElementById(id);
|
||||
|
||||
@@ -88,7 +88,8 @@ export function createTabs({ onSwitch, onChange }) {
|
||||
});
|
||||
// The x is a button of its own beside the name, so the tab's text stays
|
||||
// its name and a double-click or a drag on the name never reaches it.
|
||||
const x = el("button", "notepad-tab-x", "×");
|
||||
const x = el("button", "notepad-tab-x");
|
||||
x.appendChild(icon("close"));
|
||||
x.type = "button";
|
||||
x.setAttribute("aria-label", "Delete " + tab.name);
|
||||
x.title = "Delete tab";
|
||||
@@ -102,7 +103,7 @@ export function createTabs({ onSwitch, onChange }) {
|
||||
// says it for a screen reader.
|
||||
if (tab.sent) {
|
||||
b.setAttribute("aria-label", tab.name + ", sent");
|
||||
const badge = el("span", "notepad-sent-badge", "sent");
|
||||
const badge = el("span", "pill is-accent notepad-sent-badge", "sent");
|
||||
badge.setAttribute("aria-hidden", "true");
|
||||
wrap.append(badge);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
// import this file. The limits mirror notepads.mjs (a test keeps them equal),
|
||||
// copied rather than imported because the page cannot load server modules.
|
||||
|
||||
import { NOT_CONNECTED_KEPT, notConnected } from "./labels.js";
|
||||
|
||||
export const SAVE_DEBOUNCE_MS = 800;
|
||||
export const RETRY_STEPS_MS = Object.freeze([1000, 2000, 4000, 8000, 16000, 30000]);
|
||||
export const NOTE_MAX_BYTES = 1024 * 1024;
|
||||
@@ -134,23 +136,23 @@ const ERROR_SENTENCES = Object.freeze({
|
||||
"too-long": `This note is too long to save. Notes can be up to ${sizeWords(NOTE_MAX_BYTES)}.`,
|
||||
"not-jpeg": "That picture could not be added. Try a PNG, JPEG or a screenshot.",
|
||||
"too-large": "That picture is too large to add. Try a smaller one.",
|
||||
"too-many": `This notepad already holds ${NOTEPAD_MAX_IMAGES} pictures, the most it can keep. Delete one to add another.`,
|
||||
"not-found": "That picture is no longer in this notepad.",
|
||||
"too-many": `This Notebook already holds ${NOTEPAD_MAX_IMAGES} pictures, the most it can keep. Delete one to add another.`,
|
||||
"not-found": "That picture is no longer in this Notebook.",
|
||||
"bad-name": `A tab name needs 1 to ${TAB_NAME_MAX} characters, with no control characters.`,
|
||||
"bad-sent": "Plan2Code could not record where that tab was sent, so nothing was changed.",
|
||||
"duplicate-name": "There is already a tab with that name.",
|
||||
"too-many-tabs": `This notepad already has ${NOTEPAD_MAX_TABS} tabs, the most it can have. Delete one to add another.`,
|
||||
"no-such-tab": "That tab is no longer in this notepad.",
|
||||
"too-many-tabs": `This Notebook already has ${NOTEPAD_MAX_TABS} tabs, the most it can have. Delete one to add another.`,
|
||||
"no-such-tab": "That tab is no longer in this Notebook.",
|
||||
});
|
||||
|
||||
const LOST_CONTACT = "Lost contact with Plan2Code. Your text is kept here and will be saved once it's back.";
|
||||
const LOST_CONTACT = notConnected(NOT_CONNECTED_KEPT);
|
||||
|
||||
// The status line when the note could not be read on first open: the editor
|
||||
// stays read-only, since anything typed would be saved over the real note.
|
||||
export const NOT_LOADED = "Could not read the note. Close the notepad and open it again.";
|
||||
export const NOT_LOADED = "Could not read the note. Close the Notebook and open it again.";
|
||||
|
||||
// The status line when the editor itself could not be loaded.
|
||||
export const EDITOR_NOT_LOADED = "The editor could not be loaded. Close the notepad and open it again.";
|
||||
export const EDITOR_NOT_LOADED = "The editor could not be loaded. Close the Notebook and open it again.";
|
||||
|
||||
// One plain sentence for a server refusal; anything else (status 0, an
|
||||
// unknown code) is treated as a lost connection.
|
||||
|
||||
@@ -85,12 +85,12 @@ export const ACCENTS = {
|
||||
},
|
||||
lemon: {
|
||||
name: "Lemon",
|
||||
light: ["#7e7607", "#fcfbee", "#ffffff", "#c5bf67"],
|
||||
light: ["#787107", "#fcfbee", "#ffffff", "#c5bf67"],
|
||||
dark: ["#f0e442", "#32301b", "#14130b", "#767242"],
|
||||
},
|
||||
olive: {
|
||||
name: "Olive",
|
||||
light: ["#72742c", "#f8f8ed", "#ffffff", "#b8ba8c"],
|
||||
light: ["#70722b", "#f8f8ed", "#ffffff", "#b8ba8c"],
|
||||
dark: ["#b5b946", "#31321b", "#14140b", "#4f5037"],
|
||||
},
|
||||
lime: {
|
||||
@@ -115,7 +115,7 @@ export const ACCENTS = {
|
||||
},
|
||||
mint: {
|
||||
name: "Mint",
|
||||
light: ["#25805a", "#effaf6", "#ffffff", "#97c4b1"],
|
||||
light: ["#247e59", "#effaf6", "#ffffff", "#97c4b1"],
|
||||
dark: ["#8be4bf", "#1b3228", "#0b1410", "#427660"],
|
||||
},
|
||||
teal: {
|
||||
@@ -125,7 +125,7 @@ export const ACCENTS = {
|
||||
},
|
||||
aqua: {
|
||||
name: "Aqua",
|
||||
light: ["#177e82", "#eefbfc", "#ffffff", "#8dc6c8"],
|
||||
light: ["#167a7e", "#eefbfc", "#ffffff", "#8dc6c8"],
|
||||
dark: ["#84e8eb", "#1b3132", "#0b1414", "#427476"],
|
||||
},
|
||||
cyan: {
|
||||
|
||||
@@ -239,7 +239,7 @@ function blockInto(parent, tokens) {
|
||||
case "blockquote": {
|
||||
// A quote that opens with `[!CAUTION]` or `[!TIP]` is a colored alert box.
|
||||
const alert = alertKind(t.tokens);
|
||||
const q = el("blockquote", alert ? `md-quote md-alert md-alert-${alert}` : "md-quote");
|
||||
const q = el("blockquote", alert ? `md-quote md-alert md-alert-${alert} callout ${alert === "caution" ? "is-warn" : "is-info"}` : "md-quote");
|
||||
blockInto(q, t.tokens);
|
||||
parent.appendChild(q);
|
||||
break;
|
||||
@@ -422,7 +422,7 @@ function selectContents(node) {
|
||||
}
|
||||
|
||||
function copyButton(text, className, source) {
|
||||
const b = el("button", className || "btn small", "Copy");
|
||||
const b = el("button", className || "btn sm", "Copy");
|
||||
b.type = "button";
|
||||
b.addEventListener("click", () =>
|
||||
copyText(text, b, "Copy", () => {
|
||||
@@ -467,6 +467,34 @@ export function approvalTip() {
|
||||
|
||||
export const SVG_NS = "http://www.w3.org/2000/svg";
|
||||
|
||||
// One symbol from the icon sheet in index.html (`ci-<name>`), drawn at the
|
||||
// size of its text. Always aria-hidden: whatever it means is said by text.
|
||||
export function icon(name, className = "mark-icon") {
|
||||
const svg = document.createElementNS(SVG_NS, "svg");
|
||||
svg.setAttribute("class", className);
|
||||
svg.setAttribute("aria-hidden", "true");
|
||||
svg.setAttribute("focusable", "false");
|
||||
const use = document.createElementNS(SVG_NS, "use");
|
||||
use.setAttribute("href", "#ci-" + name);
|
||||
svg.appendChild(use);
|
||||
return svg;
|
||||
}
|
||||
|
||||
// Text only assistive tech reads ("ready to send" beside a mark).
|
||||
export function hiddenText(text) {
|
||||
return el("span", "sr-only", text);
|
||||
}
|
||||
|
||||
// A state mark: the symbol, hidden from assistive tech, and its meaning as
|
||||
// hidden text. The title stays for the pointer.
|
||||
export function stateMark(className, name, label) {
|
||||
const mark = el("span", className);
|
||||
mark.title = label;
|
||||
mark.appendChild(icon(name));
|
||||
mark.appendChild(hiddenText(label));
|
||||
return mark;
|
||||
}
|
||||
|
||||
// A time of day for a chat message; empty when the stamp does not parse.
|
||||
export function shortTime(iso) {
|
||||
try {
|
||||
|
||||
@@ -75,7 +75,7 @@ export function mountAgentsView(container, opts = {}) {
|
||||
const split = el("div", "split");
|
||||
const list = el("div", "split-list");
|
||||
list.dataset.av = "table";
|
||||
const add = el("button", "btn small ghost split-add", "Add agent");
|
||||
const add = el("button", "btn sm ghost split-add", "Add agent");
|
||||
add.type = "button";
|
||||
add.dataset.av = "add";
|
||||
list.appendChild(add);
|
||||
@@ -199,7 +199,7 @@ export function mountAgentsView(container, opts = {}) {
|
||||
}
|
||||
|
||||
// Leaving a form for another row drops its draft, as closing it always did:
|
||||
// a dirty one asks first (the dialog's Save / Discard / Keep editing).
|
||||
// a dirty one asks first (the dialog's Keep editing / Discard / Save).
|
||||
async function leaveForm() {
|
||||
if (!ctx.openKey) return true;
|
||||
if (isDirty(ctx.saved, ctx.drafts, ctx.openKey, ctx.strengthDrafts) && !(await confirmUnsaved())) return false;
|
||||
|
||||
@@ -38,7 +38,7 @@ function agentInput(ctx, agent, key, label, placeholder, trim) {
|
||||
// The command's Test: where it would run from. Never saves.
|
||||
function agentTest(ctx, agent) {
|
||||
const wrap = el("div", "prefs-agents-test");
|
||||
const test = el("button", "btn small", "Test");
|
||||
const test = el("button", "btn sm", "Test");
|
||||
test.type = "button";
|
||||
const result = el("span", "help agent-test-result");
|
||||
result.setAttribute("role", "status");
|
||||
@@ -78,7 +78,7 @@ function modelRow(ctx, m, panel, onRemove) {
|
||||
row.appendChild(name);
|
||||
row.appendChild(panel ? panel.pills(m.id, m.label || m.id) : el("span"));
|
||||
if (onRemove) {
|
||||
const remove = el("button", "btn small ghost", "Remove");
|
||||
const remove = el("button", "btn sm ghost", "Remove");
|
||||
remove.type = "button";
|
||||
remove.setAttribute("aria-label", "Remove " + (m.label || m.id));
|
||||
remove.addEventListener("click", onRemove);
|
||||
@@ -101,7 +101,7 @@ function addModelRow(ctx, list, { nameRequired, taken }) {
|
||||
label.placeholder = nameRequired ? "Name shown in the menu" : "Name shown in the menu (optional)";
|
||||
label.setAttribute("aria-label", "Name shown in the menu");
|
||||
label.dataset.field = "models";
|
||||
const add = el("button", "btn small", "Add a model");
|
||||
const add = el("button", "btn sm", "Add a model");
|
||||
add.type = "button";
|
||||
const submit = () => {
|
||||
const value = id.value.trim();
|
||||
@@ -191,10 +191,10 @@ function modelsTab(ctx, key, draft) {
|
||||
function builtInLaunch(ctx, key) {
|
||||
const cli = cliOf(key);
|
||||
const entry = ctx.saved.builtins.find((b) => b.id === cli);
|
||||
const note = el("div", "note");
|
||||
const note = el("div", "callout is-info note");
|
||||
note.append(el("b", null, "Managed by Plan2Code. "), `The command and arguments for ${BUILT_IN[cli]} ship with the app and update with it. Only its models are yours to change.`);
|
||||
const list = el("dl", "kv");
|
||||
const state = el("span", "prefs-badge");
|
||||
const state = el("span", "pill is-neutral prefs-badge");
|
||||
const known = ctx.found.get(key);
|
||||
drawBadge(state, known ? known.state : "unknown");
|
||||
const command = el("dd");
|
||||
@@ -231,26 +231,26 @@ function addedLaunch(ctx, draft) {
|
||||
// confirm on the form itself (never the browser's confirm()).
|
||||
function formFoot(ctx, key) {
|
||||
const foot = el("div", "agent-foot prefs-agents-foot");
|
||||
const save = el("button", "btn small primary prefs-agents-save", "Save");
|
||||
const save = el("button", "btn sm primary prefs-agents-save", "Save");
|
||||
save.type = "button";
|
||||
save.addEventListener("click", () => ctx.save(key));
|
||||
const discard = el("button", "btn small ghost prefs-agents-discard", "Discard");
|
||||
const discard = el("button", "btn sm ghost prefs-agents-discard", "Discard");
|
||||
discard.type = "button";
|
||||
discard.addEventListener("click", () => ctx.discard());
|
||||
const badge = el("span", "prefs-unsaved-badge", "Unsaved");
|
||||
const badge = el("span", "pill is-warn prefs-unsaved-badge", "Unsaved");
|
||||
foot.append(save, discard, badge);
|
||||
if (ctx.formReplace) {
|
||||
const anyway = el("button", "btn small danger prefs-agents-replace", "Save anyway");
|
||||
const anyway = el("button", "btn sm danger prefs-agents-replace", "Save anyway");
|
||||
anyway.type = "button";
|
||||
anyway.addEventListener("click", () => ctx.save(key, { replace: true }));
|
||||
foot.append(anyway);
|
||||
}
|
||||
if (key.startsWith("agent:") && key !== "agent:new") {
|
||||
if (ctx.confirming) {
|
||||
const yes = el("button", "btn small danger", "Yes, delete");
|
||||
const yes = el("button", "btn sm danger", "Yes, delete");
|
||||
yes.type = "button";
|
||||
yes.addEventListener("click", () => ctx.deleteAgent(key));
|
||||
const keep = el("button", "btn small ghost", "Keep");
|
||||
const keep = el("button", "btn sm ghost", "Keep");
|
||||
keep.type = "button";
|
||||
keep.addEventListener("click", () => {
|
||||
ctx.confirming = false;
|
||||
@@ -258,7 +258,7 @@ function formFoot(ctx, key) {
|
||||
});
|
||||
foot.append(el("span", "help", "Delete this agent?"), yes, keep);
|
||||
} else {
|
||||
const del = el("button", "btn small ghost danger prefs-agents-delete", "Delete agent");
|
||||
const del = el("button", "btn sm ghost danger prefs-agents-delete", "Delete agent");
|
||||
del.type = "button";
|
||||
del.addEventListener("click", () => {
|
||||
ctx.confirming = true;
|
||||
@@ -323,11 +323,11 @@ export function drawForm(ctx) {
|
||||
if (isCli) title.append(el("span", null, BUILT_IN[cliOf(key)]), el("code", null, cliOf(key)));
|
||||
else {
|
||||
title.append(el("span", null, key === "agent:new" ? "New agent" : savedEntry(ctx.saved, key).name));
|
||||
if (key === "agent:new" && ctx.draftFrom) title.append(el("span", "tag", `From the ${ctx.draftFrom} template`));
|
||||
if (key === "agent:new" && ctx.draftFrom) title.append(el("span", "pill is-neutral tag", `From the ${ctx.draftFrom} template`));
|
||||
}
|
||||
head.appendChild(title);
|
||||
if (ctx.$("drawer")) {
|
||||
const close = el("button", "btn small ghost drawer-close", "Close");
|
||||
const close = el("button", "btn sm ghost drawer-close", "Close");
|
||||
close.type = "button";
|
||||
close.setAttribute("aria-label", "Close");
|
||||
close.addEventListener("click", () => ctx.closeDrawer());
|
||||
|
||||
@@ -16,7 +16,7 @@ export function listEditor({ list, kind = "text", field = kind === "models" ? "m
|
||||
box.replaceChildren();
|
||||
list.forEach((item, i) => {
|
||||
const row = el("div", kind === "models" ? "agent-row model" : "agent-row");
|
||||
const remove = el("button", "btn small ghost", "Remove");
|
||||
const remove = el("button", "btn sm ghost", "Remove");
|
||||
remove.type = "button";
|
||||
remove.addEventListener("click", () => {
|
||||
list.splice(i, 1);
|
||||
@@ -59,7 +59,7 @@ export function listEditor({ list, kind = "text", field = kind === "models" ? "m
|
||||
}
|
||||
box.appendChild(row);
|
||||
});
|
||||
const add = el("button", "btn small ghost", addLabel);
|
||||
const add = el("button", "btn sm ghost", addLabel);
|
||||
add.type = "button";
|
||||
add.addEventListener("click", () => {
|
||||
list.push(kind === "models" ? (optionalName ? { id: "" } : { id: "", label: "" }) : "");
|
||||
|
||||
@@ -59,6 +59,15 @@ export function strengthsPanel(ctx, agentId, draft, { models, hasEffort }) {
|
||||
const m = modelList().find((x) => x.id === id);
|
||||
return m ? m.label || m.id : id;
|
||||
};
|
||||
// The picked model as the model rows show it: the label (the description only,
|
||||
// "latest Sonnet") with its id under it, as the launcher prints them side by side.
|
||||
const modelName = (id) => {
|
||||
const label = labelOf(id);
|
||||
const span = el("span", "strength-model model-name");
|
||||
span.append(label);
|
||||
if (label !== id) span.append(el("code", null, id));
|
||||
return span;
|
||||
};
|
||||
|
||||
const box = el("div", "strength-body prefs-agents-strengths");
|
||||
const pillSets = [];
|
||||
@@ -100,7 +109,7 @@ export function strengthsPanel(ctx, agentId, draft, { models, hasEffort }) {
|
||||
label.append(wordChip(word), el("small", "help", HINTS[word]));
|
||||
row.appendChild(label);
|
||||
const pick = resolved[word];
|
||||
row.appendChild(el("span", pick ? "strength-model" : "strength-model none", pick ? labelOf(pick.model) : "not mapped"));
|
||||
row.appendChild(pick ? modelName(pick.model) : el("span", "strength-model none", "not mapped"));
|
||||
if (hasEffort) {
|
||||
const effort = el("select");
|
||||
effort.dataset.field = "effort";
|
||||
@@ -117,7 +126,7 @@ export function strengthsPanel(ctx, agentId, draft, { models, hasEffort }) {
|
||||
row.appendChild(effort);
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(user, word)) {
|
||||
const reset = el("button", "btn small ghost strength-reset", "Reset");
|
||||
const reset = el("button", "btn sm ghost strength-reset", "Reset");
|
||||
reset.type = "button";
|
||||
reset.dataset.field = "reset";
|
||||
reset.setAttribute("aria-label", `Reset ${WORDS[word]}`);
|
||||
|
||||
@@ -23,20 +23,21 @@ export const BADGES = {
|
||||
unknown: "Not checked",
|
||||
};
|
||||
|
||||
const TONE_OF = { ok: "is-ok", missing: "is-warn" };
|
||||
|
||||
export function drawBadge(badge, state) {
|
||||
badge.textContent = BADGES[state];
|
||||
badge.classList.remove("ok", "missing");
|
||||
if (state !== "unknown") badge.classList.add(state);
|
||||
badge.classList.remove("ok", "missing", "is-ok", "is-warn");
|
||||
if (state !== "unknown") badge.classList.add(state, TONE_OF[state]);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------- the prefs cards */
|
||||
|
||||
// A model's name without its gloss ("Sonnet, latest Sonnet" or "Opus plan: Opus in plan mode" is cut at the first separator), so a card line stays one line.
|
||||
const GLOSS = new RegExp(" " + String.fromCharCode(8212) + " |, |: ");
|
||||
const shortLabel = (label) => label.split(GLOSS)[0];
|
||||
|
||||
// The model each strength resolves to for one row, as [word, label, effort]
|
||||
// triples; empty while the strengths did not load.
|
||||
// The model each strength resolves to for one row, as [word, model, effort]
|
||||
// triples (model a { id, label } row, or null); empty while the strengths did
|
||||
// not load. A card line names the model by its id, the name the launcher's
|
||||
// menu, --model and the loop setup use; a label is the description only
|
||||
// ("latest Sonnet"), so it rides along as the line's tooltip.
|
||||
function strengthLines(ctx, row) {
|
||||
if (!ctx.modelsLoaded) return [];
|
||||
const isCli = row.key.startsWith("cli:");
|
||||
@@ -50,7 +51,7 @@ function strengthLines(ctx, row) {
|
||||
return STRENGTH_ORDER.map((word) => {
|
||||
const pick = resolved[word];
|
||||
const model = pick && row.models.find((m) => m.id === pick.model);
|
||||
return [word, model ? shortLabel(model.label || model.id) : null, pick && pick.effort];
|
||||
return [word, model || null, pick && pick.effort];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,10 +67,10 @@ function agentCard(ctx, row, check) {
|
||||
const top = el("span", "card-top");
|
||||
const who = el("span", "card-who");
|
||||
const name = el("span", "row-name", row.name);
|
||||
if (row.key.startsWith("agent:")) name.append(" ", el("span", "tag", "Custom"));
|
||||
if (row.key.startsWith("agent:")) name.append(" ", el("span", "pill is-neutral tag", "Custom"));
|
||||
who.append(name, el("code", null, row.command));
|
||||
top.appendChild(who);
|
||||
const badge = el("span", "prefs-badge");
|
||||
const badge = el("span", "pill is-neutral prefs-badge");
|
||||
const known = serverStateFor(ctx.saved, row);
|
||||
if (known) {
|
||||
ctx.found.set(row.key, { command: row.command, state: known });
|
||||
@@ -87,9 +88,14 @@ function agentCard(ctx, row, check) {
|
||||
const lines = strengthLines(ctx, row);
|
||||
if (lines.length) {
|
||||
const tiers = el("span", "card-tiers");
|
||||
for (const [word, label, effort] of lines) {
|
||||
for (const [word, model, effort] of lines) {
|
||||
const line = el("span", "card-tier");
|
||||
line.append(wordChip(word), label ? el("span", null, effort ? `${label} · ${effort}` : label) : el("span", "muted", "not mapped"));
|
||||
let named = el("span", "muted", "not mapped");
|
||||
if (model) {
|
||||
named = el("span", null, effort ? `${model.id} · ${effort}` : model.id);
|
||||
if (model.label && model.label !== model.id) named.title = model.label;
|
||||
}
|
||||
line.append(wordChip(word), named);
|
||||
tiers.appendChild(line);
|
||||
}
|
||||
r.appendChild(tiers);
|
||||
@@ -106,16 +112,16 @@ function agentCard(ctx, row, check) {
|
||||
// The badge a setup row's state gets: the glanceable half, with the pane
|
||||
// beside it saying what the state means and what can be done about it.
|
||||
function setupStateBadge(entry) {
|
||||
const badge = el("span", "prefs-badge");
|
||||
const badge = el("span", "pill is-neutral prefs-badge");
|
||||
if (entry.state === "found") {
|
||||
badge.textContent = "Found";
|
||||
badge.classList.add("ok");
|
||||
badge.classList.add("ok", "is-ok");
|
||||
} else if (entry.state === "outside") {
|
||||
badge.textContent = "Found outside PATH";
|
||||
badge.classList.add("missing");
|
||||
badge.classList.add("missing", "is-warn");
|
||||
} else if (entry.state === "missing") {
|
||||
badge.textContent = "Not found";
|
||||
badge.classList.add("missing");
|
||||
badge.classList.add("missing", "is-warn");
|
||||
} else {
|
||||
badge.textContent = "Not checked";
|
||||
}
|
||||
@@ -196,7 +202,7 @@ function setupStateArea(ctx, entry) {
|
||||
area.appendChild(line);
|
||||
// A session opened for one CLI only offers that one's Start.
|
||||
if (ctx.onStart && (!ctx.forCli() || entry.id === ctx.forCli())) {
|
||||
const start = el("button", "btn small primary", "Start with this agent");
|
||||
const start = el("button", "btn sm primary", "Start with this agent");
|
||||
start.type = "button";
|
||||
start.addEventListener("click", () => ctx.onStart(entry));
|
||||
area.appendChild(start);
|
||||
@@ -205,7 +211,7 @@ function setupStateArea(ctx, entry) {
|
||||
const line = el("p", "setup-agent-line");
|
||||
line.append(badge, ` Found at ${entry.path || ""}, but not on PATH`);
|
||||
area.appendChild(line);
|
||||
const use = el("button", "btn small", "Use it from here");
|
||||
const use = el("button", "btn sm", "Use it from here");
|
||||
use.type = "button";
|
||||
use.addEventListener("click", () => ctx.useFromHere(entry));
|
||||
area.appendChild(use);
|
||||
@@ -242,7 +248,7 @@ function templatePane(ctx, template) {
|
||||
head.appendChild(title);
|
||||
box.appendChild(head);
|
||||
if (template.note) box.appendChild(el("p", "help", template.note));
|
||||
const use = el("button", "btn small", "Use this template");
|
||||
const use = el("button", "btn sm", "Use this template");
|
||||
use.type = "button";
|
||||
use.addEventListener("click", () => {
|
||||
// Cloned: the form edits the draft in place, and saved.templates is
|
||||
@@ -274,7 +280,7 @@ export function drawSummaryPane(ctx) {
|
||||
head.appendChild(title);
|
||||
box.append(head, setupStateArea(ctx, entry));
|
||||
if (ctx.saved.agents.includes(entry)) {
|
||||
const edit = el("button", "btn small", "Edit");
|
||||
const edit = el("button", "btn sm", "Edit");
|
||||
edit.type = "button";
|
||||
edit.setAttribute("aria-label", "Edit " + (entry.name || entry.id));
|
||||
edit.addEventListener("click", () => ctx.pick("agent:" + entry.id));
|
||||
@@ -287,7 +293,7 @@ export function drawSummaryPane(ctx) {
|
||||
pane.appendChild(templatePane(ctx, template));
|
||||
return;
|
||||
}
|
||||
pane.appendChild(el("div", "split-empty", "Pick an agent on the left to see its state and the way forward."));
|
||||
pane.appendChild(el("div", "empty", "Pick an agent on the left to see its state and the way forward."));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------ the Add agent chooser */
|
||||
@@ -308,7 +314,7 @@ export function drawChooser(ctx) {
|
||||
const head = el("div", "chooser-head");
|
||||
const title = el("h3", null, "Add an agent");
|
||||
title.id = "agents-chooser-title";
|
||||
const close = el("button", "btn small ghost", "Cancel");
|
||||
const close = el("button", "btn sm ghost", "Cancel");
|
||||
close.type = "button";
|
||||
close.addEventListener("click", () => ctx.closeChooser());
|
||||
head.append(title, close);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// Plan2Code Web Console - the Ask chat, the Subagents tab, and attaching files to notes.
|
||||
|
||||
import { NOT_CONNECTED } from "../labels.js";
|
||||
import { page, saveNow, redraw, freshChat, hooks, scrollMemory, setDraft } from "../state.js";
|
||||
import { chatAnswering, chatOffline, chatView, sendState as chatSendState, newestReplyId, CHAT_MAX_CHARS, nextAbout, CHAT_MAX_ATTACHMENTS, contextOptions } from "../chat.js";
|
||||
import { finish, activity, agentAdrift, isDashboard, selSpec, byId, isOpen, loopAskLocked, loopDriving } from "../selectors.js";
|
||||
import { el, md, isMac, lightDismiss, shortTime } from "../render.js";
|
||||
import { el, icon, md, isMac, lightDismiss, shortTime } from "../render.js";
|
||||
import { startersFor } from "../starters.js";
|
||||
import { looks } from "../looks.js";
|
||||
import { thumbs, uploadUrl, docChip, attachTray, CHAT_IMAGES, attachFiles, incomingFiles, deleteUrl, sentAttachments, noteImages, attachRow, openPicview, refocusThumb } from "../uploads.js";
|
||||
@@ -89,7 +90,7 @@ export function renderAsk(main, held = null) {
|
||||
const head = el("div", "ask-head");
|
||||
head.appendChild(el("h2", null, "Quick question"));
|
||||
head.appendChild(el("span", "ask-counter", v.counterText));
|
||||
const reset = el("button", "btn small ghost", "New conversation");
|
||||
const reset = el("button", "btn sm ghost", "New conversation");
|
||||
reset.type = "button";
|
||||
reset.disabled = ss.state === "offline" || chatResetting;
|
||||
reset.addEventListener("click", newConversation);
|
||||
@@ -183,7 +184,7 @@ function askStarters(ss) {
|
||||
const box = el("div", "ask-starters");
|
||||
box.appendChild(el("p", "ask-starters-lead", "Not sure what to ask? Try one of these:"));
|
||||
for (const starter of startersFor(page.S.workflow, looks.role, { hasContext: Boolean(page.local.chat.about) })) {
|
||||
const b = el("button", "ask-starter", starter.text);
|
||||
const b = el("button", "btn sm ask-starter", starter.text);
|
||||
b.type = "button";
|
||||
b.disabled = !ss.canType;
|
||||
b.addEventListener("click", () => {
|
||||
@@ -206,7 +207,7 @@ function askRow(r, ss, notes) {
|
||||
const working = r.decision === "approve" && !r.done;
|
||||
const line = el("p", working ? "ask-decision working" : "ask-decision");
|
||||
if (working) line.appendChild(el("span", "spinner tiny"));
|
||||
line.appendChild(document.createTextNode(r.decision !== "approve" ? "You declined the edit." : r.done ? "You approved the edit." : "You approved the edit, please wait..."));
|
||||
line.appendChild(document.createTextNode(r.decision !== "approve" ? "You declined the edit." : r.done ? "You approved the edit." : "You approved the edit. Applying it…"));
|
||||
row.appendChild(line);
|
||||
if (r.text) row.appendChild(el("p", "ask-text", r.text));
|
||||
return row;
|
||||
@@ -259,8 +260,8 @@ function askRow(r, ss, notes) {
|
||||
row.appendChild(tray);
|
||||
}
|
||||
if (r.pending && r.failed) {
|
||||
const fail = el("p", "ask-waiting ask-failed", "Not sent — retry");
|
||||
const retry = el("button", "btn tiny", "Retry");
|
||||
const fail = el("p", "ask-waiting ask-failed", "Not sent: retry");
|
||||
const retry = el("button", "btn xs soft", "Retry");
|
||||
retry.type = "button";
|
||||
retry.disabled = ss.state === "offline" || chatSending;
|
||||
retry.addEventListener("click", () => retryChat(r.tempId));
|
||||
@@ -285,7 +286,7 @@ function askRow(r, ss, notes) {
|
||||
}
|
||||
|
||||
function askProposal(r, ss, note) {
|
||||
const box = el("div", "ask-proposal");
|
||||
const box = el("div", "callout is-stage ask-proposal");
|
||||
box.appendChild(el("p", "note-kicker", "Proposed change"));
|
||||
box.appendChild(md(r.proposal.summary, "md"));
|
||||
const files = el("ul", "ask-proposal-files");
|
||||
@@ -303,13 +304,13 @@ function askProposal(r, ss, note) {
|
||||
}
|
||||
const busy = deciding.has(r.id) || ss.state === "offline";
|
||||
const row = el("div", "ask-proposal-actions");
|
||||
const approve = el("button", "btn small primary", "Approve");
|
||||
const approve = el("button", "btn sm primary", "Approve");
|
||||
approve.type = "button";
|
||||
approve.disabled = busy;
|
||||
approve.addEventListener("click", () => decideChat(r.id, "approve", ""));
|
||||
row.appendChild(approve);
|
||||
if (!declineOpen.has(r.id)) {
|
||||
const decline = el("button", "btn small ghost", "Decline");
|
||||
const decline = el("button", "btn sm ghost", "Decline");
|
||||
decline.type = "button";
|
||||
decline.disabled = busy;
|
||||
decline.addEventListener("click", () => {
|
||||
@@ -333,7 +334,7 @@ function askProposal(r, ss, note) {
|
||||
decideChat(r.id, "decline", input.value);
|
||||
});
|
||||
row.appendChild(input);
|
||||
const go = el("button", "btn small", "Send decline");
|
||||
const go = el("button", "btn sm", "Send decline");
|
||||
go.type = "button";
|
||||
go.disabled = busy;
|
||||
go.addEventListener("click", () => decideChat(r.id, "decline", declineOpen.get(r.id) || ""));
|
||||
@@ -352,7 +353,8 @@ function askComposer(ss) {
|
||||
if (about) {
|
||||
const chip = el("div", "ask-about-chip");
|
||||
chip.appendChild(el("span", null, "About: " + about.label));
|
||||
const x = el("button", "attach-remove", "×");
|
||||
const x = el("button", "attach-remove");
|
||||
x.appendChild(icon("close"));
|
||||
x.type = "button";
|
||||
x.setAttribute("aria-label", "Send without this");
|
||||
x.addEventListener("click", () => {
|
||||
@@ -376,7 +378,7 @@ function askComposer(ss) {
|
||||
comp.appendChild(ta.el);
|
||||
|
||||
const row = el("div", "ask-actions");
|
||||
const add = el("button", "btn small ghost", "+ Attach file");
|
||||
const add = el("button", "btn sm ghost", "+ Attach file");
|
||||
add.type = "button";
|
||||
add.setAttribute("aria-label", "Add files to this question");
|
||||
add.disabled = !ss.canType || page.local.chat.images.length >= CHAT_MAX_ATTACHMENTS;
|
||||
@@ -399,7 +401,7 @@ function askComposer(ss) {
|
||||
const counter = el("span", "ask-count");
|
||||
if (!ss.canType) {
|
||||
const cls = ss.state === "offline" ? "is-offline" : ss.state === "limit" ? "is-limit" : "is-waiting";
|
||||
row.appendChild(el("p", "ask-disabled-note " + cls, ss.text));
|
||||
row.appendChild(el("p", "ask-disabled-note " + cls + (ss.state === "offline" ? " callout is-warn" : ""), ss.text));
|
||||
} else {
|
||||
row.appendChild(counter);
|
||||
const hint = el("span", "ask-send-hint");
|
||||
@@ -413,7 +415,7 @@ function askComposer(ss) {
|
||||
// left of Send; in a browser, the line telling the person to.
|
||||
if (ss.state === "offline" && !finish()) row.appendChild(reconnectOffer("ask-reconnect"));
|
||||
|
||||
const go = el("button", "btn small primary", "Send");
|
||||
const go = el("button", "btn sm primary", "Send");
|
||||
go.type = "button";
|
||||
row.appendChild(go);
|
||||
comp.appendChild(row);
|
||||
@@ -476,7 +478,7 @@ function addContext(ss) {
|
||||
const wrap = el("span", "ask-context");
|
||||
const spec = isDashboard() ? selSpec() : page.S && page.S.specDir ? { dir: page.S.specDir } : null;
|
||||
const options = contextOptions(page.local.chat, spec);
|
||||
const btn = el("button", "btn small ghost", "+ Add context");
|
||||
const btn = el("button", "btn sm ghost", "+ Add context");
|
||||
btn.type = "button";
|
||||
btn.setAttribute("aria-haspopup", "menu");
|
||||
btn.setAttribute("aria-expanded", "false");
|
||||
@@ -551,7 +553,7 @@ function addContext(ss) {
|
||||
}
|
||||
|
||||
const CHAT_ERRORS = {
|
||||
stale: "A new conversation started. Your message is still here — press Send again.",
|
||||
stale: "A new conversation started. Your message is still here: press Send again.",
|
||||
"too-long": `That message is over ${CHAT_MAX_CHARS.toLocaleString()} characters. Shorten it and send again.`,
|
||||
image: "One of the images could not be attached. Remove it and try again.",
|
||||
file: "One of the files could not be attached. Remove it and try again.",
|
||||
@@ -713,8 +715,9 @@ export function renderAside() {
|
||||
// belong to a question stay on its own page.
|
||||
const item = page.view === "end" ? null : byId(page.selected);
|
||||
if (!item) {
|
||||
// The menu has no questions, so no notes either: the pane stays empty.
|
||||
if (!isDashboard()) aside.appendChild(el("p", "aside-empty", askOffered() ? ASK_HINT : "Pick a question to see its notes."));
|
||||
// No question, so no notes either: the pane stays empty (and its column
|
||||
// collapses, shell.css) unless the stopped loop has its one hint to give.
|
||||
if (!isDashboard() && askOffered()) aside.appendChild(el("p", "empty", ASK_HINT));
|
||||
return;
|
||||
}
|
||||
// Off the question's own page (a doc tab, Ask) "this" points at nothing on
|
||||
@@ -727,7 +730,7 @@ export function renderAside() {
|
||||
aside.appendChild(
|
||||
el(
|
||||
"p",
|
||||
"aside-empty",
|
||||
"empty",
|
||||
askOffered()
|
||||
? ASK_HINT
|
||||
: isOpen(item) && !finish()
|
||||
@@ -764,7 +767,7 @@ export function renderAside() {
|
||||
// say so, because the reply may have changed what the question asks.
|
||||
const last = thread[thread.length - 1];
|
||||
if (item.noted === true && isOpen(item) && !finish() && last && threadWho(last) === "agent") {
|
||||
const tag = el("p", "pill noted-tag", "Plan2Code replied, check this still fits");
|
||||
const tag = el("p", "pill is-stage noted-tag", "Plan2Code replied, check this still fits");
|
||||
tag.setAttribute("role", "note");
|
||||
aside.appendChild(tag);
|
||||
}
|
||||
@@ -840,7 +843,7 @@ const SUGGEST_KINDS = ["choice", "multi", "confirm", "lessons"];
|
||||
// stays in the panel: on the chip when it is live again, else the note box.
|
||||
function suggestChip(item) {
|
||||
const st = suggestState(item);
|
||||
const chip = el("button", "btn tiny suggest-chip", "Ask for suggestions");
|
||||
const chip = el("button", "btn xs soft suggest-chip", "Ask for suggestions");
|
||||
chip.type = "button";
|
||||
chip.id = "suggest-" + item.id;
|
||||
chip.setAttribute("aria-label", "Ask Plan2Code for suggestions on this question");
|
||||
@@ -882,7 +885,7 @@ function sentWaitingTag() {
|
||||
}
|
||||
|
||||
function suggestTag() {
|
||||
return el("span", "pill suggest-tag", "Asked for suggestions");
|
||||
return el("span", "pill is-accent suggest-tag", "Asked for suggestions");
|
||||
}
|
||||
|
||||
// The helpers the agent reported, as it last posted them. Everything here is
|
||||
@@ -894,7 +897,7 @@ export function renderSubagents(main) {
|
||||
const { alone, rows } = helperRows(page.S.helpers);
|
||||
if (alone) {
|
||||
card.appendChild(
|
||||
el("p", "sa-alone", "Working alone: your agent has no way to start helpers here, so it is doing this skill's work itself.")
|
||||
el("p", "sa-alone", "Working alone: your agent has no way to start subagents here, so it is doing this skill's work itself.")
|
||||
);
|
||||
main.appendChild(card);
|
||||
return;
|
||||
@@ -947,9 +950,12 @@ export function renderSubagentsButton() {
|
||||
btn.hidden = !offer;
|
||||
if (!offer) return;
|
||||
const label = switchLabel(page.subagentsFrame);
|
||||
btn.setAttribute("aria-pressed", String(Boolean(page.subagentsFrame.on)));
|
||||
// The state lives in the label and a data attribute (the lit look), never in
|
||||
// aria-pressed: the button opens a dialog, it does not toggle.
|
||||
btn.dataset.on = String(Boolean(page.subagentsFrame.on));
|
||||
btn.title = label;
|
||||
btn.setAttribute("aria-label", label);
|
||||
$("subagents-label").textContent = label;
|
||||
// The Subagents switch is the person's setting for the next agent; the loop's phases are already started.
|
||||
btn.disabled = page.gone || loopDriving();
|
||||
}
|
||||
@@ -967,6 +973,7 @@ export function openSubagents() {
|
||||
const strength = STRENGTHS.includes(page.subagentsFrame.strength) ? page.subagentsFrame.strength : DEFAULT_STRENGTH;
|
||||
for (const radio of document.querySelectorAll('input[name="subagents-strength"]')) radio.checked = radio.value === strength;
|
||||
syncStrengthHelp();
|
||||
loadedSubagents = subagentsFields();
|
||||
$("subagents-checkin").textContent = CHECKIN_LINE;
|
||||
const research = $("subagents-research");
|
||||
research.textContent = PATHFINDER_RESEARCH_LINE;
|
||||
@@ -979,6 +986,90 @@ export function openSubagents() {
|
||||
if (checked) checked.focus();
|
||||
}
|
||||
|
||||
// The dialog's four fields as they stand now: the Instruction (the default's
|
||||
// text and an empty box both count as the default), the number, the switch and
|
||||
// the strength. Compared with what openSubagents loaded to see an edit.
|
||||
let loadedSubagents = null;
|
||||
function subagentsFields() {
|
||||
const on = document.querySelector('input[name="subagents-on"]:checked');
|
||||
const strength = document.querySelector('input[name="subagents-strength"]:checked');
|
||||
return {
|
||||
on: Boolean(on && on.value === "on"),
|
||||
max: String($("subagents-max").value),
|
||||
strength: strength ? strength.value : DEFAULT_STRENGTH,
|
||||
instruction: instr().value.trim(),
|
||||
};
|
||||
}
|
||||
export function subagentsDirty() {
|
||||
if (!loadedSubagents) return false;
|
||||
const now = subagentsFields();
|
||||
return Object.keys(now).some((k) => now[k] !== loadedSubagents[k]);
|
||||
}
|
||||
|
||||
// The unsaved prompt, inside the dialog (never confirm()), in Preferences'
|
||||
// order: Keep editing, Discard, Save, with focus on Keep editing. Resolves true
|
||||
// when the dialog may close.
|
||||
let askingSubagents = null;
|
||||
function wireSubagentsPrompt() {
|
||||
const box = el("div", "prefs-unsaved");
|
||||
box.id = "subagents-unsaved";
|
||||
box.hidden = true;
|
||||
box.setAttribute("role", "alertdialog");
|
||||
box.setAttribute("aria-labelledby", "subagents-unsaved-title");
|
||||
const inner = el("div", "prefs-unsaved-box");
|
||||
const title = el("h3", null, "Discard your changes?");
|
||||
title.id = "subagents-unsaved-title";
|
||||
const keep = el("button", "btn sm ghost", "Keep editing");
|
||||
keep.type = "button";
|
||||
keep.id = "subagents-unsaved-keep";
|
||||
const discard = el("button", "btn sm ghost", "Discard");
|
||||
discard.type = "button";
|
||||
discard.id = "subagents-unsaved-discard";
|
||||
const save = el("button", "btn sm primary", "Save");
|
||||
save.type = "button";
|
||||
save.id = "subagents-unsaved-save";
|
||||
const end = (go) => {
|
||||
box.hidden = true;
|
||||
for (const n of behindSubagentsPrompt()) n.inert = false;
|
||||
const { resolve } = askingSubagents;
|
||||
askingSubagents = null;
|
||||
resolve(go);
|
||||
};
|
||||
keep.addEventListener("click", () => {
|
||||
end(false);
|
||||
const first = document.querySelector('input[name="subagents-on"]:checked');
|
||||
if (first) first.focus();
|
||||
});
|
||||
discard.addEventListener("click", () => end(true));
|
||||
save.addEventListener("click", async () => {
|
||||
save.disabled = true;
|
||||
const saved = await saveSubagents();
|
||||
save.disabled = false;
|
||||
if (askingSubagents) end(saved === true);
|
||||
});
|
||||
const actions = el("div", "prefs-unsaved-actions");
|
||||
actions.append(keep, discard, save);
|
||||
inner.append(title, actions);
|
||||
box.append(inner);
|
||||
$("subagents-modal").append(box);
|
||||
}
|
||||
const behindSubagentsPrompt = () => [$("subagents-title"), ...$("subagents-modal").querySelectorAll(":scope > :not(#subagents-unsaved)")];
|
||||
export function confirmSubagentsDiscard() {
|
||||
if (!subagentsDirty()) return Promise.resolve(true);
|
||||
if (askingSubagents) return askingSubagents.promise;
|
||||
let resolve;
|
||||
const promise = new Promise((r) => (resolve = r));
|
||||
askingSubagents = { resolve, promise };
|
||||
for (const n of behindSubagentsPrompt()) n.inert = true;
|
||||
$("subagents-unsaved").hidden = false;
|
||||
$("subagents-unsaved-save").disabled = false;
|
||||
$("subagents-unsaved-keep").focus();
|
||||
return promise;
|
||||
}
|
||||
async function closeSubagents() {
|
||||
if (await confirmSubagentsDiscard()) $("subagents-modal").close();
|
||||
}
|
||||
|
||||
// Instruction, "at most" and strength only mean anything with helpers on, so
|
||||
// they are inert under Work alone (kept as picked, for when helpers go back on).
|
||||
export function syncSubagentsFields() {
|
||||
@@ -998,12 +1089,12 @@ function syncStrengthHelp() {
|
||||
const SUBAGENTS_ERRORS = {
|
||||
max: "Pick a number from 1 to 20.",
|
||||
"too-long": "The instruction is over 2,000 characters.",
|
||||
strength: "That strength isn't one of the four choices.",
|
||||
"not-offered": "This skill doesn't use helpers.",
|
||||
bad: "That didn't save. Try again.",
|
||||
strength: "That strength is not one of the four choices.",
|
||||
"not-offered": "This skill does not use subagents.",
|
||||
bad: "That did not save. Try again.",
|
||||
};
|
||||
|
||||
const SUBAGENTS_LOST = "Lost contact with Plan2Code. Try again once it's back.";
|
||||
const SUBAGENTS_LOST = `${NOT_CONNECTED} Try again once it is back.`;
|
||||
|
||||
export async function saveSubagents() {
|
||||
const save = $("subagents-save");
|
||||
@@ -1025,10 +1116,14 @@ export async function saveSubagents() {
|
||||
const res = await postJson("/subagents", body);
|
||||
save.disabled = false;
|
||||
// The next state frame redraws the button.
|
||||
if (res.status === 200) return $("subagents-modal").close();
|
||||
if (res.status === 200) {
|
||||
$("subagents-modal").close();
|
||||
return true;
|
||||
}
|
||||
if (res.status === 400) status.textContent = SUBAGENTS_ERRORS[res.body && res.body.error] || SUBAGENTS_ERRORS.bad;
|
||||
else if (res.status === 403 || res.status === 0) status.textContent = SUBAGENTS_LOST;
|
||||
else status.textContent = SUBAGENTS_ERRORS.bad;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Whether the agent coming or going has changed what the Ask pane painted,
|
||||
@@ -1039,13 +1134,28 @@ export const askOfflineFlipped = () => (askState().send.state === "offline") !==
|
||||
export function wireAsk() {
|
||||
for (const radio of document.querySelectorAll('input[name="subagents-on"]')) radio.addEventListener("change", syncSubagentsFields);
|
||||
for (const radio of document.querySelectorAll('input[name="subagents-strength"]')) radio.addEventListener("change", syncStrengthHelp);
|
||||
lightDismiss($("subagents-modal"));
|
||||
wireSubagentsPrompt();
|
||||
lightDismiss($("subagents-modal"), confirmSubagentsDiscard);
|
||||
$("subagents-modal").addEventListener("keydown", (e) => {
|
||||
if (e.key !== "Escape") return;
|
||||
if (askingSubagents) {
|
||||
e.preventDefault();
|
||||
$("subagents-unsaved-keep").click();
|
||||
} else if (subagentsDirty()) {
|
||||
e.preventDefault();
|
||||
closeSubagents();
|
||||
}
|
||||
});
|
||||
$("subagents-modal").addEventListener("cancel", (e) => {
|
||||
if (!askingSubagents && !subagentsDirty()) return;
|
||||
e.preventDefault();
|
||||
});
|
||||
$("btn-subagents").addEventListener("click", openSubagents);
|
||||
$("subagents-default").addEventListener("click", () => {
|
||||
instr().value = defaultInstruction(page.S.workflow);
|
||||
});
|
||||
$("subagents-save").addEventListener("click", saveSubagents);
|
||||
$("subagents-cancel").addEventListener("click", () => $("subagents-modal").close());
|
||||
$("subagents-cancel").addEventListener("click", closeSubagents);
|
||||
$("subagents-modal").addEventListener("close", () => $("btn-subagents").focus());
|
||||
|
||||
// Dropping files onto the notes panel attaches them to the selected
|
||||
|
||||
@@ -42,8 +42,9 @@ import {
|
||||
lessonMissing,
|
||||
lessonEditStart,
|
||||
lessonReworded,
|
||||
startsTicked,
|
||||
} from "../answers.js";
|
||||
import { el, md } from "../render.js";
|
||||
import { el, hiddenText, icon, md, stateMark } from "../render.js";
|
||||
import {
|
||||
sentAttachments,
|
||||
incomingFiles,
|
||||
@@ -68,14 +69,14 @@ export function markFor(item) {
|
||||
// and can no longer be added to, or it was never answered and never can be.
|
||||
if (isOpen(item) && finish()) {
|
||||
return recordedAnswer(item)
|
||||
? { glyph: "✓", cls: "done", label: "sent" }
|
||||
: { glyph: "○", cls: "open", label: "left unanswered" };
|
||||
? { icon: "check", cls: "done", label: "sent" }
|
||||
: { icon: "circle", cls: "open", label: "left unanswered" };
|
||||
}
|
||||
if (page.local.staged[item.id]) return { glyph: "●", cls: "staged", label: "ready to send" };
|
||||
if (page.local.staged[item.id]) return { icon: "dot", cls: "staged", label: "ready to send" };
|
||||
if (isOpen(item) && ((page.local.sent && page.local.sent[item.id]) || submittedInFlight(item)))
|
||||
return { glyph: "◐", cls: "staged", label: "sent, waiting for Plan2Code" };
|
||||
if (!isOpen(item)) return { glyph: "✓", cls: "done", label: "answered" };
|
||||
return { glyph: "○", cls: "open", label: "waiting for you" };
|
||||
return { icon: "half", cls: "staged", label: "sent, waiting for Plan2Code" };
|
||||
if (!isOpen(item)) return { icon: "check", cls: "done", label: "answered" };
|
||||
return { icon: "circle", cls: "open", label: "waiting for you" };
|
||||
}
|
||||
|
||||
// The session's own ending, as a page of its own at the top of the rail.
|
||||
@@ -88,10 +89,10 @@ export function renderEndItem(fin) {
|
||||
const b = el("button", "rail-item");
|
||||
b.type = "button";
|
||||
b.setAttribute("aria-current", String(page.view === "end"));
|
||||
const mark = el("span", "rail-mark " + (paused ? "staged" : "done"), paused ? "❚❚" : "✓");
|
||||
mark.title = paused ? "session paused" : "session ended";
|
||||
b.appendChild(mark);
|
||||
b.appendChild(el("span", "rail-end-label", paused ? "Paused" : "Session ended"));
|
||||
b.appendChild(
|
||||
stateMark("rail-mark " + (paused ? "staged" : "done"), paused ? "half" : "check", paused ? "session stopped" : "session finished")
|
||||
);
|
||||
b.appendChild(el("span", "rail-end-label", paused ? "Stopped" : "Session finished"));
|
||||
b.addEventListener("click", () => {
|
||||
page.view = "end";
|
||||
redraw();
|
||||
@@ -237,7 +238,7 @@ export function buildPager(item) {
|
||||
if (at === -1) {
|
||||
// Reading something already settled. The only move that means anything
|
||||
// here is back to the work.
|
||||
const b = el("button", "btn small pager-btn next");
|
||||
const b = el("button", "btn sm pager-btn next");
|
||||
b.type = "button";
|
||||
const box = el("span", "pager-label");
|
||||
box.appendChild(el("span", "pager-kicker", "Back to what is waiting"));
|
||||
@@ -273,7 +274,7 @@ export function buildPager(item) {
|
||||
if (!target) return el("span", "pager-slot");
|
||||
const b = el(
|
||||
"button",
|
||||
"btn small pager-btn " + (back ? "prev" : "next") + (lead ? " lead" : " ghost")
|
||||
"btn sm pager-btn " + (back ? "prev" : "next") + (lead ? " lead" : " ghost")
|
||||
);
|
||||
b.type = "button";
|
||||
const arrow = el("span", "pager-arrow", back ? "←" : "→");
|
||||
@@ -300,7 +301,7 @@ export function buildPager(item) {
|
||||
// A notice is context for the question it sits beside, so it lives inside the
|
||||
// one card rather than as a second one under it.
|
||||
export function renderNotice(item) {
|
||||
const box = el("div", "card-note card-extra");
|
||||
const box = el("div", "callout is-info card-note card-extra");
|
||||
box.appendChild(el("p", "note-kicker", "Note"));
|
||||
box.appendChild(el("h3", "note-title", item.title));
|
||||
box.appendChild(md(item.body, "md"));
|
||||
@@ -398,7 +399,7 @@ export function renderCard(item) {
|
||||
const skipped = Boolean(staged && staged.skipped);
|
||||
// A small accent chip, like a comment box's quick answer ("No changes"),
|
||||
// rather than an underlined link that reads as fine print.
|
||||
const skip = el("button", "btn tiny", skipped ? "Do not skip" : "Skip this one");
|
||||
const skip = el("button", "btn xs soft", skipped ? "Do not skip" : "Skip this one");
|
||||
skip.type = "button";
|
||||
skip.style.marginTop = "16px";
|
||||
skip.addEventListener("click", () => {
|
||||
@@ -438,7 +439,9 @@ function renderSettled(card, item) {
|
||||
const nothing = !lines.length && !prose;
|
||||
const box = el("div", "answered" + (nothing ? " is-empty" : ""));
|
||||
const head = el("p", "answered-head");
|
||||
head.appendChild(el("span", "answered-mark", nothing ? "·" : "✓"));
|
||||
const doneMark = el("span", "answered-mark");
|
||||
doneMark.appendChild(icon(nothing ? "dot" : "check"));
|
||||
head.appendChild(doneMark);
|
||||
// A note is not an answer: say which it is.
|
||||
head.appendChild(el("span", null, nothing ? "No answer recorded" : fromNote ? "Your last note" : "Your answer"));
|
||||
box.appendChild(head);
|
||||
@@ -455,7 +458,7 @@ function renderSettled(card, item) {
|
||||
"p",
|
||||
"answered-none",
|
||||
isOpen(item)
|
||||
? "The session ended before this was answered."
|
||||
? "The session finished before this was answered."
|
||||
: "This was answered somewhere other than this page, so there is nothing to show."
|
||||
)
|
||||
);
|
||||
@@ -580,12 +583,15 @@ function lockedOptions(card, item, keys) {
|
||||
for (const o of item.options) {
|
||||
const on = picked.has(o.k);
|
||||
const li = el("li", "option is-locked" + (on ? " is-recorded" : ""));
|
||||
li.appendChild(el("span", "option-mark" + (on ? " on" : ""), on ? "✓" : "·"));
|
||||
const optMark = el("span", "option-mark" + (on ? " on" : ""));
|
||||
optMark.appendChild(icon(on ? "check" : "dot"));
|
||||
optMark.appendChild(hiddenText(on ? "chosen" : "not chosen"));
|
||||
li.appendChild(optMark);
|
||||
const body = el("div", "option-body");
|
||||
const head = el("div", "option-label");
|
||||
if (showKey(o.k, o.text)) head.appendChild(el("span", "option-key", o.k));
|
||||
if (showKey(o.k, o.text)) head.appendChild(el("span", "code-tag option-key", o.k));
|
||||
head.appendChild(el("span", null, o.text));
|
||||
if (on) head.appendChild(el("span", "pill done", "Your answer"));
|
||||
if (on) head.appendChild(el("span", "pill is-ok is-caps done", "Your answer"));
|
||||
body.appendChild(head);
|
||||
if (o.detail) body.appendChild(el("p", "option-detail", o.detail));
|
||||
li.appendChild(body);
|
||||
@@ -602,7 +608,10 @@ function lockedSteps(card, item, v) {
|
||||
const li = el("li", "step is-locked");
|
||||
li.appendChild(el("span", "step-num", String(i + 1)));
|
||||
const on = done.has(i);
|
||||
li.appendChild(el("span", "option-mark" + (on ? " on" : ""), on ? "✓" : "·"));
|
||||
const stepMark = el("span", "option-mark" + (on ? " on" : ""));
|
||||
stepMark.appendChild(icon(on ? "check" : "dot"));
|
||||
stepMark.appendChild(hiddenText(on ? "done" : "not done"));
|
||||
li.appendChild(stepMark);
|
||||
const body = el("div", "step-body");
|
||||
body.appendChild(md(typeof step === "string" ? step : step.text, "md"));
|
||||
li.appendChild(body);
|
||||
@@ -629,7 +638,7 @@ function lockedRows(card, item, v) {
|
||||
|
||||
function lockedSummary(card, item) {
|
||||
if (!item.summary) return;
|
||||
const box = el("div", "card-note");
|
||||
const box = el("div", "callout is-info card-note");
|
||||
box.appendChild(md(item.summary, "md"));
|
||||
card.appendChild(box);
|
||||
}
|
||||
@@ -760,7 +769,8 @@ function otherField(card, item, staged) {
|
||||
stageQuiet(item.id, { ...(cur || { type: "answer", kind: item.kind }), text: ta.value.trim() });
|
||||
} else if (cur && cur.text) {
|
||||
const { text, ...rest } = cur;
|
||||
if (rest.k || (rest.ks && rest.ks.length)) stageQuiet(item.id, rest);
|
||||
// On a card with starting ticks an empty pick is itself an answer ("none"), so it stays.
|
||||
if (rest.k || (rest.ks && (rest.ks.length || startsTicked(item)))) stageQuiet(item.id, rest);
|
||||
else stageQuiet(item.id, null);
|
||||
}
|
||||
stagedChanged();
|
||||
@@ -791,13 +801,13 @@ function fillKicker(kicker, item) {
|
||||
kicker.replaceChildren(document.createTextNode(topic ? topic.title : "Question"));
|
||||
|
||||
let pill = null;
|
||||
if (!isOpen(item)) pill = el("span", "pill done", item.status === "skipped" ? "Skipped" : "Answered");
|
||||
if (!isOpen(item)) pill = el("span", "pill is-ok is-caps done", item.status === "skipped" ? "Skipped" : "Answered");
|
||||
// Frozen on a finished session: the send it carries is the record, and a
|
||||
// staged leftover can no longer be sent, so it earns no pill.
|
||||
else if (finish()) pill = recordedAnswer(item) ? el("span", "pill done", "Sent") : null;
|
||||
else if (page.local.staged[item.id]) pill = el("span", "pill staged", "Ready to send");
|
||||
else if (finish()) pill = recordedAnswer(item) ? el("span", "pill is-ok is-caps done", "Sent") : null;
|
||||
else if (page.local.staged[item.id]) pill = el("span", "pill is-stage is-caps staged", "Ready to send");
|
||||
else if ((page.local.sent && page.local.sent[item.id]) || submittedInFlight(item))
|
||||
pill = el("span", "pill staged", "Sent");
|
||||
pill = el("span", "pill is-stage is-caps staged", "Sent");
|
||||
if (!pill) return;
|
||||
pill.style.marginLeft = "8px";
|
||||
kicker.appendChild(pill);
|
||||
@@ -875,9 +885,9 @@ function buildChoice(card, item, staged) {
|
||||
|
||||
const body = el("div", "option-body");
|
||||
const head = el("div", "option-label");
|
||||
if (showKey(o.k, o.text)) head.appendChild(el("span", "option-key", o.k));
|
||||
if (showKey(o.k, o.text)) head.appendChild(el("span", "code-tag option-key", o.k));
|
||||
head.appendChild(el("span", null, o.text));
|
||||
if (o.recommended) head.appendChild(el("span", "pill suggested", "Suggested"));
|
||||
if (o.recommended) head.appendChild(el("span", "pill is-accent is-caps suggested", "Suggested"));
|
||||
body.appendChild(head);
|
||||
if (o.detail) body.appendChild(el("p", "option-detail", o.detail));
|
||||
|
||||
@@ -915,7 +925,7 @@ function clearIcon() {
|
||||
// call it, and they only run for a form that has not been sent.
|
||||
function clearRow(card, item) {
|
||||
const row = el("div", "btn-row options-clear");
|
||||
const b = el("button", "btn small ghost clear-btn");
|
||||
const b = el("button", "btn sm ghost clear-btn");
|
||||
b.type = "button";
|
||||
b.appendChild(clearIcon());
|
||||
b.appendChild(el("span", null, "Clear answer"));
|
||||
@@ -958,6 +968,7 @@ function multiCount(item, ks) {
|
||||
|
||||
function buildMulti(card, item, staged) {
|
||||
const locked = lockedKeys(item);
|
||||
const seeds = startsTicked(item);
|
||||
const chosen = new Set(((staged && staged.ks) || []).filter((k) => !locked.has(k)));
|
||||
const grouped = (item.options || []).some((o) => o && typeof o.group === "string" && o.group);
|
||||
const list = el("ul", "options");
|
||||
@@ -988,7 +999,9 @@ function buildMulti(card, item, staged) {
|
||||
box.id = optionId(item, o, i);
|
||||
box.value = o.k;
|
||||
box.checked = on;
|
||||
box.setAttribute("aria-label", o.k ? `${o.k}: ${o.text}` : o.text);
|
||||
const tag = typeof o.tag === "string" ? o.tag.trim() : "";
|
||||
const named = o.k ? `${o.k}: ${o.text}` : o.text;
|
||||
box.setAttribute("aria-label", tag ? `${named}, ${tag}` : named);
|
||||
if (isLocked) {
|
||||
box.disabled = true;
|
||||
box.setAttribute("aria-disabled", "true");
|
||||
@@ -1002,7 +1015,7 @@ function buildMulti(card, item, staged) {
|
||||
// Unticking the last box keeps what is written in "Anything else".
|
||||
stage(
|
||||
item.id,
|
||||
withNote(item, next.size ? { type: "answer", kind: "multi", ks: [...next] } : null, {
|
||||
withNote(item, next.size ? { type: "answer", kind: "multi", ks: [...next] } : seeds ? { type: "answer", kind: "multi", ks: [] } : null, {
|
||||
type: "answer",
|
||||
kind: "multi",
|
||||
ks: [],
|
||||
@@ -1012,9 +1025,11 @@ function buildMulti(card, item, staged) {
|
||||
|
||||
const body = el("div", "option-body");
|
||||
const head = el("div", "option-label");
|
||||
if (showKey(o.k, o.text)) head.appendChild(el("span", "option-key", o.k));
|
||||
if (showKey(o.k, o.text)) head.appendChild(el("span", "code-tag option-key", o.k));
|
||||
head.appendChild(el("span", null, o.text));
|
||||
if (o.recommended) head.appendChild(el("span", "pill suggested", "Suggested"));
|
||||
if (o.recommended) head.appendChild(el("span", "pill is-accent is-caps suggested", "Suggested"));
|
||||
// The agent's note on the row, drawn as a pill; it never moves with the tick.
|
||||
if (tag) head.appendChild(el("span", "pill is-neutral tag", tag));
|
||||
body.appendChild(head);
|
||||
if (o.detail) body.appendChild(el("p", "option-detail", o.detail));
|
||||
|
||||
@@ -1028,7 +1043,7 @@ function buildMulti(card, item, staged) {
|
||||
const key = moreKey(item, o);
|
||||
const open = openMore.has(key);
|
||||
const bodyId = `more-${item.id}-${o.k || i}`;
|
||||
const toggle = el("button", "option-more-btn", open ? "Less" : "More");
|
||||
const toggle = el("button", "btn xs soft option-more-btn", open ? "Less" : "More");
|
||||
toggle.type = "button";
|
||||
// Stable across redraws, so the click handler can find the new button.
|
||||
toggle.id = `more-btn-${item.id}-${o.k || i}`;
|
||||
@@ -1101,13 +1116,13 @@ function renderPresets(card, item, staged) {
|
||||
const now = new Set((staged && staged.ks) || []);
|
||||
for (const p of presets) {
|
||||
const on = p.ks.length === now.size && p.ks.every((k) => now.has(k));
|
||||
const b = el("button", "btn small" + (on ? " primary" : " ghost"), p.label);
|
||||
const b = el("button", "btn sm" + (on ? " primary" : " ghost"), p.label);
|
||||
b.type = "button";
|
||||
b.setAttribute("aria-pressed", String(on));
|
||||
b.addEventListener("click", () =>
|
||||
stage(
|
||||
item.id,
|
||||
withNote(item, on ? null : { type: "answer", kind: "multi", ks: [...p.ks] }, {
|
||||
withNote(item, on ? (startsTicked(item) ? { type: "answer", kind: "multi", ks: [] } : null) : { type: "answer", kind: "multi", ks: [...p.ks] }, {
|
||||
type: "answer",
|
||||
kind: "multi",
|
||||
ks: [],
|
||||
@@ -1188,7 +1203,7 @@ function buildText(card, item, staged) {
|
||||
input.addEventListener("input", check);
|
||||
|
||||
if (suggestion) {
|
||||
fill = el("button", "btn tiny", "Autofill suggestion");
|
||||
fill = el("button", "btn xs soft", "Autofill suggestion");
|
||||
fill.type = "button";
|
||||
fill.title = "Put the example into the box. It is yours to edit from there.";
|
||||
fill.hidden = Boolean(input.value.trim());
|
||||
@@ -1249,9 +1264,9 @@ function templateRow(item, input, entries, check) {
|
||||
fitGrowBox();
|
||||
};
|
||||
const chips = entries.map((entry) => {
|
||||
const chip = el("button", "tpl-chip", entry.label);
|
||||
const chip = el("button", "btn sm tpl-chip", entry.label);
|
||||
chip.type = "button";
|
||||
if (entry.forYou) chip.appendChild(el("span", "tpl-pill", "For your role"));
|
||||
if (entry.forYou) chip.appendChild(el("span", "pill is-accent tpl-pill", "For your role"));
|
||||
chip.addEventListener("click", () => pick(entry));
|
||||
row.appendChild(chip);
|
||||
return chip;
|
||||
@@ -1286,13 +1301,13 @@ function templateRow(item, input, entries, check) {
|
||||
return;
|
||||
}
|
||||
dropStrip();
|
||||
strip = el("div", "tpl-replace");
|
||||
strip = el("div", "callout is-stage tpl-replace");
|
||||
strip.setAttribute("role", "alert");
|
||||
strip.appendChild(el("span", null, "Replace what you typed?"));
|
||||
const replace = el("button", "btn tiny primary", "Replace");
|
||||
const replace = el("button", "btn xs soft primary", "Replace");
|
||||
replace.type = "button";
|
||||
replace.addEventListener("click", () => apply(entry, sw.text));
|
||||
const keep = el("button", "btn tiny ghost", "Keep mine");
|
||||
const keep = el("button", "btn xs soft", "Keep mine");
|
||||
keep.type = "button";
|
||||
keep.addEventListener("click", () => {
|
||||
dropStrip();
|
||||
@@ -1334,7 +1349,7 @@ function buildConfirm(card, item, staged) {
|
||||
if (item.consequences) {
|
||||
// "is-consequences": the command here is what Yes runs, so no "paste it
|
||||
// into the Ask tab" nudge under it (app.css).
|
||||
const note = el("div", "card-note is-consequences");
|
||||
const note = el("div", "callout is-info card-note is-consequences");
|
||||
note.appendChild(md(item.consequences, "md"));
|
||||
card.appendChild(note);
|
||||
}
|
||||
@@ -1367,7 +1382,7 @@ function buildRecap(card, item, staged) {
|
||||
// The recap is not optional: a click captured the pick, this captures the
|
||||
// agreement. Rendered as a document so it reads like a summary, not a form.
|
||||
if (item.summary) {
|
||||
const box = el("div", "card-note");
|
||||
const box = el("div", "callout is-info card-note");
|
||||
box.appendChild(md(item.summary, "md"));
|
||||
card.appendChild(box);
|
||||
}
|
||||
@@ -1399,7 +1414,7 @@ function buildRecap(card, item, staged) {
|
||||
function docLink(item) {
|
||||
const doc = item.doc && docs().find((d) => d.id === item.doc);
|
||||
if (!doc) return null;
|
||||
const open = el("button", "btn small", `Read “${doc.title || "the document"}” in full`);
|
||||
const open = el("button", "btn sm", `Read “${doc.title || "the document"}” in full`);
|
||||
open.type = "button";
|
||||
open.style.marginTop = "14px";
|
||||
open.addEventListener("click", () => {
|
||||
@@ -1411,7 +1426,7 @@ function docLink(item) {
|
||||
|
||||
function buildReview(card, item, staged) {
|
||||
if (item.summary) {
|
||||
const box = el("div", "card-note");
|
||||
const box = el("div", "callout is-info card-note");
|
||||
box.appendChild(md(item.summary, "md"));
|
||||
card.appendChild(box);
|
||||
}
|
||||
@@ -1542,7 +1557,7 @@ function buildMenu(card, item, staged) {
|
||||
const body = el("div", "option-body");
|
||||
const head = el("div", "option-label");
|
||||
head.appendChild(el("span", null, text));
|
||||
if (o.recommended) head.appendChild(el("span", "pill suggested", "Suggested"));
|
||||
if (o.recommended) head.appendChild(el("span", "pill is-accent is-caps suggested", "Suggested"));
|
||||
body.appendChild(head);
|
||||
if (o.detail) body.appendChild(el("p", "option-detail", o.detail));
|
||||
label.appendChild(radio);
|
||||
@@ -1554,7 +1569,7 @@ function buildMenu(card, item, staged) {
|
||||
clearRow(card, item);
|
||||
|
||||
if (item.command) {
|
||||
const note = el("div", "card-note");
|
||||
const note = el("div", "callout is-info card-note");
|
||||
note.appendChild(el("p", "help", "To pick this up in a fresh session, run:"));
|
||||
note.appendChild(md("```\n" + handoffText({ command: item.command }) + "\n```", "md"));
|
||||
card.appendChild(note);
|
||||
@@ -1614,7 +1629,8 @@ function buildList(card, item, staged) {
|
||||
commit(next);
|
||||
});
|
||||
|
||||
const handle = el("button", "row-handle", "⠿");
|
||||
const handle = el("button", "row-handle");
|
||||
handle.appendChild(icon("grip"));
|
||||
handle.type = "button";
|
||||
handle.title = "Drag to reorder";
|
||||
handle.setAttribute("aria-label", `Move “${row.title}”`);
|
||||
@@ -1660,7 +1676,7 @@ function buildList(card, item, staged) {
|
||||
li.appendChild(main);
|
||||
|
||||
const tools = el("div", "row-tools");
|
||||
const up = el("button", "btn ghost small", "↑");
|
||||
const up = el("button", "btn ghost sm", "↑");
|
||||
up.type = "button";
|
||||
up.title = "Move up";
|
||||
up.disabled = i === 0;
|
||||
@@ -1671,7 +1687,7 @@ function buildList(card, item, staged) {
|
||||
[next[at - 1], next[at]] = [next[at], next[at - 1]];
|
||||
commit(next);
|
||||
});
|
||||
const down = el("button", "btn ghost small", "↓");
|
||||
const down = el("button", "btn ghost sm", "↓");
|
||||
down.type = "button";
|
||||
down.title = "Move down";
|
||||
down.disabled = i === rows.length - 1;
|
||||
@@ -1682,7 +1698,8 @@ function buildList(card, item, staged) {
|
||||
[next[at + 1], next[at]] = [next[at], next[at + 1]];
|
||||
commit(next);
|
||||
});
|
||||
const del = el("button", "btn ghost small", "×");
|
||||
const del = el("button", "btn ghost sm");
|
||||
del.appendChild(icon("close"));
|
||||
del.type = "button";
|
||||
del.title = "Remove";
|
||||
del.setAttribute("aria-label", `Remove “${row.title}”`);
|
||||
@@ -1700,7 +1717,7 @@ function buildList(card, item, staged) {
|
||||
card.appendChild(ul);
|
||||
|
||||
const row = el("div", "btn-row");
|
||||
const add = el("button", "btn small", "Add one");
|
||||
const add = el("button", "btn sm", "Add one");
|
||||
add.type = "button";
|
||||
keepFocus(add);
|
||||
add.addEventListener("click", () =>
|
||||
@@ -1820,7 +1837,7 @@ function buildLessons(card, item, staged) {
|
||||
const foot = el("div", "lessons-foot");
|
||||
foot.appendChild(summary);
|
||||
// Sending with nothing chosen is allowed: everything keeps waiting (FR-14).
|
||||
const leave = el("button", "btn tiny" + (draft.leaveAll ? " primary" : ""), "Leave them all waiting");
|
||||
const leave = el("button", "btn xs soft" + (draft.leaveAll ? " primary" : ""), "Leave them all waiting");
|
||||
leave.type = "button";
|
||||
leave.setAttribute("aria-pressed", String(draft.leaveAll));
|
||||
leave.addEventListener("click", () => {
|
||||
@@ -1871,14 +1888,14 @@ function lessonRow(item, row, draft, commit) {
|
||||
|
||||
for (const f of Array.isArray(row.flags) ? row.flags : []) {
|
||||
const what = FLAG_WORDS[f && f.pattern] || "something personal";
|
||||
li.appendChild(el("p", "lessons-flag", `Holds what looks like ${what}${f && f.part ? ` (“${f.part}”)` : ""}. Keep only if that is intended.`));
|
||||
li.appendChild(el("p", "callout is-stage lessons-flag", `Holds what looks like ${what}${f && f.part ? ` (“${f.part}”)` : ""}. Keep only if that is intended.`));
|
||||
}
|
||||
|
||||
const reworded = lessonReworded(row, draft.edits[row.id] || {});
|
||||
const keepWord = LESSON_KEEP_WORD[row.type];
|
||||
if (row.refused) {
|
||||
const part = row.refused.part ? ` (it starts “${row.refused.part}”)` : "";
|
||||
li.appendChild(el("p", "lessons-refused", `Refused: part of it looks like a secret${part}. Reword it to ${keepWord.toLowerCase()} it.`));
|
||||
li.appendChild(el("p", "callout is-warn lessons-refused", `Refused: part of it looks like a secret${part}. Reword it to ${keepWord.toLowerCase()} it.`));
|
||||
}
|
||||
|
||||
// The choices, in the order given; a refused row shows its keep word
|
||||
@@ -1890,7 +1907,7 @@ function lessonRow(item, row, draft, commit) {
|
||||
group.setAttribute("aria-label", "Choices for: " + (row.text || row.id));
|
||||
choices.forEach((word, i) => {
|
||||
const on = pick === word;
|
||||
const b = el("button", "btn small" + (on ? " primary" : ""), word);
|
||||
const b = el("button", "btn sm" + (on ? " primary" : ""), word);
|
||||
b.type = "button";
|
||||
b.id = `lesson-${item.id}-${row.id}-${i}`;
|
||||
b.setAttribute("aria-pressed", String(on));
|
||||
@@ -2050,7 +2067,7 @@ function commentField(card, item, labelText, required, quickAnswers = []) {
|
||||
label.htmlFor = id;
|
||||
wrap.appendChild(label);
|
||||
const quicks = quickAnswers.map(({ label, text }) => {
|
||||
const b = el("button", "btn tiny quick-answer", label);
|
||||
const b = el("button", "btn xs soft quick-answer", label);
|
||||
b.type = "button";
|
||||
b.title = "Fill in \"" + text + "\"";
|
||||
wrap.appendChild(b);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// Plan2Code Web Console - User Preferences, the Cleanup section on the System tab.
|
||||
|
||||
import { NOT_CONNECTED, agoWords, whenTitle } from "../labels.js";
|
||||
import { SKILLS } from "../skills.js";
|
||||
import { formatBytes } from "../answers.js";
|
||||
import { el } from "../render.js";
|
||||
import { postJson } from "../net.js";
|
||||
@@ -11,9 +13,17 @@ const $ = (id) => document.getElementById(id);
|
||||
// server re-checks every one before removing it.
|
||||
let cleanupFound = null;
|
||||
|
||||
// The ids ticked for deletion. A session or a stray file starts ticked; a
|
||||
// Notebook (private writing) or a completed spec starts unticked, so deleting
|
||||
// those is always a choice.
|
||||
let ticked = new Set();
|
||||
const startsTicked = (item) => item.where !== "notepad" && item.where !== "completed";
|
||||
|
||||
// Bumped by every scan, delete and reset: a response from an older one is
|
||||
// dropped, so a scan still in flight when Preferences closes cannot refill it.
|
||||
let cleanupGen = 0;
|
||||
// True while a delete is on its way: a ticked box must not re-enable Delete.
|
||||
let cleanupBusy = false;
|
||||
|
||||
const CLEANUP_SHOWN = 8;
|
||||
|
||||
@@ -25,8 +35,17 @@ function setCleanupStatus(text, isError) {
|
||||
|
||||
const CLEANUP_WHERE = { root: "~/.plan2code/", console: "~/.plan2code/console/", completed: "specs--completed/" };
|
||||
|
||||
// "Pathfinder · shop · 6 weeks ago": the skill, the session's title and when it
|
||||
// was last touched. An older session with no title keeps its folder name.
|
||||
function sessionLabel(item) {
|
||||
const skill = SKILLS.find((s) => s.workflow === item.workflow);
|
||||
const age = item.at && !Number.isNaN(Date.parse(item.at)) ? agoWords(Math.max(0, Date.now() - Date.parse(item.at))) : "";
|
||||
const parts = item.title ? [skill ? skill.name : "", item.title, age] : ["Session " + item.name, age];
|
||||
return parts.filter(Boolean).join(" · ");
|
||||
}
|
||||
|
||||
function cleanupLabel(item) {
|
||||
if (item.where === "session") return "Session " + item.name;
|
||||
if (item.where === "session") return sessionLabel(item);
|
||||
// One notebook is one item, named by the folder it belongs to; its key only
|
||||
// when its meta.json is gone.
|
||||
if (item.where === "notepad") return "Notebook for " + (item.folder || item.name);
|
||||
@@ -52,9 +71,25 @@ function cleanupSummary(items, bytes) {
|
||||
const keptBack = (item) => item.where === "completed" && item.tracked === false;
|
||||
const deletable = () => ((cleanupFound && cleanupFound.items) || []).filter((i) => !keptBack(i));
|
||||
|
||||
// What Delete will do, said on the button: the ticked items and their size.
|
||||
function tickedItems() {
|
||||
return deletable().filter((i) => ticked.has(i.id));
|
||||
}
|
||||
|
||||
function paintDeleteButton() {
|
||||
const chosen = tickedItems();
|
||||
const button = $("cleanup-delete");
|
||||
const bytes = chosen.reduce((n, i) => n + (i.bytes || 0), 0);
|
||||
button.textContent = chosen.length
|
||||
? `Delete ${chosen.length} ${chosen.length === 1 ? "item" : "items"} · ${formatBytes(bytes)}`
|
||||
: "Nothing ticked";
|
||||
button.disabled = cleanupBusy || !chosen.length;
|
||||
}
|
||||
|
||||
function resetCleanup() {
|
||||
cleanupGen++;
|
||||
cleanupFound = null;
|
||||
ticked = new Set();
|
||||
$("cleanup-list").replaceChildren();
|
||||
$("cleanup-delete").hidden = true;
|
||||
$("cleanup-delete").disabled = false;
|
||||
@@ -70,8 +105,18 @@ function renderCleanup() {
|
||||
const kept = all.filter(keptBack);
|
||||
$("cleanup-delete").hidden = !items.length;
|
||||
const rows = (some) => some.map((item) => {
|
||||
const row = el("div", "cleanup-row");
|
||||
row.append(el("span", null, cleanupLabel(item)), el("span", "cleanup-size", formatBytes(item.bytes)));
|
||||
const row = el("label", "cleanup-row");
|
||||
const box = el("input");
|
||||
box.type = "checkbox";
|
||||
box.checked = ticked.has(item.id);
|
||||
box.addEventListener("change", () => {
|
||||
if (box.checked) ticked.add(item.id);
|
||||
else ticked.delete(item.id);
|
||||
paintDeleteButton();
|
||||
});
|
||||
const label = el("span", null, cleanupLabel(item));
|
||||
if (item.at) label.title = whenTitle(item.at);
|
||||
row.append(box, label, el("span", "cleanup-size", formatBytes(item.bytes)));
|
||||
return row;
|
||||
});
|
||||
if (items.length) {
|
||||
@@ -83,6 +128,7 @@ function renderCleanup() {
|
||||
list.appendChild(more);
|
||||
}
|
||||
}
|
||||
paintDeleteButton();
|
||||
for (const item of kept) {
|
||||
const row = el("div", "cleanup-row cleanup-kept");
|
||||
row.append(el("span", null, cleanupLabel(item)), el("span", "cleanup-size", "kept: git does not track it as it stands"));
|
||||
@@ -102,9 +148,10 @@ async function scanCleanup() {
|
||||
if (status !== 200 || !body.ok) {
|
||||
cleanupFound = null;
|
||||
renderCleanup();
|
||||
return setCleanupStatus(status ? body.error || "Could not look." : "Plan2Code isn't reachable.", true);
|
||||
return setCleanupStatus(status ? body.error || "Could not look." : NOT_CONNECTED, true);
|
||||
}
|
||||
cleanupFound = { items: body.items || [], bytes: body.bytes || 0 };
|
||||
ticked = new Set(cleanupFound.items.filter((i) => startsTicked(i)).map((i) => i.id));
|
||||
renderCleanup();
|
||||
// Left in the status line, not cleared: it is the live region, so this is
|
||||
// what a screen reader hears when the scan finishes.
|
||||
@@ -115,18 +162,21 @@ async function scanCleanup() {
|
||||
}
|
||||
|
||||
async function deleteCleanup() {
|
||||
const ids = deletable().map((i) => i.id);
|
||||
const ids = tickedItems().map((i) => i.id);
|
||||
if (!ids.length) return;
|
||||
const gen = ++cleanupGen;
|
||||
$("cleanup-delete").disabled = true;
|
||||
$("cleanup-scan").disabled = true;
|
||||
setCleanupStatus("Deleting…", false);
|
||||
const { status, body } = await postJson("/cleanup", { delete: ids });
|
||||
cleanupBusy = true;
|
||||
const { status, body } = await postJson("/cleanup", { delete: ids }).finally(() => {
|
||||
cleanupBusy = false;
|
||||
});
|
||||
if (gen !== cleanupGen) return;
|
||||
$("cleanup-delete").disabled = false;
|
||||
$("cleanup-scan").disabled = false;
|
||||
paintDeleteButton();
|
||||
if (status !== 200 || !body.ok) {
|
||||
return setCleanupStatus(status ? body.error || "Could not delete." : "Plan2Code isn't reachable.", true);
|
||||
return setCleanupStatus(status ? body.error || "Could not delete." : NOT_CONNECTED, true);
|
||||
}
|
||||
const removed = (body.removed || []).length;
|
||||
const failed = (body.failed || []).length;
|
||||
@@ -137,6 +187,7 @@ async function deleteCleanup() {
|
||||
const asked = ids.length;
|
||||
const kept = Math.max(0, asked - removed - failed - refused);
|
||||
cleanupFound = null;
|
||||
ticked = new Set();
|
||||
renderCleanup();
|
||||
const done = removed ? "Deleted " + removed + (removed === 1 ? " item" : " items") + " · " + formatBytes(body.bytes) + " freed." : "Nothing was deleted.";
|
||||
const keptLine = kept ? ` ${kept} ${kept === 1 ? "was" : "were"} kept because ${kept === 1 ? "it" : "they"} changed since the scan.` : "";
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
// the one that starts it. The screens draw through state.js's redraw() and
|
||||
// keep the draft through saveNow(), never by importing this file.
|
||||
|
||||
import { looks, saveLooks } from "../looks.js";
|
||||
import { notConnected } from "../labels.js";
|
||||
import { fresh, freshChat, page, redraw, saveNow, scrollMemory } from "../state.js";
|
||||
import {
|
||||
CATALOG_GROUPS,
|
||||
@@ -31,7 +33,9 @@ import {
|
||||
progressTotal,
|
||||
pruneStaged,
|
||||
recordedAnswer,
|
||||
seedStaged,
|
||||
sentAnswer,
|
||||
startsTicked,
|
||||
staleLaunchFeedback,
|
||||
submittedAwaiting,
|
||||
suggestAction,
|
||||
@@ -47,7 +51,7 @@ import {
|
||||
shouldChime,
|
||||
unreadDot,
|
||||
} from "../chat.js";
|
||||
import { copyButton, el, isMac, textWithCode } from "../render.js";
|
||||
import { copyButton, el, hiddenText, icon, isMac, stateMark, textWithCode } from "../render.js";
|
||||
import { isBuild, isAgentless } from "../skills.js";
|
||||
import { startsClean } from "../hops.js";
|
||||
import { faviconState, setFavicon } from "../favicon.js";
|
||||
@@ -65,7 +69,7 @@ import { sound } from "../sound.js";
|
||||
import { renderConfirm, renderDashboard } from "./dashboard.js";
|
||||
import { renderLoopSetup } from "./loop-setup.js";
|
||||
import { renderLaunching, renderWaiting } from "./starting.js";
|
||||
import { attachFiles, heldNotes, noteImages, pendingNotes, removeImage } from "../uploads.js";
|
||||
import { attachFiles, findSetAside, heldNotes, noteImages, pendingNotes, purgeImages } from "../uploads.js";
|
||||
import { closeMentions } from "../mention-box.js";
|
||||
import { destroyFields } from "../md-field.js";
|
||||
import { buildPager, fitGrowBox, markFor, markMore, renderCard, renderEndItem, renderNotice } from "./cards.js";
|
||||
@@ -73,8 +77,9 @@ import { sendState, suggestState } from "../send-state.js";
|
||||
import { renderAgentsDoc, renderBriefButton, renderDoc, renderOverview, renderPrototypes } from "./docs.js";
|
||||
import { board, renderGitBoard, resetBoard } from "./git-host.js";
|
||||
import { renderWorkspace, tellFolderIssues } from "./workspace.js";
|
||||
import { openHelpOn } from "./help-dialog.js";
|
||||
import { framed, linkLeavesPage, onAppMessage, startNewSession, tellApp } from "../app-bridge.js";
|
||||
import { openHelp, openHelpOn } from "./help-dialog.js";
|
||||
import { framed, linkLeavesPage, onAppMessage, shortcutIdFor, startNewSession, tellApp } from "../app-bridge.js";
|
||||
import { openPrefs as openPrefsDialog } from "./prefs-dialog.js";
|
||||
import { continueButton } from "../continue-button.js";
|
||||
import { askOfflineFlipped, askState, declineOpen, renderAside, renderAsk, renderSubagents, renderSubagentsButton } from "./ask.js";
|
||||
import { renderHandoff, renderLoopEnd, renderHomeButton, renderStopButton, renderStopControls, renderStopping, renderFooterDashboard, stopInProgress, stopWarning } from "./ending.js";
|
||||
@@ -112,7 +117,16 @@ export const GONE_AFTER_MS = 8000;
|
||||
// wipe an unrelated warning that landed while the page was gone (an upload
|
||||
// failure, a refused send).
|
||||
const GONE_BANNER =
|
||||
"Lost contact with Plan2Code. Nothing you have typed is lost. A blip clears by itself; if Plan2Code starts again, it gives you a new link, so open that one.";
|
||||
notConnected("Nothing you have typed is lost. A blip clears by itself; if Plan2Code starts again, it gives you a new link, so open that one.");
|
||||
// Under the app there is no link to open: its own bar offers the way back
|
||||
// (the same split as Help's Troubleshooting wording, help-dialog.js).
|
||||
const GONE_BANNER_IN_APP =
|
||||
notConnected("Nothing you have typed is lost. A blip clears by itself; otherwise the bar at the top offers Reconnect the console.");
|
||||
const goneBanner = () => (page.inApp ? GONE_BANNER_IN_APP : GONE_BANNER);
|
||||
// The token of the "not connected" banner while it is up (banner() hands it back).
|
||||
let goneBannerToken = 0;
|
||||
// True while the popover that first showed the one-time meter tip is open.
|
||||
let meterTipOpen = false;
|
||||
|
||||
// The server's frame counter as of the last frame, and the last time the page
|
||||
// heard from the server at all.
|
||||
@@ -250,7 +264,7 @@ async function pushDraft() {
|
||||
await fetch("/draft", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ staged: page.local.staged, drafts: page.local.drafts, images: page.local.images }),
|
||||
body: JSON.stringify({ staged: page.local.staged, drafts: page.local.drafts, images: page.local.images, seeded: page.local.seeded }),
|
||||
});
|
||||
} catch {}
|
||||
}
|
||||
@@ -302,8 +316,8 @@ export function adopt(body) {
|
||||
// A "still being picked up" banner is over once the send is: it said a
|
||||
// moment, and left up it reads as a fault through every later screen.
|
||||
if (!page.pendingResult && page.pendingBannerUp) {
|
||||
clearBanner(page.pendingBannerUp);
|
||||
page.pendingBannerUp = false;
|
||||
banner(null);
|
||||
}
|
||||
page.pendingStop = Boolean(body.pendingStop);
|
||||
page.chatFrame = body.chat || null;
|
||||
@@ -325,7 +339,7 @@ export function adopt(body) {
|
||||
lastContact = Date.now();
|
||||
if (page.gone) {
|
||||
page.gone = false;
|
||||
if ($("banner").textContent === GONE_BANNER) banner(null);
|
||||
clearBanner(goneBannerToken);
|
||||
}
|
||||
if (firstLoad) {
|
||||
load();
|
||||
@@ -335,6 +349,8 @@ export function adopt(body) {
|
||||
page.local.staged = body.draft.staged;
|
||||
page.local.drafts = body.draft.drafts || {};
|
||||
page.local.images = body.draft.images || {};
|
||||
// A draft saved by an older page has no `seeded`: none were seeded.
|
||||
page.local.seeded = body.draft.seeded || {};
|
||||
settleStaleUploads();
|
||||
}
|
||||
}
|
||||
@@ -447,9 +463,9 @@ export function adopt(body) {
|
||||
// banner wait for the first thing it actually puts on the page.
|
||||
if (!finish() && (asked().length || doingNow() || docs().length)) {
|
||||
sound("skillReady");
|
||||
banner(`${was.title} is ready.`, "good");
|
||||
const ready = banner(`${was.title} is ready.`, "good");
|
||||
clearTimeout(arrivalBannerTimer);
|
||||
arrivalBannerTimer = setTimeout(() => !page.gone && banner(null), 4000);
|
||||
arrivalBannerTimer = setTimeout(() => !page.gone && clearBanner(ready), 4000);
|
||||
}
|
||||
}
|
||||
// Anything the agent has now recorded is no longer "staged" or in flight.
|
||||
@@ -489,9 +505,17 @@ export function adopt(body) {
|
||||
save();
|
||||
const titles = pruned.dropped.map((id) => (byId(id) && byId(id).title) || id).join(", ");
|
||||
staleLine = `A pick on ${titles} no longer matches the reworded question, so it was cleared.`;
|
||||
banner(staleLine, "info");
|
||||
const stale = banner(staleLine, "info");
|
||||
clearTimeout(arrivalBannerTimer);
|
||||
arrivalBannerTimer = setTimeout(() => !page.gone && $("banner").textContent === staleLine && banner(null), 8000);
|
||||
arrivalBannerTimer = setTimeout(() => !page.gone && clearBanner(stale), 8000);
|
||||
}
|
||||
// A multi card that asks to start with ticks gets them staged once, as if the
|
||||
// person had ticked them (an `answer` on the item would settle it instead).
|
||||
const seeding = seedStaged(page.S.items || [], page.local.staged, page.local.seeded || {}, page.local.sent || {});
|
||||
if (seeding.changed) {
|
||||
page.local.staged = seeding.staged;
|
||||
page.local.seeded = seeding.seeded;
|
||||
save();
|
||||
}
|
||||
// A retracted send suppresses exactly that send. Once the item moves --
|
||||
// settled, sent again (a new `at`), or answered by an agent reply -- the
|
||||
@@ -532,7 +556,7 @@ export function adopt(body) {
|
||||
// The question already on screen needs no mark: it is where they are looking.
|
||||
for (const q of arrived) if (!(page.view === "questions" && page.selected === q.id)) page.newQuestions.add(q.id);
|
||||
arrivalNotice = staleLine ? `${staleLine} ${arrivedLine}` : arrivedLine;
|
||||
banner(arrivalNotice, "info");
|
||||
arrivalToken = banner(arrivalNotice, "info");
|
||||
clearTimeout(arrivalBannerTimer);
|
||||
} else {
|
||||
page.selected = arrived[0].id;
|
||||
@@ -614,9 +638,10 @@ function scrollRail(where) {
|
||||
let arrivalBannerTimer = null;
|
||||
// The text of a notice that stays up (see adopt), so only that banner is cleared.
|
||||
let arrivalNotice = "";
|
||||
let arrivalToken = 0;
|
||||
|
||||
function dropArrivalNotice() {
|
||||
if (arrivalNotice && $("banner").textContent === arrivalNotice) banner(null);
|
||||
if (arrivalNotice) clearBanner(arrivalToken);
|
||||
arrivalNotice = "";
|
||||
}
|
||||
|
||||
@@ -713,12 +738,12 @@ function markGone() {
|
||||
// of the server means there, and a banner promising a reconnect would
|
||||
// argue with it.
|
||||
if (!finish() && !stopInProgress()) {
|
||||
banner(GONE_BANNER, "warn");
|
||||
goneBannerToken = banner(goneBanner(), "warn");
|
||||
}
|
||||
render();
|
||||
} else if (!bad && page.gone) {
|
||||
page.gone = false;
|
||||
if ($("banner").textContent === GONE_BANNER) banner(null);
|
||||
clearBanner(goneBannerToken);
|
||||
render();
|
||||
}
|
||||
}
|
||||
@@ -1065,18 +1090,40 @@ function restoreScroll() {
|
||||
scroller.scrollTop = saved ? saved.top : 0;
|
||||
}
|
||||
|
||||
// `extras` are nodes shown after the text: a copyable hint, an action.
|
||||
// `extras` are nodes shown after the text: a copyable hint, an action. Hands
|
||||
// back a token for this message: a timer that wants it gone calls
|
||||
// clearBanner(token), which clears only that message, so a timed success never
|
||||
// erases a newer warning. A warning carries a Dismiss button.
|
||||
let bannerSeq = 0;
|
||||
let bannerShowing = 0;
|
||||
|
||||
export function banner(text, kind, extras) {
|
||||
const n = $("banner");
|
||||
if (!text) {
|
||||
n.hidden = true;
|
||||
n.textContent = "";
|
||||
return;
|
||||
bannerShowing = 0;
|
||||
return 0;
|
||||
}
|
||||
n.hidden = false;
|
||||
n.className = "banner " + (kind || "");
|
||||
n.textContent = text;
|
||||
for (const node of extras || []) n.appendChild(node);
|
||||
bannerShowing = ++bannerSeq;
|
||||
if (kind === "warn") {
|
||||
const close = el("button", "banner-dismiss");
|
||||
close.type = "button";
|
||||
close.setAttribute("aria-label", "Dismiss");
|
||||
close.appendChild(icon("close"));
|
||||
close.addEventListener("click", () => banner(null));
|
||||
n.appendChild(close);
|
||||
}
|
||||
return bannerShowing;
|
||||
}
|
||||
|
||||
// Clears the banner only when it is still the message `token` named.
|
||||
export function clearBanner(token) {
|
||||
if (token && token === bannerShowing) banner(null);
|
||||
}
|
||||
|
||||
// The session meter's pill, straight from the frame's `meter` (meter.js did
|
||||
@@ -1094,6 +1141,18 @@ function renderMeter() {
|
||||
$("meter-words").textContent = page.meterFrame.words;
|
||||
pill.title = page.meterFrame.tooltip;
|
||||
$("meter-tip").textContent = page.meterFrame.tooltip;
|
||||
// The one-time tip (it used to sit in the Welcome dialog): the first time the
|
||||
// pill leaves green, the popover says what to do about it. It counts as read
|
||||
// once the popover has been opened with it showing (toggleMeterPop), and
|
||||
// stays up until that popover closes, so a redraw cannot take it away mid-read.
|
||||
const once = $("meter-once");
|
||||
const showOnce = page.meterFrame.level !== "green" && (looks.meterTipSeen !== true || meterTipOpen);
|
||||
once.hidden = !showOnce;
|
||||
if (showOnce) {
|
||||
once.textContent = page.inApp
|
||||
? "Tip: once the meter passes half, finish the step and press New Session at the top of the window."
|
||||
: "Tip: once the meter passes half, finish the step and start a new conversation.";
|
||||
}
|
||||
// What the points are made of: one row per piece of work that scored.
|
||||
const list = $("meter-list");
|
||||
const rows = Array.isArray(page.meterFrame.items) ? page.meterFrame.items : [];
|
||||
@@ -1121,7 +1180,7 @@ function renderMeter() {
|
||||
fresh.dataset.built = "1";
|
||||
if (page.inApp) {
|
||||
// The same press as the app bar's New Session, confirm and all.
|
||||
const press = el("button", "btn small primary meter-fresh-btn", "Start a New Session");
|
||||
const press = el("button", "btn sm primary meter-fresh-btn", "Start a New Session");
|
||||
press.type = "button";
|
||||
press.addEventListener("click", () => !loopDriving() && tellApp("new-session"));
|
||||
press.disabled = loopDriving();
|
||||
@@ -1131,9 +1190,9 @@ function renderMeter() {
|
||||
const text = handoffText({ command: DASHBOARD_COMMAND });
|
||||
const code = el("code", "handoff-code", text);
|
||||
const row = el("div", "handoff-command meter-fresh-row");
|
||||
row.append(code, copyButton(text, "btn small ghost handoff-copy", code));
|
||||
row.append(code, copyButton(text, "btn sm ghost handoff-copy", code));
|
||||
fresh.append(
|
||||
textWithCode("p", "meter-fresh-text", `To start a new session, run \`${DASHBOARD_COMMAND}\` in a new conversation:`),
|
||||
textWithCode("p", "meter-fresh-text", `To start fresh, run \`${DASHBOARD_COMMAND}\` in a new conversation:`),
|
||||
row
|
||||
);
|
||||
}
|
||||
@@ -1189,7 +1248,7 @@ function renderChrome() {
|
||||
: `${done} of ${total} ${building ? "done" : "answered"}`
|
||||
: h.stage || "Getting started";
|
||||
$("confidence").textContent = h.confidence || "";
|
||||
$("progress-fill").style.width = pct + "%";
|
||||
$("progress-fill").style.setProperty("--p", String(pct / 100));
|
||||
const bar = $("progress-bar");
|
||||
// A stage with nothing to count (a review starting) says its words, no track.
|
||||
bar.hidden = !total && Boolean(h.stage);
|
||||
@@ -1341,7 +1400,7 @@ export function renderStatus() {
|
||||
if (page.local.afterBuild === "dashboard" && !page.gone) return say("work", "Opening the dashboard…", "", true);
|
||||
if (page.local.afterBuild === "commit" && !page.gone) return say("work", "Opening Git…", "", true);
|
||||
if (page.local.afterBuild === "changelog" && !page.gone) return say("work", "Opening Changelog…", "", true);
|
||||
if (page.local.afterBuild === "launch" && !page.gone) return say("work", "Starting the next step…", "", true);
|
||||
if (page.local.afterBuild === "launch" && !page.gone) return say("work", "Starting the next skill…", "", true);
|
||||
const offer = reviewPending();
|
||||
// There is no tab to close under the app, only the one window.
|
||||
const closeWord = page.inApp ? "window" : "tab";
|
||||
@@ -1352,10 +1411,10 @@ export function renderStatus() {
|
||||
if (offer === "open") return say("point", `Done. Review it here first, or close this ${closeWord}.`);
|
||||
// A stop past a warning kept nothing, so it promises no saved place.
|
||||
if (finishPaused(finish()))
|
||||
return say("done", stopWarning() ? "Paused. The command above starts it again." : "Paused. Your place is saved: the command above picks it up.");
|
||||
return say("done", stopWarning() ? "Stopped. The command above starts it again." : "Stopped. Your place is saved: the command above picks it up.");
|
||||
return say("done", `All done. You can close this ${closeWord}.`);
|
||||
}
|
||||
if (page.gone) return say("gone", "Not connected. Your answers are saved.", "", false, true);
|
||||
if (page.gone) return say("gone", notConnected("Your answers are saved."), "", false, true);
|
||||
// The loop's own end screen (the app's `loopEnd`) is no `finish()`: while it
|
||||
// still has presses on offer the move is theirs; with none, it is done.
|
||||
if (page.S.loopEnd) {
|
||||
@@ -1527,11 +1586,15 @@ function renderViews() {
|
||||
}
|
||||
b.setAttribute("aria-current", String(page.view === t.id || (t.id === "questions" && page.view === "end")));
|
||||
if (t.count) {
|
||||
// The number is drawn for the eye; the name reads ", 3 waiting".
|
||||
const c = el("span", "tab-count", String(t.count));
|
||||
c.setAttribute("aria-hidden", "true");
|
||||
b.appendChild(c);
|
||||
b.appendChild(hiddenText(t.id === "questions" ? `, ${t.count} waiting` : `, ${t.count}`));
|
||||
}
|
||||
if (t.dot) {
|
||||
const dot = el("span", "tab-dot");
|
||||
dot.setAttribute("role", "img");
|
||||
dot.setAttribute("aria-label", "New reply");
|
||||
b.appendChild(dot);
|
||||
}
|
||||
@@ -1596,13 +1659,13 @@ export function renderSidebar() {
|
||||
b.setAttribute("aria-current", String(Boolean(page.dashPick && page.dashPick.skill === e.skill)));
|
||||
const isGoing = page.local.launching && (page.local.launching.skill === e.skill || page.local.launching.skill === e.review);
|
||||
const isPicked = page.dashPick && page.dashPick.skill === e.skill;
|
||||
const mark = el(
|
||||
"span",
|
||||
"rail-mark " + (isGoing || isPicked ? "staged" : "open"),
|
||||
isGoing ? "◐" : isPicked ? "●" : "○"
|
||||
b.appendChild(
|
||||
stateMark(
|
||||
"rail-mark " + (isGoing || isPicked ? "staged" : "open"),
|
||||
isGoing ? "half" : isPicked ? "dot" : "circle",
|
||||
isGoing ? "starting" : isPicked ? "picked" : "pick to start"
|
||||
)
|
||||
);
|
||||
mark.title = isGoing ? "starting" : isPicked ? "picked" : "pick to start";
|
||||
b.appendChild(mark);
|
||||
b.appendChild(el("span", null, e.title));
|
||||
// The center pane's own "Suggested" pill scrolls out of view, so the
|
||||
// rail repeats the call-out here as a small dot next to the title.
|
||||
@@ -1626,10 +1689,8 @@ export function renderSidebar() {
|
||||
}
|
||||
|
||||
const list = asked();
|
||||
if (!list.length) {
|
||||
rail.appendChild(el("p", "rail-empty", "Nothing here yet."));
|
||||
return;
|
||||
}
|
||||
// Nothing asked yet: the rail stays empty, with no placeholder line.
|
||||
if (!list.length) return;
|
||||
|
||||
const groups = new Map();
|
||||
for (const item of list) {
|
||||
@@ -1654,12 +1715,10 @@ export function renderSidebar() {
|
||||
// the question that was last selected is not the thing being looked at.
|
||||
b.setAttribute("aria-current", String(page.view === "questions" && page.selected === item.id));
|
||||
const m = markFor(item);
|
||||
const mark = el("span", "rail-mark " + m.cls, m.glyph);
|
||||
mark.title = m.label;
|
||||
b.appendChild(mark);
|
||||
b.appendChild(stateMark("rail-mark " + m.cls, m.icon, m.label));
|
||||
b.appendChild(el("span", null, item.title));
|
||||
if (page.newQuestions.has(item.id)) {
|
||||
const fresh = el("span", "rail-new", "New");
|
||||
const fresh = el("span", "pill is-accent is-caps rail-new", "New");
|
||||
fresh.title = "arrived while you were typing";
|
||||
b.appendChild(fresh);
|
||||
}
|
||||
@@ -1824,7 +1883,7 @@ function paintMain(main) {
|
||||
// an ending, and until there was a way to tell the two apart the page said
|
||||
// it in both. The ending has its own page now, reached from the rail.
|
||||
if (!finish() && !myTurn().length && !stagedCount()) {
|
||||
const lull = el("div", "card-note card-lead");
|
||||
const lull = el("div", "callout is-info card-note card-lead");
|
||||
lull.appendChild(el("p", "note-kicker", "All caught up"));
|
||||
lull.appendChild(el("h3", "note-title", "Nothing needs you right now"));
|
||||
lull.appendChild(
|
||||
@@ -1891,7 +1950,7 @@ export function renderFooter() {
|
||||
} else if (finish()) {
|
||||
// Not "nothing to send yet". There is no yet.
|
||||
const fin = finish();
|
||||
next.appendChild(el("strong", null, finishPaused(fin) ? "Paused." : "All done."));
|
||||
next.appendChild(el("strong", null, finishPaused(fin) ? "Stopped." : "All done."));
|
||||
next.appendChild(
|
||||
document.createTextNode(
|
||||
n || notes.length
|
||||
@@ -1949,6 +2008,8 @@ export function renderFooter() {
|
||||
const state = sendState();
|
||||
const btn = $("btn-send");
|
||||
btn.disabled = state.disabled;
|
||||
// Nothing to send on this view: the button is gone, the status words stay.
|
||||
btn.hidden = Boolean(state.hide);
|
||||
// Filled accent means "this is the step". That is only true of Send once
|
||||
// nothing is left to answer; before then it is the quieter of the two, so
|
||||
// the next question wins the eye. Still one click either way: someone who
|
||||
@@ -1957,7 +2018,7 @@ export function renderFooter() {
|
||||
btn.classList.toggle("primary", state.disabled || sendIsStep);
|
||||
btn.classList.toggle("standby", !state.disabled && !sendIsStep);
|
||||
// The chevron before Send sways only while Send is the filled, live step.
|
||||
$("send-nudge").hidden = !sendIsStep;
|
||||
$("send-nudge").hidden = !sendIsStep || Boolean(state.hide);
|
||||
|
||||
const hint = $("send-hint");
|
||||
hint.replaceChildren();
|
||||
@@ -2156,11 +2217,11 @@ export async function askSuggestions(itemId) {
|
||||
}),
|
||||
});
|
||||
if (res.status === 409) {
|
||||
banner(
|
||||
// The token, so the end of the send clears only this line.
|
||||
page.pendingBannerUp = banner(
|
||||
"Your last answers are still being picked up. Nothing is lost, and nothing was sent twice. Try again in a moment.",
|
||||
"info"
|
||||
);
|
||||
page.pendingBannerUp = true;
|
||||
page.pendingResult = true;
|
||||
} else if (!res.ok) {
|
||||
const body = await res.json().catch(() => null);
|
||||
@@ -2169,8 +2230,8 @@ export async function askSuggestions(itemId) {
|
||||
// A note held back on an upload did not go, so it stays drafted.
|
||||
if (note) clearSentNote(itemId, new Set(images.map((i) => i.key)));
|
||||
save();
|
||||
banner("Asked for suggestions. Plan2Code is picking it up now.", "good");
|
||||
setTimeout(() => banner(null), 4000);
|
||||
const asked = banner("Asked for suggestions. Plan2Code is picking it up now.", "good");
|
||||
setTimeout(() => clearBanner(asked), 4000);
|
||||
}
|
||||
} catch {
|
||||
await sendLost();
|
||||
@@ -2220,8 +2281,8 @@ export async function send() {
|
||||
// for the next, different one.
|
||||
if (loopWaiting()) page.local.askLockedAfterSend = loopWaitingKey();
|
||||
markSent(payload);
|
||||
banner("Sent. Plan2Code is picking it up now.", "good");
|
||||
setTimeout(() => banner(null), 4000);
|
||||
const sentBanner = banner("Sent. Plan2Code is picking it up now.", "good");
|
||||
setTimeout(() => clearBanner(sentBanner), 4000);
|
||||
// A menu option the agent marked `fresh` is a clean start, which under the
|
||||
// app is the bar's New Session; the agent still gets the pick, so a
|
||||
// declined confirm carries on with its usual finish.
|
||||
@@ -2229,11 +2290,11 @@ export async function send() {
|
||||
if (freshMenu) startNewSession(freshMenu.command ? handoffText({ command: freshMenu.command }) : "");
|
||||
} catch (err) {
|
||||
if (err && err.pending) {
|
||||
banner(
|
||||
// The token, so the end of the send clears only this line.
|
||||
page.pendingBannerUp = banner(
|
||||
"Your last answers are still being picked up. Nothing is lost, and nothing was sent twice. Try again in a moment.",
|
||||
"info"
|
||||
);
|
||||
page.pendingBannerUp = true;
|
||||
page.pendingResult = true;
|
||||
} else if (err && err.reason) {
|
||||
banner(refusedLine(err), "warn");
|
||||
@@ -2291,6 +2352,9 @@ function tokenFor(item, v) {
|
||||
const parts = [];
|
||||
if (v.k) parts.push(map[v.k] || v.k);
|
||||
if (Array.isArray(v.ks) && v.ks.length) parts.push(v.ks.map((k) => map[k] || k).join(", "));
|
||||
// A card that opened ticked can be sent with nothing ticked: that is an
|
||||
// answer, said even when a note rides with it ("none; keep the logo").
|
||||
else if (Array.isArray(v.ks) && startsTicked(item)) parts.push("none");
|
||||
if (v.verdict) parts.push(map[v.verdict] || v.verdict);
|
||||
if (typeof v.yes === "boolean") parts.push(map[v.yes ? "yes" : "no"] || (v.yes ? "yes" : "no"));
|
||||
if (typeof v.ok === "boolean") parts.push(v.ok ? "confirmed" : "needs changes");
|
||||
@@ -2323,6 +2387,69 @@ function fmtMs(ms) {
|
||||
return `${m}m ${s % 60}s`;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------- Clear, with Undo */
|
||||
|
||||
// Clear throws away what has not been sent, at once, and offers Undo for ten
|
||||
// seconds. The staged answers, the typed boxes and the attachments are kept in
|
||||
// memory meanwhile; the attachments' files on the server are deleted only when
|
||||
// the window closes (or the next Clear), so Undo has something to restore.
|
||||
const UNDO_CLEAR_MS = 10000;
|
||||
let clearedUndo = null;
|
||||
findSetAside((itemId, key) => (clearedUndo && (clearedUndo.images[itemId] || []).find((img) => img.key === key)) || null);
|
||||
|
||||
// The window is over: the set-aside pictures go for good.
|
||||
function settleClear() {
|
||||
if (!clearedUndo) return;
|
||||
clearTimeout(clearedUndo.timer);
|
||||
purgeImages(clearedUndo.images);
|
||||
clearBanner(clearedUndo.banner);
|
||||
clearedUndo = null;
|
||||
}
|
||||
|
||||
function clearUnsent() {
|
||||
// A second Clear closes the first one's window.
|
||||
settleClear();
|
||||
const count = Object.keys(page.local.staged).length + pendingNotes().length;
|
||||
const kept = { staged: page.local.staged, images: page.local.images, drafts: {} };
|
||||
page.local.staged = {};
|
||||
page.local.images = {};
|
||||
// Every typed box, the same set markSent clears: a draft left behind would
|
||||
// refill its box on the next render and look as if nothing was cleared.
|
||||
const typed = ["thread-", "other-", "text-", "note-"];
|
||||
for (const key of Object.keys(page.local.drafts)) {
|
||||
if (!typed.some((p) => key.startsWith(p))) continue;
|
||||
kept.drafts[key] = page.local.drafts[key];
|
||||
delete page.local.drafts[key];
|
||||
}
|
||||
saveNow();
|
||||
redraw();
|
||||
const undo = el("button", "btn xs soft banner-action", "Undo");
|
||||
undo.type = "button";
|
||||
undo.addEventListener("click", () => undoClear());
|
||||
const said = count ? `Cleared ${count} ${count === 1 ? "answer" : "answers"}. ` : "Cleared what you had not sent. ";
|
||||
const token = banner(said, "info", [undo]);
|
||||
clearedUndo = { ...kept, banner: token, timer: setTimeout(settleClear, UNDO_CLEAR_MS) };
|
||||
}
|
||||
|
||||
// Puts back what Clear set aside, except where the person has already typed or
|
||||
// picked something newer for the same question.
|
||||
function undoClear() {
|
||||
const was = clearedUndo;
|
||||
if (!was) return;
|
||||
clearTimeout(was.timer);
|
||||
clearedUndo = null;
|
||||
page.local.staged = { ...was.staged, ...page.local.staged };
|
||||
for (const [key, text] of Object.entries(was.drafts)) if (!(key in page.local.drafts)) page.local.drafts[key] = text;
|
||||
// Per note, so a picture attached during the window sits beside the restored ones.
|
||||
for (const [itemId, list] of Object.entries(was.images)) {
|
||||
const now = page.local.images[itemId] || [];
|
||||
page.local.images[itemId] = [...list.filter((img) => !now.some((x) => x.key === img.key)), ...now];
|
||||
}
|
||||
clearBanner(was.banner);
|
||||
saveNow();
|
||||
redraw();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------- page chrome */
|
||||
|
||||
function toggleMeterPop(open) {
|
||||
@@ -2330,6 +2457,14 @@ function toggleMeterPop(open) {
|
||||
const show = open ?? pop.hidden;
|
||||
pop.hidden = !show;
|
||||
$("meter-pill").setAttribute("aria-expanded", String(show));
|
||||
if (show && !$("meter-once").hidden && looks.meterTipSeen !== true) {
|
||||
meterTipOpen = true;
|
||||
looks.meterTipSeen = true;
|
||||
saveLooks();
|
||||
} else if (!show && meterTipOpen) {
|
||||
meterTipOpen = false;
|
||||
renderMeter();
|
||||
}
|
||||
}
|
||||
|
||||
let whereResizeTimer = null;
|
||||
@@ -2348,7 +2483,7 @@ async function openOutside(href) {
|
||||
.catch(() => false);
|
||||
if (ok) return;
|
||||
const link = el("code", "banner-link", href);
|
||||
banner("That link could not open from here. Copy it and paste it into your browser: ", "warn", [link, document.createTextNode(" "), copyButton(href, "btn small", link)]);
|
||||
banner("That link could not open from here. Copy it and paste it into your browser: ", "warn", [link, document.createTextNode(" "), copyButton(href, "btn sm", link)]);
|
||||
}
|
||||
|
||||
export function wireChrome() {
|
||||
@@ -2367,6 +2502,30 @@ export function wireChrome() {
|
||||
renderStatus();
|
||||
});
|
||||
|
||||
// The app's shortcuts (Ctrl or Cmd with a backtick, 1, 2, Shift+N, O and a comma) are also typed
|
||||
// here, inside its frame, where the shell never hears them: the page forwards the id and nothing
|
||||
// else. And its Preferences shortcut asks this page to open User Preferences.
|
||||
if (framed()) {
|
||||
document.addEventListener(
|
||||
"keydown",
|
||||
(e) => {
|
||||
const id = shortcutIdFor(e, isMac());
|
||||
if (!id) return;
|
||||
e.preventDefault();
|
||||
tellApp("shortcut", { id });
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
onAppMessage("open-help", () => {
|
||||
if (document.querySelector("dialog[open]")) return;
|
||||
openHelp();
|
||||
});
|
||||
onAppMessage("open-preferences", () => {
|
||||
if (document.querySelector("dialog[open]")) return;
|
||||
openPrefsDialog();
|
||||
});
|
||||
|
||||
// Under the app, a link off the page goes to the default browser through
|
||||
// the console: the app's window opens no new ones, so the click alone would
|
||||
// do nothing. Capture phase, ahead of any handler on the link itself. The
|
||||
@@ -2412,19 +2571,7 @@ export function wireChrome() {
|
||||
});
|
||||
|
||||
$("btn-send").addEventListener("click", send);
|
||||
$("btn-clear").addEventListener("click", () => {
|
||||
if (!confirm("Clear everything you have not sent yet?")) return;
|
||||
page.local.staged = {};
|
||||
// Every typed box, the same set markSent clears: a draft left behind would
|
||||
// refill its box on the next render and look as if nothing was cleared.
|
||||
const typed = ["thread-", "other-", "text-", "note-"];
|
||||
for (const key of Object.keys(page.local.drafts)) if (typed.some((p) => key.startsWith(p))) delete page.local.drafts[key];
|
||||
for (const [itemId, list] of Object.entries(page.local.images)) {
|
||||
for (const img of list) removeImage(itemId, img.key);
|
||||
}
|
||||
saveNow();
|
||||
redraw();
|
||||
});
|
||||
$("btn-clear").addEventListener("click", clearUnsent);
|
||||
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
|
||||
@@ -2435,6 +2582,22 @@ export function wireChrome() {
|
||||
send();
|
||||
return;
|
||||
}
|
||||
// ? opens Help where the `?` button does (its contextual tab), but never
|
||||
// from a field, a select, an editor or the Notebook, behind an open dialog
|
||||
// (a game plays in one) or with a modifier held. Matches the typed
|
||||
// character, so a layout that needs Shift for it works.
|
||||
if (e.key === "?" && !e.ctrlKey && !e.metaKey && !e.altKey && !e.defaultPrevented && !document.querySelector("dialog[open]")) {
|
||||
// The Markdown editors live in a shadow root, so the target is their
|
||||
// host (.md-host) at the document: read the whole composed path.
|
||||
const typing = e.composedPath().some(
|
||||
(n) => n.nodeType === 1 && (n.isContentEditable || n.matches("input, textarea, select, .md-host, .cm-editor, [contenteditable]"))
|
||||
);
|
||||
if (!typing) {
|
||||
e.preventDefault();
|
||||
openHelp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Escape is the confirm pane's Back — but not while a dialog has it. Native
|
||||
// dialogs close themselves on the same key; backing out of the pick at the
|
||||
// same time would be two undos for one press.
|
||||
|
||||
@@ -13,8 +13,9 @@ import {
|
||||
learningBusyNow,
|
||||
LEARNING_BUSY_MS,
|
||||
} from "../selectors.js";
|
||||
import { whenTitle, whenWords } from "../labels.js";
|
||||
import { hooks, page, redraw, saveNow } from "../state.js";
|
||||
import { el, approvalTip, mdInto, releasesLink, copyButton, lightDismiss, SVG_NS } from "../render.js";
|
||||
import { el, approvalTip, mdInto, releasesLink, copyButton, lightDismiss, icon, SVG_NS } from "../render.js";
|
||||
import { needsRoleNudge, ROLE_NOT_SET } from "../starters.js";
|
||||
import { looks, saveLooks } from "../looks.js";
|
||||
import { RED_BANNER, RED_BANNER_IN_APP } from "../meter.js";
|
||||
@@ -75,39 +76,56 @@ export let wakeHoldsChime = false;
|
||||
// the waking click, since browsers refuse sound before one.
|
||||
let snore = null;
|
||||
|
||||
function roleNudge() {
|
||||
const nudge = el("div", "dash-nudge");
|
||||
nudge.setAttribute("role", "status");
|
||||
nudge.appendChild(el("span", "dash-nudge-text", "Pick your role to get starter templates ordered for you."));
|
||||
const actions = el("div", "dash-nudge-actions");
|
||||
const setUp = el("button", "btn small primary", "Set up preferences");
|
||||
setUp.type = "button";
|
||||
setUp.addEventListener("click", () => {
|
||||
// Closed without a role is a "Not now" too: having been to the dialog,
|
||||
// they were asked, and the banner does not come back (Help says so).
|
||||
$("looks-modal").addEventListener(
|
||||
"close",
|
||||
() => {
|
||||
if (looks.role === undefined) {
|
||||
looks.role = ROLE_NOT_SET;
|
||||
saveLooks();
|
||||
redraw();
|
||||
}
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
// The role is asked once; closing Preferences without one, or Not now, counts
|
||||
// as asked and ends the line (Help says so).
|
||||
function roleAsked() {
|
||||
if (looks.role === undefined) {
|
||||
looks.role = ROLE_NOT_SET;
|
||||
saveLooks();
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
// After the first launch: one quiet line for the two optional extras, a role
|
||||
// (starter templates ordered for you) and Learning. Until then both are held,
|
||||
// so the first dashboard offers a card and nothing else.
|
||||
function extrasLine() {
|
||||
const line = el("p", "dash-extras");
|
||||
// Learning is only on offer while it is Not set up; the role is always there
|
||||
// (the line shows only while the role is unasked).
|
||||
const learning = scan() && scan().learning;
|
||||
const withLearning = Boolean(learning && learning.state === "not-set-up");
|
||||
line.appendChild(document.createTextNode(withLearning ? "Two optional extras: " : "One optional extra: "));
|
||||
const role = el("button", "dash-extras-link", "set your role");
|
||||
role.type = "button";
|
||||
role.addEventListener("click", () => {
|
||||
$("looks-modal").addEventListener("close", roleAsked, { once: true });
|
||||
hooks.openPrefs("appearance");
|
||||
});
|
||||
const notNow = el("button", "btn tiny ghost", "Not now");
|
||||
line.appendChild(role);
|
||||
if (withLearning) {
|
||||
line.appendChild(document.createTextNode(", "));
|
||||
const learn = el("button", "dash-extras-link", "switch on Learning");
|
||||
learn.type = "button";
|
||||
learn.addEventListener("click", () => {
|
||||
const row = $("main").querySelector(".learn-row");
|
||||
if (!row) return;
|
||||
row.scrollIntoView({ block: "center" });
|
||||
const go = row.querySelector("button");
|
||||
if (go) go.focus();
|
||||
});
|
||||
line.appendChild(learn);
|
||||
}
|
||||
line.appendChild(document.createTextNode("."));
|
||||
const notNow = el("button", "btn xs soft", "Not now");
|
||||
notNow.type = "button";
|
||||
notNow.addEventListener("click", () => {
|
||||
looks.role = ROLE_NOT_SET;
|
||||
saveLooks();
|
||||
redraw();
|
||||
});
|
||||
actions.append(setUp, notNow);
|
||||
nudge.appendChild(actions);
|
||||
return nudge;
|
||||
line.appendChild(notNow);
|
||||
return line;
|
||||
}
|
||||
|
||||
// × on the update banner hides it for this console session only, and only
|
||||
@@ -131,7 +149,7 @@ function updateDismissed() {
|
||||
const UPDATE_COMMAND = "plan2code update";
|
||||
|
||||
// For a machine without the plan2code command: the full installer, menu and all.
|
||||
const UPDATE_FALLBACK_COMMAND = "npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git";
|
||||
const UPDATE_FALLBACK_COMMAND = "npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git#release";
|
||||
|
||||
function openUpdateModal() {
|
||||
if (!page.updateFrame) return;
|
||||
@@ -139,24 +157,27 @@ function openUpdateModal() {
|
||||
versions.replaceChildren(
|
||||
document.createTextNode("Version "),
|
||||
releasesLink("v" + page.updateFrame.latest),
|
||||
document.createTextNode(" is out — you have "),
|
||||
document.createTextNode(" is out, you have "),
|
||||
el("code", null, page.updateFrame.installed),
|
||||
document.createTextNode(".")
|
||||
);
|
||||
const row = $("update-command");
|
||||
const code = el("code", null, UPDATE_COMMAND);
|
||||
row.replaceChildren(code, copyButton(UPDATE_COMMAND, "btn small ghost handoff-copy", code));
|
||||
row.replaceChildren(code, copyButton(UPDATE_COMMAND, "btn sm ghost handoff-copy", code));
|
||||
const fallbackRow = $("update-fallback");
|
||||
const fallback = el("code", null, UPDATE_FALLBACK_COMMAND);
|
||||
fallbackRow.replaceChildren(fallback, copyButton(UPDATE_FALLBACK_COMMAND, "btn small ghost handoff-copy", fallback));
|
||||
// Under the app, its terminal panel runs the agent, and the app it would
|
||||
// update is the one running this page.
|
||||
$("update-step-run").textContent = page.inApp
|
||||
? "Run this in a terminal outside the app (not in its terminal panel, which runs your agent):"
|
||||
: "Run this in your terminal (not in this page or your agent):";
|
||||
fallbackRow.replaceChildren(fallback, copyButton(UPDATE_FALLBACK_COMMAND, "btn sm ghost handoff-copy", fallback));
|
||||
// Under the app, the bar's Update and restart does all of it in one click;
|
||||
// the command is the fallback, and its terminal panel runs the agent, so
|
||||
// it goes in a terminal outside the app.
|
||||
$("update-step-run").replaceChildren(
|
||||
...(page.inApp
|
||||
? ["Press ", el("strong", null, "Update and restart"), " in the app's top bar. Or run this in a terminal outside the app (not in its terminal panel, which runs your agent):"]
|
||||
: ["Run this in your terminal (not in this page or your agent):"])
|
||||
);
|
||||
$("update-step-restart").replaceChildren(
|
||||
...(page.inApp
|
||||
? ["When it finishes, close the app and open it again."]
|
||||
? ["Update and restart reopens the app by itself. After the command, close the app and open it again."]
|
||||
: ["When it finishes, close this console and start ", el("code", null, "plan2code"), " again."])
|
||||
);
|
||||
$("update-modal").showModal();
|
||||
@@ -173,10 +194,10 @@ export function renderDashboard(main) {
|
||||
settleDeleting();
|
||||
const menu = (page.S && page.S.menu) || {};
|
||||
const wrap = el("div", "dash");
|
||||
if (needsRoleNudge(looks)) wrap.appendChild(roleNudge());
|
||||
const firstRun = looks.skillLaunched !== true;
|
||||
// Advice only: words, never a button, and nothing is blocked.
|
||||
if (page.meterFrame && page.meterFrame.level === "red") {
|
||||
const warn = el("div", "dash-nudge meter-banner", page.inApp ? RED_BANNER_IN_APP : RED_BANNER);
|
||||
const warn = el("div", "callout is-warn dash-nudge meter-banner", page.inApp ? RED_BANNER_IN_APP : RED_BANNER);
|
||||
warn.setAttribute("role", "status");
|
||||
wrap.appendChild(warn);
|
||||
}
|
||||
@@ -186,12 +207,13 @@ export function renderDashboard(main) {
|
||||
// (the bar's one-click Update skills only levels skills to the app's own
|
||||
// version), and the modal words its steps for the app.
|
||||
if (page.updateFrame && !updateDismissed()) {
|
||||
const notice = el("div", "dash-nudge update-banner");
|
||||
const notice = el("div", "callout is-info dash-nudge update-banner");
|
||||
notice.setAttribute("role", "status");
|
||||
const open = el("button", "update-banner-open", "UPDATE AVAILABLE · v" + page.updateFrame.latest);
|
||||
const open = el("button", "update-banner-open", "Update available · v" + page.updateFrame.latest);
|
||||
open.type = "button";
|
||||
open.addEventListener("click", openUpdateModal);
|
||||
const dismiss = el("button", "update-banner-dismiss", "×");
|
||||
const dismiss = el("button", "update-banner-dismiss");
|
||||
dismiss.appendChild(icon("close"));
|
||||
dismiss.type = "button";
|
||||
dismiss.setAttribute("aria-label", "Dismiss until next time");
|
||||
dismiss.addEventListener("click", () => {
|
||||
@@ -207,6 +229,7 @@ export function renderDashboard(main) {
|
||||
// title (the others are more urgent). Hidden while paused or off.
|
||||
const learnBanner = learningBanner(scan());
|
||||
if (learnBanner) wrap.appendChild(learnBanner);
|
||||
if (!firstRun && needsRoleNudge(looks)) wrap.appendChild(extrasLine());
|
||||
wrap.appendChild(el("p", "card-kicker", "Plan2Code"));
|
||||
wrap.appendChild(el("h2", "dash-title", "What are we doing today?"));
|
||||
// The agent's note reads the spec the picker opened on (the same "initial"
|
||||
@@ -286,7 +309,7 @@ export function renderDashboard(main) {
|
||||
}
|
||||
if (!shown) {
|
||||
wrap.appendChild(
|
||||
el("p", "dash-empty", "Nothing fits this pick right now. Turn off the toggle above to see every workflow.")
|
||||
el("p", "empty", "Nothing fits this pick right now. Turn off the toggle above to see every skill.")
|
||||
);
|
||||
}
|
||||
// Learning while on: after the last card group, before the approval tip.
|
||||
@@ -505,7 +528,7 @@ function hideUnavailableToggle() {
|
||||
});
|
||||
label.appendChild(box);
|
||||
label.appendChild(el("span", "dash-toggle-track"));
|
||||
label.appendChild(el("span", "dash-toggle-text", "Hide unavailable workflows"));
|
||||
label.appendChild(el("span", "dash-toggle-text", "Hide unavailable skills"));
|
||||
return label;
|
||||
}
|
||||
|
||||
@@ -563,7 +586,8 @@ function renderSpecPicker(specs) {
|
||||
if (isDeletableSpecDir(spec.dir)) {
|
||||
// A fixed bug is done with, so its Delete is a visible button rather
|
||||
// than the hover ✕ every other spec has.
|
||||
const del = fixed ? el("button", "spec-chip-del-label", "Delete") : el("button", "spec-chip-del", "✕");
|
||||
const del = fixed ? el("button", "spec-chip-del-label", "Delete") : el("button", "spec-chip-del");
|
||||
if (!fixed) del.appendChild(icon("close"));
|
||||
del.type = "button";
|
||||
del.title = `Delete ${spec.dir}/`;
|
||||
del.setAttribute("aria-label", `Delete the spec ${spec.name}`);
|
||||
@@ -611,11 +635,13 @@ function renderHandoffPreview(h) {
|
||||
box.appendChild(el("h3", "handoff-preview-title", h.title || "Handoff"));
|
||||
const entry = catalogEntry(h.skill);
|
||||
const meta = [
|
||||
"Written " + (h.written ? new Date(h.written).toLocaleString() : "at an unknown time"),
|
||||
"Written " + (h.written ? whenWords(h.written) || "at an unknown time" : "at an unknown time"),
|
||||
h.spec ? "spec " + h.spec.replace(/^specs\//, "") : "no spec",
|
||||
"from " + (entry ? entry.title : h.skill),
|
||||
];
|
||||
box.appendChild(el("p", "handoff-preview-meta", meta.join(" · ")));
|
||||
const metaLine = el("p", "handoff-preview-meta", meta.join(" · "));
|
||||
if (h.written) metaLine.title = whenTitle(h.written);
|
||||
box.appendChild(metaLine);
|
||||
if (h.next) {
|
||||
box.appendChild(el("p", "handoff-preview-label", "Next task"));
|
||||
box.appendChild(el("p", "handoff-preview-next", h.next));
|
||||
@@ -740,8 +766,8 @@ function dashCard(entry, menu) {
|
||||
if (!presentation.on && presentation.reason) b.title = presentation.reason;
|
||||
|
||||
const head = el("span", "dash-card-head");
|
||||
head.appendChild(el("span", "dash-chip", entry.chip));
|
||||
if (presentation.recommended) head.appendChild(el("span", "pill suggested", "Suggested"));
|
||||
head.appendChild(el("span", "pill is-neutral is-caps dash-chip", entry.chip));
|
||||
if (presentation.recommended) head.appendChild(el("span", "pill is-accent is-caps suggested", "Suggested"));
|
||||
b.appendChild(head);
|
||||
const title = el("span", "dash-card-title");
|
||||
if (entry.icon) {
|
||||
@@ -770,7 +796,14 @@ function dashCard(entry, menu) {
|
||||
page.dashPick = entry;
|
||||
redraw();
|
||||
});
|
||||
if (entry.appOnly) b.appendChild(loopHelpLink());
|
||||
// "How the loop works" is a link of its own beside the card, never inside
|
||||
// the button (a link in a button is not valid and reads badly aloud).
|
||||
if (entry.appOnly) {
|
||||
const wrap = el("div", "dash-card-wrap");
|
||||
wrap.appendChild(b);
|
||||
wrap.appendChild(loopHelpLink());
|
||||
return wrap;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -782,19 +815,12 @@ function loopPresentation(entry, menu) {
|
||||
return { ...cardPresentation(entry, scan(), selSpec(), menu), recommended: false };
|
||||
}
|
||||
|
||||
// "How the loop works" on the card: a link inside a button is not allowed, so
|
||||
// it is a span that acts like one and keeps the click from opening the setup.
|
||||
// "How the loop works" under the card: a real button styled as a link, a
|
||||
// sibling of the card button inside its wrapper.
|
||||
function loopHelpLink() {
|
||||
const a = el("span", "dash-card-link", "How the loop works");
|
||||
a.setAttribute("role", "link");
|
||||
a.tabIndex = 0;
|
||||
const open = (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
hooks.openHelpOn("loop");
|
||||
};
|
||||
a.addEventListener("click", open);
|
||||
a.addEventListener("keydown", (e) => (e.key === "Enter" || e.key === " ") && open(e));
|
||||
const a = el("button", "dash-card-link", "How the loop works");
|
||||
a.type = "button";
|
||||
a.addEventListener("click", () => hooks.openHelpOn("loop"));
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -908,7 +934,7 @@ function drawNoteBox(entry, box, cmdNote) {
|
||||
label.append(toggle, el("span", "confirm-note-switch-text", "Start with a note from your Notebook"));
|
||||
// A callout row, so the switch stands out under the card's long text; the
|
||||
// hint sits outside the label to keep the checkbox's name short.
|
||||
const head = el("div", "confirm-note-head" + (state.on ? " is-on" : ""));
|
||||
const head = el("div", "callout is-info confirm-note-head" + (state.on ? " is-on" : ""));
|
||||
head.appendChild(label);
|
||||
if (!state.on) {
|
||||
const hint = el("span", "confirm-note-hint", "Hand it a tab you wrote earlier, with its pictures.");
|
||||
@@ -927,7 +953,12 @@ function drawNoteBox(entry, box, cmdNote) {
|
||||
if (state.tabs === null) {
|
||||
wrap.appendChild(el("p", "confirm-note-msg", "Reading your Notebook…"));
|
||||
} else if (state.failed) {
|
||||
wrap.appendChild(el("p", "confirm-note-msg", "Your Notebook could not be read. Turn the switch off and on to try again."));
|
||||
wrap.appendChild(el("p", "confirm-note-msg", "Your Notebook could not be read."));
|
||||
const retry = el("button", "btn xs soft confirm-note-retry", "Try again");
|
||||
retry.type = "button";
|
||||
retry.dataset.noteFocus = "retry";
|
||||
retry.addEventListener("click", () => refreshNoteTabs(state, true));
|
||||
wrap.appendChild(retry);
|
||||
} else if (!state.tabs.length) {
|
||||
wrap.appendChild(el("p", "confirm-note-msg", "Your Notebook has no tabs yet. Open it from the top bar to write one."));
|
||||
} else {
|
||||
@@ -943,7 +974,7 @@ function drawNoteBox(entry, box, cmdNote) {
|
||||
b.setAttribute("aria-pressed", String(t.id === state.picked));
|
||||
b.appendChild(el("span", "confirm-note-tab-name", t.name));
|
||||
if (t.sent) {
|
||||
const badge = el("span", "notepad-sent-badge", "previously sent");
|
||||
const badge = el("span", "pill is-accent notepad-sent-badge", "previously sent");
|
||||
badge.setAttribute("aria-hidden", "true");
|
||||
b.appendChild(badge);
|
||||
}
|
||||
@@ -1055,8 +1086,8 @@ export function renderConfirm(main, entry) {
|
||||
pane.appendChild(stage);
|
||||
|
||||
const head = el("div", "confirm-head");
|
||||
head.appendChild(el("span", "dash-chip", entry.chip));
|
||||
if (presentation.recommended) head.appendChild(el("span", "pill suggested", "Suggested"));
|
||||
head.appendChild(el("span", "pill is-neutral is-caps dash-chip", entry.chip));
|
||||
if (presentation.recommended) head.appendChild(el("span", "pill is-accent is-caps suggested", "Suggested"));
|
||||
pane.appendChild(head);
|
||||
pane.appendChild(el("h2", "dash-title", entry.title));
|
||||
pane.appendChild(el("p", "confirm-about", entry.about || entry.blurb));
|
||||
@@ -1086,7 +1117,7 @@ export function renderConfirm(main, entry) {
|
||||
page.dashReview = review.checked;
|
||||
cmdCode.textContent = launchVariant(entry, review.checked).command;
|
||||
});
|
||||
label.append(review, el("span", null, "Auto Review: fresh agent pass over the phase's changes before sign-off"));
|
||||
label.append(review, el("span", null, "Review each phase with a fresh agent before sign-off"));
|
||||
pane.appendChild(label);
|
||||
}
|
||||
|
||||
@@ -1151,7 +1182,7 @@ export async function launchSkill(entry) {
|
||||
// The card was clickable, so this should never fire — but a spec picked in
|
||||
// one tab could have shifted the ground under a stale render in another.
|
||||
if (!cardAvailability(entry, scan(), selSpec()).on) {
|
||||
hooks.banner("That card is not available for the spec you picked.", "warn");
|
||||
hooks.banner("That skill is not available for the spec you picked.", "warn");
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
@@ -1210,6 +1241,12 @@ export async function launchSkill(entry) {
|
||||
}
|
||||
if (!res.ok) throw new Error(String(res.status));
|
||||
sound("startSkill");
|
||||
// The first launch from this machine ends the first-run hold on the
|
||||
// optional extras (never cleared, not even by Back to default).
|
||||
if (looks.skillLaunched !== true) {
|
||||
looks.skillLaunched = true;
|
||||
saveLooks();
|
||||
}
|
||||
page.local.launching = { skill: entry.skill, title: entry.title, at: Date.now() };
|
||||
page.launchScoping = false;
|
||||
page.pendingResult = true;
|
||||
@@ -1251,14 +1288,16 @@ function openHandoffDelete(h) {
|
||||
$("delete-warn-handoff").hidden = false;
|
||||
const facts = $("delete-facts");
|
||||
facts.replaceChildren();
|
||||
const fact = (term, value) => {
|
||||
const fact = (term, value, title) => {
|
||||
if (!value) return;
|
||||
facts.appendChild(el("dt", "", term));
|
||||
facts.appendChild(el("dd", "", value));
|
||||
const dd = el("dd", "", value);
|
||||
if (title) dd.title = title;
|
||||
facts.appendChild(dd);
|
||||
};
|
||||
const entry = catalogEntry(h.skill);
|
||||
fact("Handoff", h.title || h.id);
|
||||
fact("Written", h.written ? new Date(h.written).toLocaleString() : "");
|
||||
fact("Written", h.written ? whenWords(h.written) : "", h.written ? whenTitle(h.written) : "");
|
||||
fact("Spec", h.spec ? h.spec.replace(/^specs\//, "") : "");
|
||||
fact("From", entry ? entry.title : h.skill);
|
||||
$("delete-confirm").hidden = true;
|
||||
@@ -1289,16 +1328,18 @@ function openDeleteConfirm(spec) {
|
||||
$("delete-blurb").textContent = `Everything in ${sum.folder} will be deleted from this project.`;
|
||||
const facts = $("delete-facts");
|
||||
facts.replaceChildren();
|
||||
const fact = (term, value) => {
|
||||
const fact = (term, value, title) => {
|
||||
if (!value) return;
|
||||
facts.appendChild(el("dt", "", term));
|
||||
facts.appendChild(el("dd", "", value));
|
||||
const dd = el("dd", "", value);
|
||||
if (title) dd.title = title;
|
||||
facts.appendChild(dd);
|
||||
};
|
||||
fact("Spec", spec.name);
|
||||
fact("Folder", sum.folder);
|
||||
fact("Stage", sum.stage);
|
||||
fact("Files", sum.files);
|
||||
fact("Last changed", sum.touched ? new Date(sum.touched).toLocaleString() : "");
|
||||
fact("Last changed", sum.touched ? whenWords(sum.touched) : "", sum.touched ? whenTitle(sum.touched) : "");
|
||||
$("delete-name-hint").textContent = spec.name;
|
||||
$("delete-name").value = "";
|
||||
$("delete-confirm").hidden = true;
|
||||
@@ -1402,7 +1443,7 @@ function learningBanner(sc) {
|
||||
const working = busy && (busy.what === "review" || busy.what === "decide") ? busy : null;
|
||||
const text = learningBannerText(sc && sc.learning);
|
||||
if (!text && !working) return null;
|
||||
const banner = el("div", "dash-nudge learn-banner");
|
||||
const banner = el("div", "callout is-info dash-nudge learn-banner");
|
||||
banner.setAttribute("role", "status");
|
||||
if (working) {
|
||||
banner.classList.add("is-busy");
|
||||
@@ -1411,7 +1452,7 @@ function learningBanner(sc) {
|
||||
line.append(el("span", "spinner tiny"), document.createTextNode(working.what === "review" ? "Opening lessons…" : "Saving your lessons…"));
|
||||
banner.appendChild(line);
|
||||
if (working.what === "review") {
|
||||
const review = el("button", "btn small primary", "Review");
|
||||
const review = el("button", "btn sm primary", "Review");
|
||||
review.type = "button";
|
||||
review.disabled = true;
|
||||
banner.appendChild(review);
|
||||
@@ -1419,7 +1460,7 @@ function learningBanner(sc) {
|
||||
return banner;
|
||||
}
|
||||
banner.appendChild(el("span", "dash-nudge-text", text));
|
||||
const review = el("button", "btn small primary", "Review");
|
||||
const review = el("button", "btn sm primary", "Review");
|
||||
review.type = "button";
|
||||
const why = hooks.learningBlocked();
|
||||
review.disabled = Boolean(why);
|
||||
@@ -1453,8 +1494,8 @@ function watchLearningBusy(busy) {
|
||||
clearInterval(timer);
|
||||
page.learningBusy = null;
|
||||
if (busy.what === "review") {
|
||||
hooks.banner("No lessons are waiting any more.", "info");
|
||||
setTimeout(() => hooks.banner(null), 4000);
|
||||
const none = hooks.banner("No lessons are waiting any more.", "info");
|
||||
setTimeout(() => hooks.clearBanner(none), 4000);
|
||||
}
|
||||
redraw();
|
||||
}, 400);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {
|
||||
docs, agentWorking, workingMs, patience, WORKING_GRACE_MS, finish, SPEC_FILES, loadAgentsDoc, openPrototypeDoc, closePrototypeDoc,
|
||||
} from "../selectors.js";
|
||||
import { el, md } from "../render.js";
|
||||
import { el, icon, md } from "../render.js";
|
||||
import { downloadDocHtml, docSavedNote, downloadDoc, blockBody } from "../doc-files.js";
|
||||
import { hooks, page, redraw } from "../state.js";
|
||||
|
||||
@@ -93,8 +93,8 @@ export async function sendBrief() {
|
||||
if (res.status === 409) throw Object.assign(new Error("pending"), { pending: true });
|
||||
if (!res.ok) throw new Error(String(res.status));
|
||||
$("brief-modal").close();
|
||||
hooks.banner("Asked for a brief. It will appear as a tab when it is written.", "good");
|
||||
setTimeout(() => hooks.banner(null), 5000);
|
||||
const asked = hooks.banner("Asked for a brief. It will appear as a tab when it is written.", "good");
|
||||
setTimeout(() => hooks.clearBanner(asked), 5000);
|
||||
page.pendingResult = true;
|
||||
redraw();
|
||||
} catch (err) {
|
||||
@@ -120,17 +120,25 @@ export function renderBriefButton() {
|
||||
if (offer) btn.disabled = page.gone || page.pendingResult || Boolean(finish());
|
||||
}
|
||||
|
||||
// The page's one empty block (.empty): an icon from the sheet and one line.
|
||||
function emptyBlock(text) {
|
||||
const box = el("div", "empty");
|
||||
box.appendChild(icon("document", "empty-icon"));
|
||||
box.appendChild(el("p", null, text));
|
||||
return box;
|
||||
}
|
||||
|
||||
export function renderDoc(main, id) {
|
||||
const doc = docs().find((d) => d.id === id);
|
||||
if (!doc) {
|
||||
main.appendChild(el("p", "doc-empty", "That document is not ready yet."));
|
||||
main.appendChild(emptyBlock("That document is not ready yet."));
|
||||
return;
|
||||
}
|
||||
const head = el("div", "doc-head");
|
||||
head.appendChild(el("h2", null, doc.title || "Document"));
|
||||
head.appendChild(el("span", "doc-version", "v" + (doc.version || 1)));
|
||||
if (doc.stale) {
|
||||
head.appendChild(el("span", "pill staged", "Out of date"));
|
||||
head.appendChild(el("span", "pill is-stage", "Out of date"));
|
||||
}
|
||||
|
||||
const tools = el("div", "doc-tools");
|
||||
@@ -138,7 +146,7 @@ export function renderDoc(main, id) {
|
||||
// A brief is handed to people who were not in the room, so it gets a copy
|
||||
// that opens in any browser, formatting and all.
|
||||
if (doc.id === "brief") {
|
||||
const html = el("button", "btn small", "Save as HTML");
|
||||
const html = el("button", "btn sm", "Save as HTML");
|
||||
html.type = "button";
|
||||
html.addEventListener("click", () => downloadDocHtml(doc));
|
||||
tools.appendChild(html);
|
||||
@@ -148,7 +156,7 @@ export function renderDoc(main, id) {
|
||||
if (doc.saved) {
|
||||
tools.appendChild(docSavedNote(doc));
|
||||
} else {
|
||||
const save = el("button", "btn small", "Download");
|
||||
const save = el("button", "btn sm", "Download");
|
||||
save.type = "button";
|
||||
save.addEventListener("click", () => downloadDoc(doc));
|
||||
tools.appendChild(save);
|
||||
@@ -160,7 +168,7 @@ export function renderDoc(main, id) {
|
||||
|
||||
const blocks = doc.blocks || [];
|
||||
if (!blocks.length) {
|
||||
main.appendChild(el("p", "doc-empty", "Nothing written yet. It fills in as you answer."));
|
||||
main.appendChild(emptyBlock("Nothing written yet. It fills in as you answer."));
|
||||
return;
|
||||
}
|
||||
// The block nearest the top of the column is the section + Add context
|
||||
@@ -202,7 +210,7 @@ export function renderDoc(main, id) {
|
||||
function backButton() {
|
||||
const flow = page.S.workflow;
|
||||
const home = flow === "dashboard" ? "Dashboard" : flow === "git" ? "Git" : "Questions";
|
||||
const back = el("button", "btn small back-home", "Back to " + home);
|
||||
const back = el("button", "btn sm back-home", "Back to " + home);
|
||||
back.type = "button";
|
||||
back.addEventListener("click", () => {
|
||||
page.view = finish() ? "end" : "questions";
|
||||
@@ -213,7 +221,7 @@ function backButton() {
|
||||
}
|
||||
|
||||
function printButton() {
|
||||
const print = el("button", "btn small", "Print");
|
||||
const print = el("button", "btn sm", "Print");
|
||||
print.type = "button";
|
||||
// The print stylesheet drops everything that steers the session, so what
|
||||
// comes out is the document alone. "Save as PDF" in that dialog is also the
|
||||
@@ -237,10 +245,21 @@ export function renderOverview(main, kind = "overview") {
|
||||
main.appendChild(head);
|
||||
main.appendChild(el("p", "help", `${page.overview.key}/${found ? found.file : ""} · read-only, straight from disk`));
|
||||
const box = el("div", "block settled");
|
||||
box.appendChild(md(found ? found.text : "", "md"));
|
||||
if (found) box.appendChild(md(found.text, "md"));
|
||||
else box.appendChild(loadingRows());
|
||||
main.appendChild(box);
|
||||
}
|
||||
|
||||
// Muted rows where a file's lines will be, the diff view's loading look
|
||||
// (they shimmer under no-preference, diff.css).
|
||||
function loadingRows(count = 7) {
|
||||
const rows = el("div", "diff-skeleton doc-skeleton");
|
||||
rows.setAttribute("role", "status");
|
||||
rows.setAttribute("aria-label", "Reading the file");
|
||||
for (let i = 0; i < count; i++) rows.appendChild(el("span", "diff-skel-row"));
|
||||
return rows;
|
||||
}
|
||||
|
||||
// The files the AGENTS.md tab may show: the same two shapes the server serves.
|
||||
const AGENTS_FILE = /^(?:AGENTS\.md|\.agents-docs\/[A-Za-z0-9._-]+\.md)$/;
|
||||
|
||||
@@ -267,7 +286,7 @@ export function renderAgentsDoc(main) {
|
||||
head.appendChild(el("h2", null, open === "AGENTS.md" ? "AGENTS.md" : open));
|
||||
const tools = el("div", "doc-tools");
|
||||
if (open !== "AGENTS.md") {
|
||||
const guide = el("button", "btn small", "Back to AGENTS.md");
|
||||
const guide = el("button", "btn sm", "Back to AGENTS.md");
|
||||
guide.type = "button";
|
||||
guide.addEventListener("click", () => {
|
||||
page.agentsDoc.open = "AGENTS.md";
|
||||
@@ -323,7 +342,7 @@ export function renderPrototypes(main) {
|
||||
head.appendChild(el("h2", null, reading ? open : "Prototypes"));
|
||||
const tools = el("div", "doc-tools");
|
||||
if (reading) {
|
||||
const list = el("button", "btn small", "Back to Prototypes");
|
||||
const list = el("button", "btn sm", "Back to Prototypes");
|
||||
list.type = "button";
|
||||
list.addEventListener("click", () => {
|
||||
closePrototypeDoc();
|
||||
@@ -347,7 +366,7 @@ export function renderPrototypes(main) {
|
||||
const row = el("li", "proto-row");
|
||||
const b = el("button", "proto-open", null);
|
||||
b.type = "button";
|
||||
b.appendChild(el("span", "proto-kind proto-kind-" + f.kind, f.kind === "md" ? "MD" : "HTML"));
|
||||
b.appendChild(el("span", "code-tag" + (f.kind === "md" ? "" : " is-accent") + " proto-kind proto-kind-" + f.kind, f.kind === "md" ? "MD" : "HTML"));
|
||||
b.appendChild(el("span", "proto-name", f.name));
|
||||
b.appendChild(el("span", "proto-how", f.kind === "md" ? "Read it here" : "Opens in your browser ↗"));
|
||||
b.title = f.kind === "md" ? `Read ${f.name} here` : `Open ${f.name} in your default browser`;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Plan2Code Web Console - how a session ends: the finished screen, its offers, Stop and the way home; defines only.
|
||||
|
||||
import { NOT_CONNECTED } from "../labels.js";
|
||||
import { el, md, copyButton, copyText, selectContents, textWithCode, SVG_NS } from "../render.js";
|
||||
import {
|
||||
finishPaused,
|
||||
@@ -246,9 +247,9 @@ export function renderLoopEnd(end) {
|
||||
const reason = !finished && typeof end.reason === "string" && end.reason ? end.reason : "";
|
||||
card.appendChild(el("h2", "loop-end-heading", finished ? "Every phase is built" : reason || end.line));
|
||||
// On a stop the full line is the colored reason, and the advice sits under it.
|
||||
if ((finished || reason) && end.line) card.appendChild(el("p", finished ? "loop-line" : "loop-line loop-why", end.line));
|
||||
if ((finished || reason) && end.line) card.appendChild(el("p", finished ? "loop-line" : "callout is-warn loop-line loop-why", end.line));
|
||||
if (!finished && typeof end.advice === "string" && end.advice) {
|
||||
const next = el("p", "loop-advice");
|
||||
const next = el("p", "callout is-info loop-advice");
|
||||
next.appendChild(el("strong", null, "What to do next: "));
|
||||
next.appendChild(document.createTextNode(end.advice));
|
||||
card.appendChild(next);
|
||||
@@ -260,7 +261,7 @@ export function renderLoopEnd(end) {
|
||||
|
||||
const evidence = end.evidence && docs().find((d) => d.id === end.evidence);
|
||||
if (evidence) {
|
||||
const read = el("button", "btn small", finished ? "Read the full report" : "Read why, and the report so far");
|
||||
const read = el("button", "btn sm", finished ? "Read the full report" : "Read why, and the report so far");
|
||||
read.type = "button";
|
||||
read.addEventListener("click", () => {
|
||||
page.view = "doc:" + evidence.id;
|
||||
@@ -399,7 +400,7 @@ function renderReport(text) {
|
||||
body.tabIndex = 0;
|
||||
body.setAttribute("role", "region");
|
||||
body.setAttribute("aria-label", "Bug report");
|
||||
const copy = el("button", "btn small", "Copy report");
|
||||
const copy = el("button", "btn sm", "Copy report");
|
||||
copy.type = "button";
|
||||
// Word for word what the file holds, so it pastes into a ticket as Markdown.
|
||||
copy.addEventListener("click", () =>
|
||||
@@ -417,7 +418,7 @@ function renderReport(text) {
|
||||
export function renderHandoff(fin) {
|
||||
if (page.S && page.S.loopEnd) return renderLoopEnd(page.S.loopEnd);
|
||||
const card = el("article", "card handoff");
|
||||
card.appendChild(el("p", "card-kicker", finishPaused(fin) ? "Session paused" : "Session ended"));
|
||||
card.appendChild(el("p", "card-kicker", finishPaused(fin) ? "Session stopped" : "Session finished"));
|
||||
card.appendChild(el("h2", null, fin.headline));
|
||||
if (fin.body) card.appendChild(md(fin.body, "md prompt"));
|
||||
|
||||
@@ -451,6 +452,9 @@ export function renderHandoff(fin) {
|
||||
// session with nothing left to run, which gets a quiet pointer at the
|
||||
// dashboard instead of a Next step block.
|
||||
const shape = handoffShape(fin);
|
||||
// The quiet extras of a finish (a second way to start something else, and
|
||||
// "Before you close this") fold into one closed section at the foot.
|
||||
const folded = [];
|
||||
if (shape === "all-done") {
|
||||
const done = el("div", "handoff-done");
|
||||
done.appendChild(md(`${ALL_DONE_LEAD} ${page.inApp ? ALL_DONE_REST_IN_APP : ALL_DONE_REST}`, "md handoff-done-text"));
|
||||
@@ -461,7 +465,7 @@ export function renderHandoff(fin) {
|
||||
const row = el("div", "handoff-command");
|
||||
const code = el("code", "handoff-code", text);
|
||||
row.appendChild(code);
|
||||
row.appendChild(copyButton(text, "btn small ghost handoff-copy", code));
|
||||
row.appendChild(copyButton(text, "btn sm ghost handoff-copy", code));
|
||||
done.appendChild(row);
|
||||
// Once the server is gone, the row above already is the offer's fallback.
|
||||
if (dashboardLive(fin) && !page.gone) done.appendChild(renderDashboardOffer(true));
|
||||
@@ -491,13 +495,13 @@ export function renderHandoff(fin) {
|
||||
const row = el("div", "handoff-command");
|
||||
const code = el("code", "handoff-code", text);
|
||||
row.appendChild(code);
|
||||
row.appendChild(copyButton(text, "btn small handoff-copy", code));
|
||||
row.appendChild(copyButton(text, "btn sm handoff-copy", code));
|
||||
step.appendChild(row);
|
||||
// Under the app a clean start is the bar's New Session: one press, with
|
||||
// the command already on the clipboard to paste into the new terminal.
|
||||
if (page.inApp && command.startsWith("/") && !page.gone && !pressStranded()) {
|
||||
const fresh = el("div", "handoff-newsession");
|
||||
const press = el("button", "btn small", "Start a New Session");
|
||||
const press = el("button", "btn sm", "Start a New Session");
|
||||
press.type = "button";
|
||||
press.addEventListener("click", () => startNewSession(text));
|
||||
fresh.appendChild(press);
|
||||
@@ -528,7 +532,7 @@ export function renderHandoff(fin) {
|
||||
// `/plan2code`"), right below this card, so repeating it here would
|
||||
// be the third mention of the one action on this screen.
|
||||
if (!page.inApp && !(offerDash && page.gone)) {
|
||||
card.appendChild(
|
||||
folded.push(
|
||||
textWithCode(
|
||||
"p",
|
||||
"handoff-fresh",
|
||||
@@ -539,8 +543,8 @@ export function renderHandoff(fin) {
|
||||
const freshRow = el("div", "handoff-command handoff-fresh-row");
|
||||
const freshCode = el("code", "handoff-code", freshText);
|
||||
freshRow.appendChild(freshCode);
|
||||
freshRow.appendChild(copyButton(freshText, "btn small ghost handoff-copy", freshCode));
|
||||
card.appendChild(freshRow);
|
||||
freshRow.appendChild(copyButton(freshText, "btn sm ghost handoff-copy", freshCode));
|
||||
folded.push(freshRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -548,7 +552,8 @@ export function renderHandoff(fin) {
|
||||
// Not while a hand-off they just asked for is starting on this page: "Safe
|
||||
// to close" and "start a new one" would contradict the line above it. The
|
||||
// press re-renders the page, and so does the agent taking it up.
|
||||
if (!closeGuideHeld()) card.appendChild(renderCloseGuide(shape, fin));
|
||||
if (!closeGuideHeld()) folded.push(renderCloseGuide(shape, fin));
|
||||
if (folded.length) card.appendChild(renderFoldedExtras(folded));
|
||||
|
||||
card.appendChild(
|
||||
el(
|
||||
@@ -571,13 +576,14 @@ export function renderHandoff(fin) {
|
||||
if (keep.saved) {
|
||||
tools.appendChild(docSavedNote(keep));
|
||||
} else {
|
||||
const save = el("button", "btn small", `Download ${keep.title || "the document"}`);
|
||||
const save = el("button", "btn sm", `Download ${keep.title || "the document"}`);
|
||||
save.type = "button";
|
||||
save.addEventListener("click", () => downloadDoc(keep));
|
||||
tools.appendChild(save);
|
||||
}
|
||||
card.appendChild(tools);
|
||||
}
|
||||
onePrimary(card);
|
||||
|
||||
// Answers staged and never sent are lost the moment this page closes, and
|
||||
// this page's one promise is that nothing gets lost. Say so plainly rather
|
||||
@@ -587,7 +593,7 @@ export function renderHandoff(fin) {
|
||||
card.appendChild(
|
||||
el(
|
||||
"p",
|
||||
"handoff-unsent",
|
||||
"callout is-stage handoff-unsent",
|
||||
`${stuck} answer${stuck === 1 ? "" : "s"} here ${stuck === 1 ? "was" : "were"} never sent, ` +
|
||||
`and Plan2Code has finished. If ${stuck === 1 ? "it" : "they"} still matter, say so in the ` +
|
||||
`next session: nothing on this page will reach it now.`
|
||||
@@ -597,6 +603,37 @@ export function renderHandoff(fin) {
|
||||
return card;
|
||||
}
|
||||
|
||||
// Whether "Closing or starting fresh" is open, kept across redraws: a section
|
||||
// that closes under a reader who just opened it is worse than one left open.
|
||||
let foldedOpen = null;
|
||||
|
||||
// The fresh-session advice is what a red meter asks for, so it opens by itself
|
||||
// there (until the person closes it).
|
||||
function renderFoldedExtras(nodes) {
|
||||
const box = el("details", "handoff-more");
|
||||
const red = Boolean(page.meterFrame && page.meterFrame.level === "red");
|
||||
box.open = foldedOpen === null ? red : foldedOpen;
|
||||
box.appendChild(el("summary", "handoff-more-title", "Closing or starting fresh"));
|
||||
box.append(...nodes);
|
||||
box.addEventListener("toggle", () => {
|
||||
foldedOpen = box.open;
|
||||
});
|
||||
return box;
|
||||
}
|
||||
|
||||
// Exactly one primary button per finish, by a fixed rule: the review when it is
|
||||
// on offer, else the commit, else Continue here, else Back to the dashboard, else
|
||||
// the stranded screen's New Session, else the next command's Copy button (a
|
||||
// pause, a gone server: the one thing to do is take the command). The rest are
|
||||
// plain buttons.
|
||||
const PRIMARY_RULE = [".review-go", ".commit-go", ".continue-go", ".dashboard-go", ".stranded-go", ".handoff-copy"];
|
||||
|
||||
function onePrimary(card) {
|
||||
const keep = PRIMARY_RULE.map((sel) => card.querySelector(sel)).find(Boolean) || null;
|
||||
for (const b of card.querySelectorAll("button.primary")) if (b !== keep) b.classList.remove("primary");
|
||||
if (keep) keep.classList.add("primary");
|
||||
}
|
||||
|
||||
// The escape hatch of a finished screen whose press nothing collects (the
|
||||
// agent's turn ended while the page waited). Always enabled: under the app a
|
||||
// New Session, with the dashboard command copied first; in a browser the
|
||||
@@ -614,7 +651,7 @@ function renderStrandedEscape() {
|
||||
)
|
||||
);
|
||||
const row = el("div", "btn-row");
|
||||
const go = el("button", "btn primary", "Start a New Session");
|
||||
const go = el("button", "btn primary stranded-go", "Start a New Session");
|
||||
go.type = "button";
|
||||
go.addEventListener("click", () => startNewSession(text));
|
||||
row.appendChild(go);
|
||||
@@ -631,7 +668,7 @@ function renderStrandedEscape() {
|
||||
const row = el("div", "handoff-command");
|
||||
const code = el("code", "handoff-code", text);
|
||||
row.appendChild(code);
|
||||
row.appendChild(copyButton(text, "btn small handoff-copy", code));
|
||||
row.appendChild(copyButton(text, "btn sm handoff-copy", code));
|
||||
box.appendChild(row);
|
||||
return box;
|
||||
}
|
||||
@@ -669,7 +706,7 @@ function renderReviewOffer(offer) {
|
||||
const row = el("div", "handoff-command");
|
||||
const code = el("code", "handoff-code", text);
|
||||
row.appendChild(code);
|
||||
row.appendChild(copyButton(text, "btn small handoff-copy", code));
|
||||
row.appendChild(copyButton(text, "btn sm handoff-copy", code));
|
||||
box.appendChild(row);
|
||||
return box;
|
||||
}
|
||||
@@ -714,7 +751,7 @@ function renderCommitOffer() {
|
||||
);
|
||||
const { asked, disabled } = afterFinishButton(page.local.afterBuild, "commit", page.pendingResult);
|
||||
const row = el("div", "btn-row");
|
||||
const go = el("button", "btn primary", asked ? "Opening Git…" : "Commit it now");
|
||||
const go = el("button", "btn primary commit-go", asked ? "Opening Git…" : "Commit it now");
|
||||
go.type = "button";
|
||||
go.disabled = disabled;
|
||||
go.addEventListener("click", () => sendAfterBuild("commit"));
|
||||
@@ -738,7 +775,7 @@ function continueLive() {
|
||||
function renderContinueOffer(next) {
|
||||
const box = el("div", "continue-offer");
|
||||
const { asked, disabled } = afterFinishButton(page.local.afterBuild, "launch", page.pendingResult);
|
||||
const go = el("button", "btn primary continue-go", asked ? "Starting the next step…" : "Continue here");
|
||||
const go = el("button", "btn primary continue-go", asked ? "Starting the next skill…" : "Continue here");
|
||||
go.type = "button";
|
||||
go.disabled = disabled;
|
||||
go.addEventListener("click", () => sendAfterBuild("launch", next));
|
||||
@@ -803,14 +840,14 @@ function renderDashboardOffer(primary) {
|
||||
const row = el("div", "handoff-command");
|
||||
const code = el("code", "handoff-code", text);
|
||||
row.appendChild(code);
|
||||
row.appendChild(copyButton(text, "btn small handoff-copy", code));
|
||||
row.appendChild(copyButton(text, "btn sm handoff-copy", code));
|
||||
box.appendChild(row);
|
||||
return box;
|
||||
}
|
||||
const { asked, disabled } = afterFinishButton(page.local.afterBuild, "dashboard", page.pendingResult);
|
||||
const go = el(
|
||||
"button",
|
||||
primary ? "btn primary" : "btn",
|
||||
primary ? "btn primary dashboard-go" : "btn dashboard-go",
|
||||
asked ? "Opening the dashboard…" : "Back to the dashboard"
|
||||
);
|
||||
go.type = "button";
|
||||
@@ -854,11 +891,11 @@ async function sendAfterBuild(kind, launch = null) {
|
||||
dashboard: "Opening the dashboard. It appears here in a moment.",
|
||||
commit: "Opening Git. It appears here in a moment.",
|
||||
changelog: "Opening Changelog. It appears here in a moment.",
|
||||
launch: "Starting the next step. It appears here in a moment.",
|
||||
launch: "Starting the next skill. It appears here in a moment.",
|
||||
}[kind];
|
||||
if (started) {
|
||||
hooks.banner(started, "good");
|
||||
setTimeout(() => hooks.banner(null), 5000);
|
||||
const startedBanner = hooks.banner(started, "good");
|
||||
setTimeout(() => hooks.clearBanner(startedBanner), 5000);
|
||||
}
|
||||
} catch {
|
||||
hooks.banner("That did not go through. Nothing was lost; try again.", "warn");
|
||||
@@ -891,6 +928,7 @@ export function renderStopButton() {
|
||||
b.textContent = "Stopping…";
|
||||
b.disabled = false;
|
||||
b.title = "Show how the stop is going";
|
||||
setLocked(b, "");
|
||||
return;
|
||||
}
|
||||
b.textContent = "Stop session";
|
||||
@@ -898,12 +936,78 @@ export function renderStopButton() {
|
||||
const gate = turnGate({ gone: page.gone, pendingResult: page.pendingResult, waiting: agentHasTheBall() });
|
||||
// A way home in flight holds Stop back too, unless the agent went quiet
|
||||
// after collecting it: Stop's resume screen is then the only way out.
|
||||
b.disabled = Boolean(gate) || (Boolean(page.local.homeward) && !agentAdrift()) || loopDriving();
|
||||
// Locked with aria-disabled, never disabled: a press still lands and says why.
|
||||
const locked = Boolean(gate) || (Boolean(page.local.homeward) && !agentAdrift()) || loopDriving();
|
||||
b.title = loopDriving() ? LOOP_LOCK_TITLE : {
|
||||
gone: "Not connected right now.",
|
||||
gone: NOT_CONNECTED,
|
||||
pending: "Your last answers are still being picked up. You can stop once they have been.",
|
||||
waiting: "Plan2Code is working on your answers. You can stop once it replies.",
|
||||
}[gate] || (stopWarning() ? "End this session. Work since the last save is not kept." : "Save your place and end this session. You get a command to pick it up later.");
|
||||
setLocked(b, locked ? lockWhy("Stop", gate, b.title) : "");
|
||||
}
|
||||
|
||||
// What a locked Stop or Back says when pressed. While Plan2Code is mid-task the
|
||||
// lock lifts at its next check-in, and the way to interrupt it is the terminal.
|
||||
function lockWhy(what, gate, fallback) {
|
||||
if (loopDriving()) return LOOP_LOCK_TITLE;
|
||||
if (gate === "waiting") {
|
||||
const where = page.inApp ? "the terminal panel" : "the terminal";
|
||||
return `Plan2Code is mid-task, so ${what} unlocks at its next check-in. To interrupt it now, press Esc in ${where}.`;
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
|
||||
function setLocked(b, why) {
|
||||
if (why) {
|
||||
b.setAttribute("aria-disabled", "true");
|
||||
b.dataset.why = why;
|
||||
} else {
|
||||
b.removeAttribute("aria-disabled");
|
||||
delete b.dataset.why;
|
||||
}
|
||||
b.classList.toggle("is-locked", Boolean(why));
|
||||
}
|
||||
|
||||
// The small note a press on a locked button opens, under that button. It goes
|
||||
// on the next press anywhere, on Escape, or after a few seconds.
|
||||
let lockPop = null;
|
||||
let lockPopTimer = null;
|
||||
|
||||
function closeLockPop() {
|
||||
clearTimeout(lockPopTimer);
|
||||
if (lockPop) lockPop.remove();
|
||||
lockPop = null;
|
||||
}
|
||||
|
||||
function showLockPop(b) {
|
||||
closeLockPop();
|
||||
const pop = el("div", "lock-pop", b.dataset.why || "");
|
||||
pop.setAttribute("role", "status");
|
||||
document.body.appendChild(pop);
|
||||
const at = b.getBoundingClientRect();
|
||||
pop.style.top = `${Math.round(at.bottom + 6)}px`;
|
||||
// Anchored by its left edge (Stop and Back sit at the left of the bar), kept
|
||||
// inside the window; right-anchoring squeezed the note into a narrow strip.
|
||||
pop.style.left = `${Math.max(8, Math.min(Math.round(at.left), window.innerWidth - pop.offsetWidth - 8))}px`;
|
||||
lockPop = pop;
|
||||
lockPopTimer = setTimeout(closeLockPop, 8000);
|
||||
const away = (e) => {
|
||||
if (e.type === "keydown" && e.key !== "Escape") return;
|
||||
if (e.type === "click" && b.contains(e.target)) return;
|
||||
closeLockPop();
|
||||
document.removeEventListener("click", away, true);
|
||||
document.removeEventListener("keydown", away, true);
|
||||
};
|
||||
document.addEventListener("click", away, true);
|
||||
document.addEventListener("keydown", away, true);
|
||||
}
|
||||
|
||||
// A locked button answers a press with its reason instead of acting.
|
||||
function whenOpen(b, act) {
|
||||
return () => {
|
||||
if (b.getAttribute("aria-disabled") === "true") showLockPop(b);
|
||||
else act();
|
||||
};
|
||||
}
|
||||
|
||||
// Plan2Code has the ball: it is working, or owes a reply to a send, and has
|
||||
@@ -929,8 +1033,12 @@ export function renderHomeButton() {
|
||||
warned: Boolean(page.S) && Boolean(stopWarning()),
|
||||
});
|
||||
b.hidden = st.hidden;
|
||||
b.disabled = st.disabled || loopDriving();
|
||||
b.title = loopDriving() ? LOOP_LOCK_TITLE : st.title;
|
||||
const gate = turnGate({ gone: page.gone, pendingResult: page.pendingResult, waiting: Boolean(page.S) && agentHasTheBall() });
|
||||
// Already on its way home: say so, never "mid-task, press Esc", which would
|
||||
// invite interrupting the hand-off the person just asked for.
|
||||
const homeward = page.local.homeward && !agentAdrift() && !loopDriving();
|
||||
setLocked(b, st.disabled || loopDriving() ? (homeward ? st.title : lockWhy("Back to the dashboard", gate, b.title)) : "");
|
||||
}
|
||||
|
||||
function openHomeConfirm() {
|
||||
@@ -1117,7 +1225,7 @@ export function renderStopping() {
|
||||
const row = el("div", "handoff-command");
|
||||
const code = el("code", "handoff-code", text);
|
||||
row.appendChild(code);
|
||||
row.appendChild(copyButton(text, "btn small handoff-copy", code));
|
||||
row.appendChild(copyButton(text, "btn sm handoff-copy", code));
|
||||
extra.appendChild(row);
|
||||
} else {
|
||||
extra.appendChild(
|
||||
@@ -1191,10 +1299,10 @@ export function renderFooterDashboard() {
|
||||
// The top bar's way home and Stop, wired once at start-up.
|
||||
export function wireEnding() {
|
||||
$("btn-dashboard").addEventListener("click", () => sendAfterBuild("dashboard"));
|
||||
$("btn-home").addEventListener("click", openHomeConfirm);
|
||||
$("btn-home").addEventListener("click", whenOpen($("btn-home"), openHomeConfirm));
|
||||
$("home-cancel").addEventListener("click", () => $("home-modal").close());
|
||||
$("home-go").addEventListener("click", goHome);
|
||||
$("btn-stop").addEventListener("click", openStopConfirm);
|
||||
$("btn-stop").addEventListener("click", whenOpen($("btn-stop"), openStopConfirm));
|
||||
$("stop-cancel").addEventListener("click", () => $("stop-modal").close());
|
||||
$("stop-handoff").addEventListener("click", () => stopSession(true));
|
||||
$("stop-go").addEventListener("click", () => stopSession(false));
|
||||
|
||||
@@ -135,8 +135,7 @@ const gitLocked = () => gitMode() !== "idle";
|
||||
async function sendGit(op, fields = {}, wording = {}) {
|
||||
if (page.gone || finish()) return;
|
||||
if (page.pendingResult) {
|
||||
hooks.banner("Your last click is still being picked up. One moment.", "info");
|
||||
page.pendingBannerUp = true;
|
||||
page.pendingBannerUp = hooks.banner("Your last click is still being picked up. One moment.", "info");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -150,8 +149,7 @@ async function sendGit(op, fields = {}, wording = {}) {
|
||||
});
|
||||
if (res.status === 409) {
|
||||
page.pendingResult = true;
|
||||
hooks.banner("Your last click is still being picked up. One moment.", "info");
|
||||
page.pendingBannerUp = true;
|
||||
page.pendingBannerUp = hooks.banner("Your last click is still being picked up. One moment.", "info");
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { looksReady, looks, saveLooks } from "../looks.js";
|
||||
import { page } from "../state.js";
|
||||
import { isDashboard, finish, agentAdrift } from "../selectors.js";
|
||||
import { releasesLink, el, copyButton, lightDismiss } from "../render.js";
|
||||
import { HELP_TABS, helpTabFor } from "../help.js";
|
||||
import { HELP_TABS, helpGroupStart, helpTabFor } from "../help.js";
|
||||
import { wireTabs } from "../tabs.js";
|
||||
import { CATALOG_GROUPS, SKILL_CATALOG } from "../answers.js";
|
||||
|
||||
@@ -20,15 +20,14 @@ export function maybeWelcome() {
|
||||
openWelcome();
|
||||
}
|
||||
|
||||
// The same "finish the step and start fresh" tip the meter popover and the
|
||||
// dashboard's own red banner give, worded for the app's New Session button there.
|
||||
function renderWelcomeRefreshHelp() {
|
||||
// Under the app the agent runs in the window's terminal panel, not a terminal.
|
||||
function renderWelcomeTerminalHelp() {
|
||||
if (!page.inApp) return;
|
||||
$("welcome-refresh-text").textContent = "Once the session meter passes half, finish the step and press New Session at the top of the window.";
|
||||
$("welcome-terminal-text").textContent = "If the page goes quiet, your agent may be asking permission in the terminal panel.";
|
||||
}
|
||||
|
||||
export function openWelcome() {
|
||||
renderWelcomeRefreshHelp();
|
||||
renderWelcomeTerminalHelp();
|
||||
if ($("help-modal").open) $("help-modal").close();
|
||||
const slot = $("welcome-bot");
|
||||
if (!slot.firstElementChild) {
|
||||
@@ -67,21 +66,23 @@ function renderAbout() {
|
||||
}
|
||||
}
|
||||
|
||||
// Under the app, a new release still needs a terminal (the app cannot replace
|
||||
// itself), but not the terminal panel, and the restart is the app's, not a
|
||||
// new /plan2code; a skills/app mismatch is the bar's one-click Update
|
||||
// skills (see docs/desktop-app.md). Patched once, the first time Help opens,
|
||||
// since page.inApp never changes for the session's life.
|
||||
// Under the app, a new release is the bar's one click, Update and restart;
|
||||
// the command stays as the fallback, run outside the terminal panel, and the
|
||||
// restart is the app's, not a new /plan2code; a skills/app mismatch is the
|
||||
// bar's one-click Update skills (see docs/desktop-app.md). Patched once, the
|
||||
// first time Help opens, since page.inApp never changes for the session's life.
|
||||
function renderUpdateHelp() {
|
||||
if (!page.inApp) return;
|
||||
$("help-update-text").replaceChildren(
|
||||
"When a newer Plan2Code release is out, the dashboard shows ",
|
||||
el("strong", null, "UPDATE AVAILABLE"),
|
||||
el("strong", null, "Update available"),
|
||||
" at the top and the app's top bar shows ",
|
||||
el("strong", null, "Update available"),
|
||||
". Both give you the same command, ",
|
||||
" with ",
|
||||
el("strong", null, "Update and restart"),
|
||||
", which installs the new release and reopens the app on the same project. If that fails, run ",
|
||||
el("code", null, "plan2code update"),
|
||||
": run it in a terminal outside the app (not its terminal panel), then close the app and open it again. The app cannot replace itself while it runs, so a new release has no one-click update. When the app and the installed skills fall out of step, the bar offers ",
|
||||
" in a terminal outside the app (not its terminal panel), then close the app and open it again. When the app and the installed skills fall out of step, the bar offers ",
|
||||
el("strong", null, "Update skills"),
|
||||
" instead, which brings them level in one click."
|
||||
);
|
||||
@@ -108,7 +109,7 @@ function renderFinishingHelp() {
|
||||
function renderFinishingDashboardHelp() {
|
||||
if (!page.inApp) return;
|
||||
$("help-finishing-dashboard-text").replaceChildren(
|
||||
"A finished screen (never a paused one) has a ",
|
||||
"A finished screen (never a stopped one) has a ",
|
||||
el("strong", null, "Back to the dashboard"),
|
||||
" button. It turns this page back into the cards, in the same conversation, so the next step starts right here. Plan2Code listens for it for as long as the session is open. Once the session has closed, the app's own bar notices and offers to reconnect it, no command needed."
|
||||
);
|
||||
@@ -277,7 +278,7 @@ function buildHelp() {
|
||||
}
|
||||
for (const row of panels.querySelectorAll("[data-copy]")) {
|
||||
const code = row.querySelector("code");
|
||||
row.appendChild(copyButton(code.textContent, "btn small handoff-copy", code));
|
||||
row.appendChild(copyButton(code.textContent, "btn sm handoff-copy", code));
|
||||
}
|
||||
helpTabs = wireTabs({
|
||||
tabs: HELP_TABS,
|
||||
@@ -285,6 +286,8 @@ function buildHelp() {
|
||||
panels,
|
||||
prefix: "help",
|
||||
tabClass: "help-tab",
|
||||
groupStart: helpGroupStart,
|
||||
groupClass: "help-tab-group",
|
||||
renderTab: (t, btn) => {
|
||||
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
||||
svg.setAttribute("class", "help-tab-icon");
|
||||
@@ -299,6 +302,29 @@ function buildHelp() {
|
||||
$("help-panels").scrollTop = 0;
|
||||
},
|
||||
});
|
||||
// The filter box: a topic stays when every word typed is in its label or its
|
||||
// panel's text (the panels are all in the page once Help is built).
|
||||
const filterBox = $("help-filter");
|
||||
filterBox.addEventListener("input", () => {
|
||||
const words = filterBox.value.toLowerCase().split(/\s+/).filter(Boolean);
|
||||
const shown = helpTabs.filter(
|
||||
words.length
|
||||
? (t) => {
|
||||
const text = (t.label + " " + (panels.querySelector(`[data-tab="${t.id}"]`)?.textContent || "")).toLowerCase();
|
||||
return words.every((w) => text.includes(w));
|
||||
}
|
||||
: null
|
||||
);
|
||||
$("help-filter-empty").hidden = shown > 0;
|
||||
});
|
||||
// From the filter box, the down arrow steps into the topics that are left.
|
||||
filterBox.addEventListener("keydown", (e) => {
|
||||
if (e.key !== "ArrowDown") return;
|
||||
const first = helpTabs.shown()[0];
|
||||
if (!first) return;
|
||||
e.preventDefault();
|
||||
$("help-tab-" + first.id).focus();
|
||||
});
|
||||
helpBuilt = true;
|
||||
}
|
||||
|
||||
@@ -320,6 +346,13 @@ export function openHelp() {
|
||||
renderPlannyDoneHelp();
|
||||
renderHandoffCopyHelp();
|
||||
}
|
||||
// A filter left typed in a closed Help would hide the topic it opens on.
|
||||
const filterBox = $("help-filter");
|
||||
if (filterBox.value) {
|
||||
filterBox.value = "";
|
||||
helpTabs.filter(null);
|
||||
$("help-filter-empty").hidden = true;
|
||||
}
|
||||
const id = helpTabFor({
|
||||
view: page.view,
|
||||
dashboard: isDashboard(),
|
||||
|
||||
@@ -9,20 +9,21 @@
|
||||
// in dashboard.js, reached through hooks: a screen never imports another),
|
||||
// and is disabled whenever a card would be.
|
||||
|
||||
import { NOT_CONNECTED } from "../labels.js";
|
||||
import { page, redraw, hooks, stage } from "../state.js";
|
||||
import { el, md, mdInto, lightDismiss } from "../render.js";
|
||||
import { el, icon, md, mdInto, lightDismiss } from "../render.js";
|
||||
import { postJson } from "../net.js";
|
||||
import { sendState, suggestState } from "../send-state.js";
|
||||
import { threadWho, threadText } from "../answers.js";
|
||||
import { loopDriving, isOpen, stagedCount, learningBusyNow } from "../selectors.js";
|
||||
|
||||
const TOP_STATES = new Set(["not-set-up", "off", "paused"]);
|
||||
const TOP_STATES = new Set(["off", "paused"]);
|
||||
|
||||
const PILLS = {
|
||||
"not-set-up": { text: "Not set up", cls: "" },
|
||||
off: { text: "Off", cls: "" },
|
||||
on: { text: "On", cls: " is-on" },
|
||||
paused: { text: "Paused for you", cls: " is-hold" },
|
||||
on: { text: "On", cls: " is-accent" },
|
||||
paused: { text: "Paused for you", cls: " is-stage" },
|
||||
};
|
||||
|
||||
// The More menu stays open across the dashboard's redraws until it is closed.
|
||||
@@ -42,9 +43,9 @@ function shortDate(iso) {
|
||||
* same conditions that disable a dashboard card (dashCard()).
|
||||
*/
|
||||
export function learningBlocked() {
|
||||
if (page.gone) return "Plan2Code is not answering right now.";
|
||||
if (page.gone) return NOT_CONNECTED;
|
||||
if (page.pendingResult) return "Plan2Code is still picking up your last choice.";
|
||||
if (page.local && page.local.launching) return "A workflow is starting.";
|
||||
if (page.local && page.local.launching) return "A skill is starting.";
|
||||
if (loopDriving()) return "The Implementation Loop is running.";
|
||||
return "";
|
||||
}
|
||||
@@ -77,7 +78,7 @@ function pauseSwitch(paused) {
|
||||
b.setAttribute("role", "switch");
|
||||
b.setAttribute("aria-checked", paused ? "true" : "false");
|
||||
b.disabled = pausing || Boolean(page.gone);
|
||||
if (page.gone) b.title = "The console is not reachable right now.";
|
||||
if (page.gone) b.title = NOT_CONNECTED;
|
||||
const track = el("span", "learn-track");
|
||||
track.setAttribute("aria-hidden", "true");
|
||||
b.append(track, document.createTextNode("Pause for me"));
|
||||
@@ -107,7 +108,7 @@ function closeMore(focusButton) {
|
||||
|
||||
function moreMenu() {
|
||||
const wrap = document.createDocumentFragment();
|
||||
const btn = el("button", "learn-link learn-more-btn", "More ▴");
|
||||
const btn = el("button", "learn-link learn-more-btn", "More");
|
||||
btn.type = "button";
|
||||
btn.setAttribute("aria-haspopup", "menu");
|
||||
btn.setAttribute("aria-expanded", moreOpen ? "true" : "false");
|
||||
@@ -318,14 +319,15 @@ export function renderLessonsDialog(on) {
|
||||
dlg.setAttribute("aria-busy", saving ? "true" : "false");
|
||||
const card = hooks.renderCard(item);
|
||||
if (saving) card.inert = true;
|
||||
const x = el("button", "modal-x", "×");
|
||||
const x = el("button", "modal-x");
|
||||
x.appendChild(icon("close"));
|
||||
x.type = "button";
|
||||
x.setAttribute("aria-label", "Close without saving");
|
||||
x.disabled = saving;
|
||||
x.addEventListener("click", () => requestClose(item));
|
||||
const actions = el("div", "modal-actions");
|
||||
if (askingClose && !saving) {
|
||||
const ask = el("div", "lessons-unsaved");
|
||||
const ask = el("div", "callout is-warn lessons-unsaved");
|
||||
ask.setAttribute("role", "alert");
|
||||
ask.appendChild(el("p", "lessons-unsaved-text", "You have choices that are not saved."));
|
||||
const row = el("div", "modal-actions");
|
||||
@@ -391,7 +393,7 @@ function suggestionsBox(item) {
|
||||
const waiting = item.sentNote && item.sentNote.suggest === true && !thread.slice(asked + 1).some((m) => threadWho(m) === "agent");
|
||||
const reply = asked >= 0 ? thread.slice(asked + 1).filter((m) => threadWho(m) === "agent").pop() : null;
|
||||
if (!waiting && !reply) return null;
|
||||
const box = el("div", "lessons-suggestions");
|
||||
const box = el("div", "callout is-info lessons-suggestions");
|
||||
box.id = "lessons-suggestions";
|
||||
box.setAttribute("role", "status");
|
||||
box.appendChild(el("h3", null, "Suggestions"));
|
||||
@@ -494,7 +496,7 @@ async function openLessons() {
|
||||
|
||||
/**
|
||||
* The Learning row for `position` ("top" or "bottom"), or null: the top place
|
||||
* takes Not set up, Off and Paused, the bottom place takes On, and no row is
|
||||
* takes Off and Paused, the bottom place takes On and Not set up, and no row is
|
||||
* drawn when the scan carries no `learning` (an unknown settings format).
|
||||
*/
|
||||
export function renderLearningRow(scan, position) {
|
||||
@@ -511,7 +513,7 @@ export function renderLearningRow(scan, position) {
|
||||
const line = el("div", "learn-line");
|
||||
line.appendChild(el("span", "learn-label", "Learning"));
|
||||
const pill = PILLS[state];
|
||||
line.appendChild(el("span", "learn-pill" + pill.cls, pill.text));
|
||||
line.appendChild(el("span", "pill is-caps learn-pill" + pill.cls, pill.text));
|
||||
const controls = el("span", "learn-controls");
|
||||
const busy = busySwitch(state);
|
||||
if (busy) {
|
||||
@@ -524,10 +526,10 @@ export function renderLearningRow(scan, position) {
|
||||
controls.appendChild(working);
|
||||
} else if (state === "not-set-up") {
|
||||
line.appendChild(el("span", "learn-say", "Plan2Code can keep lessons about this codebase, approved by you."));
|
||||
controls.appendChild(agentButton("Switch on", "btn small primary", "switch-on"));
|
||||
controls.appendChild(agentButton("Switch on", "btn sm", "switch-on"));
|
||||
} else if (state === "off") {
|
||||
line.appendChild(el("span", "learn-say", "Off for this project."));
|
||||
controls.appendChild(agentButton("Switch on", "btn small", "switch-on"));
|
||||
controls.appendChild(agentButton("Switch on", "btn sm", "switch-on"));
|
||||
} else if (state === "paused") {
|
||||
const since = shortDate(learning.pausedSince);
|
||||
line.appendChild(
|
||||
|
||||
@@ -43,7 +43,7 @@ const fieldsetOf = (node) => node.closest("fieldset");
|
||||
// and Back to default are prefs-dialog.js's.
|
||||
export function wireLooks() {
|
||||
$("looks-modal").addEventListener("close", () => {
|
||||
if (isDashboard() && !needsRoleNudge(looks) && $("main").querySelector(".dash-nudge")) redraw();
|
||||
if (isDashboard() && !needsRoleNudge(looks) && $("main").querySelector(".dash-extras")) redraw();
|
||||
});
|
||||
for (const [value, label] of [[ROLE_NOT_SET, ROLE_NOT_SET_LABEL], ...ROLES.map((r) => [r.id, r.label])]) {
|
||||
const option = el("option", null, label);
|
||||
|
||||
@@ -12,6 +12,8 @@ import { SKILL_CATALOG } from "../answers.js";
|
||||
import { postJson } from "../net.js";
|
||||
import { tellApp, wireLoopMessages } from "../app-bridge.js";
|
||||
|
||||
let justPicked = ""; // the strength node picked a moment ago, which alone plays its grow
|
||||
|
||||
const LEVELS = [
|
||||
["critical", "Critical"],
|
||||
["warning", "Warning"],
|
||||
@@ -532,9 +534,11 @@ function strengthField(s, redo) {
|
||||
if (!input.checked) return;
|
||||
setPick(f, s.spec, p, c.value);
|
||||
s.problems = [];
|
||||
justPicked = input.id; // only this redraw plays the grow
|
||||
redraw();
|
||||
justPicked = "";
|
||||
});
|
||||
const node = el("span", "loop-strength-node");
|
||||
const node = el("span", "loop-strength-node" + (input.id === justPicked ? " is-picked" : ""));
|
||||
node.appendChild(strengthBars(c.level));
|
||||
cell.append(input, node);
|
||||
row.appendChild(cell);
|
||||
@@ -631,7 +635,7 @@ function drawBody(pane, s) {
|
||||
);
|
||||
const kindLabel = el("label", "loop-number");
|
||||
kindLabel.appendChild(el("span", null, "Send to"));
|
||||
const kindSelect = el("select", "loop-text");
|
||||
const kindSelect = el("select", "is-compact loop-text");
|
||||
kindSelect.id = "loop-notify-kind";
|
||||
for (const kind of NOTIFY_KINDS) {
|
||||
const option = el("option", null, kind.label);
|
||||
@@ -641,7 +645,7 @@ function drawBody(pane, s) {
|
||||
kindSelect.value = f.notifyKind;
|
||||
kindLabel.appendChild(kindSelect);
|
||||
const kindHint = el("p", "loop-hint");
|
||||
const notifyInput = el("input", "loop-text");
|
||||
const notifyInput = el("input", "is-compact loop-text");
|
||||
notifyInput.type = "text";
|
||||
notifyInput.inputMode = "url";
|
||||
notifyInput.id = "loop-notify-url";
|
||||
@@ -652,7 +656,7 @@ function drawBody(pane, s) {
|
||||
const paramLabel = el("label", "loop-number");
|
||||
const paramText = el("span");
|
||||
paramLabel.appendChild(paramText);
|
||||
const paramInput = el("input", "loop-text loop-param");
|
||||
const paramInput = el("input", "is-compact loop-text loop-param");
|
||||
paramInput.type = "text";
|
||||
paramInput.id = "loop-notify-param";
|
||||
paramInput.value = f.notifyParam;
|
||||
@@ -716,7 +720,7 @@ function drawBody(pane, s) {
|
||||
form.appendChild(notify);
|
||||
|
||||
const check = field("Quick check", "A command the app runs after each phase, such as npm run build. The page never runs it.");
|
||||
const checkInput = el("input", "loop-text");
|
||||
const checkInput = el("input", "is-compact loop-text");
|
||||
checkInput.type = "text";
|
||||
checkInput.id = "loop-quickcheck";
|
||||
checkInput.value = f.quickCheck;
|
||||
@@ -736,7 +740,7 @@ function drawBody(pane, s) {
|
||||
retry.appendChild(toggle("loop-retry", "Retry it once", f.retryOnce, (v) => ((f.retryOnce = v), redo())));
|
||||
const silence = el("label", "loop-number");
|
||||
silence.appendChild(el("span", null, "Count the agent as stuck after this many minutes with no activity"));
|
||||
const silenceInput = el("input", "loop-text loop-narrow");
|
||||
const silenceInput = el("input", "is-compact loop-text loop-narrow");
|
||||
silenceInput.type = "number";
|
||||
silenceInput.id = "loop-silence";
|
||||
silenceInput.min = "1";
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
// this file runs the timers and requests, and binds every save and every
|
||||
// picture to the tab it was made in, so a switch can never move either.
|
||||
|
||||
import { NOT_CONNECTED } from "../labels.js";
|
||||
import { page } from "../state.js";
|
||||
import {
|
||||
EDITOR_NOT_LOADED,
|
||||
@@ -31,7 +32,7 @@ import {
|
||||
tabSwitch,
|
||||
unsaved,
|
||||
} from "../notepad.js";
|
||||
import { el, lightDismiss } from "../render.js";
|
||||
import { el, icon, lightDismiss } from "../render.js";
|
||||
import { postJson } from "../net.js";
|
||||
import { reencode, openPicview } from "../uploads.js";
|
||||
import { createTabs } from "../notepad-tabs.js";
|
||||
@@ -39,7 +40,6 @@ import { skillFor } from "../skills.js";
|
||||
|
||||
const $ = (id) => document.getElementById(id);
|
||||
|
||||
const NOT_CONNECTED = "Not connected right now.";
|
||||
const STAY = "Not saved yet, so staying on this tab.";
|
||||
|
||||
// One editor for the page's life, made on first open, and the tab bar, made
|
||||
@@ -295,6 +295,8 @@ function show(body, keep = false) {
|
||||
problem = "";
|
||||
rev += 1;
|
||||
loaded = true;
|
||||
$("notepad-retry").hidden = true;
|
||||
$("notepad-retry").disabled = false;
|
||||
editor.setReadOnly(!tab);
|
||||
takeStored(tab ? tab.images : [], activeId);
|
||||
drawTabs();
|
||||
@@ -658,9 +660,9 @@ function thumbItem(entry, n) {
|
||||
if (src) {
|
||||
const pic = el("img");
|
||||
pic.src = src;
|
||||
pic.alt = `Notebook image ${n}`;
|
||||
pic.alt = `Notebook picture ${n}`;
|
||||
open.appendChild(pic);
|
||||
} else open.setAttribute("aria-label", `Notebook image ${n}`);
|
||||
} else open.setAttribute("aria-label", `Notebook picture ${n}`);
|
||||
// Never `disabled`, which would push the focus out of the strip while the
|
||||
// picture uploads: it only does nothing until there is a picture to show.
|
||||
const viewable = Boolean(entry.url) && entry.status !== "uploading";
|
||||
@@ -670,25 +672,26 @@ function thumbItem(entry, n) {
|
||||
});
|
||||
item.appendChild(open);
|
||||
if (entry.status !== "uploading" && !entry.asking) {
|
||||
const x = el("button", "attach-remove notepad-thumb-delete", "×");
|
||||
const x = el("button", "attach-remove notepad-thumb-delete");
|
||||
x.appendChild(icon("close"));
|
||||
x.type = "button";
|
||||
x.setAttribute("aria-label", `Delete image ${n}`);
|
||||
x.setAttribute("aria-label", `Delete picture ${n}`);
|
||||
x.addEventListener("click", () => ask(entry));
|
||||
item.appendChild(x);
|
||||
}
|
||||
if (entry.asking) {
|
||||
// Keep comes first and takes the focus, so Enter keeps the picture.
|
||||
const over = el("div", "attach-overlay notepad-ask");
|
||||
over.appendChild(el("p", null, "Delete this image?"));
|
||||
over.appendChild(el("p", null, "Delete this picture?"));
|
||||
const row = el("div", "notepad-ask-row");
|
||||
const keep = el("button", "btn tiny notepad-ask-keep", "Keep");
|
||||
const keep = el("button", "btn xs soft notepad-ask-keep", "Keep");
|
||||
keep.type = "button";
|
||||
keep.addEventListener("click", () => {
|
||||
entry.asking = false;
|
||||
drawStrip();
|
||||
focusIn(entry.key, ".notepad-thumb-delete");
|
||||
});
|
||||
const del = el("button", "btn tiny notepad-ask-delete", "Delete");
|
||||
const del = el("button", "btn xs soft notepad-ask-delete", "Delete");
|
||||
del.type = "button";
|
||||
del.addEventListener("click", () => remove(entry));
|
||||
keep.disabled = del.disabled = Boolean(entry.deleting);
|
||||
@@ -703,7 +706,7 @@ function thumbItem(entry, n) {
|
||||
} else if (entry.status === "failed") {
|
||||
const over = el("div", "attach-overlay failed");
|
||||
over.appendChild(el("p", null, "Upload failed"));
|
||||
const again = el("button", "btn tiny notepad-retry", "Retry");
|
||||
const again = el("button", "btn xs soft notepad-retry", "Retry");
|
||||
again.type = "button";
|
||||
again.addEventListener("click", () => upload(entry));
|
||||
over.appendChild(again);
|
||||
@@ -796,7 +799,7 @@ function takeStored(list, tabId) {
|
||||
function openPreview(entry) {
|
||||
const list = images.filter((img) => img.url);
|
||||
openPicview(
|
||||
list.map((img) => ({ url: img.url, alt: `Notebook image ${images.indexOf(img) + 1}` })),
|
||||
list.map((img) => ({ url: img.url, alt: `Notebook picture ${images.indexOf(img) + 1}` })),
|
||||
list.indexOf(entry),
|
||||
() => focusIn(entry.key, ".attach-open"),
|
||||
);
|
||||
@@ -869,16 +872,28 @@ function wireImages(dlg) {
|
||||
// show up. Text typed here and not yet saved (or too long to save) is never
|
||||
// replaced; the tab it belongs to stays on screen.
|
||||
async function load() {
|
||||
// Kept on screen (and focused, if it was) while it reads, so a second failure
|
||||
// finds it where it was.
|
||||
$("notepad-retry").disabled = true;
|
||||
const keep = keepsText(save);
|
||||
let res = await readNote(activeId);
|
||||
if (!res.ok && res.code === "no-such-tab" && activeId && !keep) res = await readNote(null);
|
||||
if (!res.ok) {
|
||||
if (loaded) return;
|
||||
if (loaded) {
|
||||
$("notepad-retry").hidden = true;
|
||||
$("notepad-retry").disabled = false;
|
||||
return;
|
||||
}
|
||||
const line = $("notepad-status");
|
||||
line.textContent = NOT_LOADED;
|
||||
line.classList.add("is-problem");
|
||||
$("notepad-retry").hidden = false;
|
||||
$("notepad-retry").disabled = false;
|
||||
$("notepad-retry").focus();
|
||||
return;
|
||||
}
|
||||
$("notepad-retry").hidden = true;
|
||||
$("notepad-retry").disabled = false;
|
||||
show(res.body, keep);
|
||||
paintStatus();
|
||||
if (!tabs.length) $("notepad-empty-new").focus();
|
||||
@@ -930,6 +945,7 @@ export function wireNotepad() {
|
||||
wireImages(dlg);
|
||||
$("btn-notepad").addEventListener("click", openNotepad);
|
||||
$("notepad-close").addEventListener("click", () => dlg.close());
|
||||
$("notepad-retry").addEventListener("click", () => load());
|
||||
$("notepad-tab-new").addEventListener("click", () => openNameForm("new"));
|
||||
$("notepad-empty-new").addEventListener("click", () => openNameForm("new"));
|
||||
$("notepad-delete-keep").addEventListener("click", () => closeDelete(true));
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
// to open and close it, the Saved mark, Back to default for the tab on screen
|
||||
// and the prompt that stops an unsaved agent edit being lost.
|
||||
|
||||
import { onSwatchSaved, renderSwatches, resetLooks, saveLooks } from "../looks.js";
|
||||
import { looks, onSwatchSaved, renderSwatches, resetLooks, saveLooks } from "../looks.js";
|
||||
import { ROLE_NOT_SET } from "../starters.js";
|
||||
import { PREFS_TABS, prefsOpenTab, prefsResetScope } from "../prefs.js";
|
||||
import { wireTabs } from "../tabs.js";
|
||||
import { el, lightDismiss } from "../render.js";
|
||||
@@ -12,7 +13,7 @@ const $ = (id) => document.getElementById(id);
|
||||
|
||||
let prefsTabs = null;
|
||||
|
||||
// Back to default only where the tab has looks to reset.
|
||||
// Reset this tab only where the tab has looks to reset.
|
||||
function showResetFor(id) {
|
||||
$("looks-reset").hidden = prefsResetScope(id) === null;
|
||||
}
|
||||
@@ -55,6 +56,36 @@ export async function markSaved(fieldset, result) {
|
||||
}
|
||||
}
|
||||
|
||||
// "Reset. Undo" in the mark's place after Reset this tab: the same corner as
|
||||
// Saved, for a few seconds, with a button that puts the tab's values back.
|
||||
const RESET_UNDO_MS = 8000;
|
||||
|
||||
function markReset(fieldset, undo) {
|
||||
if (!fieldset) return;
|
||||
let mark = fieldset.querySelector(":scope > .prefs-saved");
|
||||
if (!mark) {
|
||||
mark = el("span", "prefs-saved");
|
||||
mark.setAttribute("role", "status");
|
||||
fieldset.appendChild(mark);
|
||||
}
|
||||
clearTimeout(markTimers.get(mark));
|
||||
mark.classList.remove("is-saved", "error");
|
||||
mark.classList.add("is-reset");
|
||||
const button = el("button", "linky prefs-undo", "Undo");
|
||||
button.type = "button";
|
||||
const end = () => {
|
||||
clearTimeout(markTimers.get(mark));
|
||||
mark.classList.remove("is-reset");
|
||||
mark.textContent = "";
|
||||
};
|
||||
button.addEventListener("click", () => {
|
||||
end();
|
||||
undo();
|
||||
});
|
||||
mark.replaceChildren(document.createTextNode("Reset. "), button);
|
||||
markTimers.set(mark, setTimeout(end, RESET_UNDO_MS));
|
||||
}
|
||||
|
||||
// Every way in: the gear, the dashboard's Set up preferences, or a caller
|
||||
// naming the tab it wants. Agents and models load each time it opens.
|
||||
export function openPrefs(tab) {
|
||||
@@ -70,7 +101,7 @@ export function openPrefs(tab) {
|
||||
let asking = null;
|
||||
|
||||
// Everything in the dialog but the prompt, kept out of reach while it asks.
|
||||
const behindPrompt = () => [$("looks-title"), $("looks-modal").querySelector(".prefs-body"), $("looks-modal").querySelector(".modal-actions")];
|
||||
const behindPrompt = () => [$("looks-title"), $("prefs-lead"), $("looks-modal").querySelector(".prefs-body"), $("looks-modal").querySelector(".modal-actions")];
|
||||
|
||||
function endAsking(go) {
|
||||
$("prefs-unsaved").hidden = true;
|
||||
@@ -85,8 +116,9 @@ function endAsking(go) {
|
||||
}
|
||||
|
||||
// Before anything leaves an agent form with an unsaved edit (Close, Esc, a
|
||||
// backdrop click, another tab, another agent's row): Save, Discard or Keep
|
||||
// editing, asked inside the dialog. Resolves true when it may go on.
|
||||
// backdrop click, another tab, another agent's row): Keep editing, Discard or
|
||||
// Save, asked inside the dialog, in the Lessons prompt's order (learning-row.js)
|
||||
// and with focus on the safe choice. Resolves true when it may go on.
|
||||
export function confirmUnsaved() {
|
||||
if (!hooks.hasUnsaved()) return Promise.resolve(true);
|
||||
if (asking) return asking.promise;
|
||||
@@ -97,7 +129,7 @@ export function confirmUnsaved() {
|
||||
for (const node of behindPrompt()) node.inert = true;
|
||||
$("prefs-unsaved").hidden = false;
|
||||
$("prefs-unsaved-save").disabled = false;
|
||||
$("prefs-unsaved-save").focus();
|
||||
$("prefs-unsaved-keep").focus();
|
||||
return promise;
|
||||
}
|
||||
|
||||
@@ -124,13 +156,14 @@ function wireUnsaved() {
|
||||
const name = el("strong");
|
||||
name.id = "prefs-unsaved-name";
|
||||
text.append("You have unsaved changes to ", name, ".");
|
||||
const save = el("button", "btn small primary", "Save");
|
||||
const save = el("button", "btn sm primary", "Save");
|
||||
save.type = "button";
|
||||
save.id = "prefs-unsaved-save";
|
||||
const discard = el("button", "btn small ghost", "Discard");
|
||||
const discard = el("button", "btn sm ghost", "Discard");
|
||||
discard.type = "button";
|
||||
const keep = el("button", "btn small ghost", "Keep editing");
|
||||
const keep = el("button", "btn sm ghost", "Keep editing");
|
||||
keep.type = "button";
|
||||
keep.id = "prefs-unsaved-keep";
|
||||
save.addEventListener("click", async () => {
|
||||
save.disabled = true;
|
||||
const ok = await hooks.saveOpen();
|
||||
@@ -143,7 +176,7 @@ function wireUnsaved() {
|
||||
});
|
||||
keep.addEventListener("click", () => endAsking(false));
|
||||
const actions = el("div", "prefs-unsaved-actions");
|
||||
actions.append(save, discard, keep);
|
||||
actions.append(keep, discard, save);
|
||||
inner.append(title, text, actions);
|
||||
box.append(inner);
|
||||
$("looks-modal").append(box);
|
||||
@@ -197,10 +230,18 @@ export function wirePrefs() {
|
||||
const tab = prefsTabs.current();
|
||||
const keys = prefsResetScope(tab);
|
||||
if (!keys) return;
|
||||
// What the tab held before, so Undo can put it back. A role never chosen
|
||||
// comes back as Not set: the server's file cannot un-have a key.
|
||||
const before = Object.fromEntries(keys.map((k) => [k, k === "role" ? (looks.role ?? ROLE_NOT_SET) : looks[k]]));
|
||||
resetLooks(keys);
|
||||
const saved = saveLooks();
|
||||
saveLooks();
|
||||
redraw();
|
||||
markSaved($("prefs-panel-" + tab).querySelector("fieldset"), saved);
|
||||
markReset($("prefs-panel-" + tab).querySelector("fieldset"), () => {
|
||||
for (const [k, v] of Object.entries(before)) looks[k] = v;
|
||||
const saved = saveLooks();
|
||||
redraw();
|
||||
markSaved($("prefs-panel-" + tab).querySelector("fieldset"), saved);
|
||||
});
|
||||
});
|
||||
onSwatchSaved((saved) => markSaved($("looks-swatches").closest("fieldset"), saved));
|
||||
}
|
||||
@@ -110,7 +110,7 @@ function buildRoot(mountAgents) {
|
||||
const agents = el("div", "setup-agents");
|
||||
box.appendChild(agents);
|
||||
const actions = el("div", "setup-actions");
|
||||
const again = el("button", "btn small", "Check again");
|
||||
const again = el("button", "btn sm", "Check again");
|
||||
again.type = "button";
|
||||
again.addEventListener("click", () => view?.load());
|
||||
actions.appendChild(again);
|
||||
@@ -149,7 +149,7 @@ function startingPane(started) {
|
||||
pane.appendChild(noPage);
|
||||
// A wait that died unmoved should not park the page on "Starting" forever:
|
||||
// once the grace hint is up, the way back to the pick list shows beside it.
|
||||
const back = el("button", "btn small setup-back", "Show the agent list again");
|
||||
const back = el("button", "btn sm setup-back", "Show the agent list again");
|
||||
back.type = "button";
|
||||
back.hidden = !graceShown;
|
||||
back.addEventListener("click", () => {
|
||||
|
||||
@@ -123,7 +123,7 @@ export function renderLaunching(main) {
|
||||
|
||||
const stale = staleLaunchFeedback(l.title, agentAdrift(), page.inApp);
|
||||
pane.appendChild(el("p", "card-kicker", stale ? stale.kicker : "On it"));
|
||||
pane.appendChild(el("h2", "launch-title", stale ? stale.title : `Waking up ${l.title || "the next mode"}`));
|
||||
pane.appendChild(el("h2", "launch-title", stale ? stale.title : `Waking up ${l.title || "the next skill"}`));
|
||||
pane.appendChild(el("p", "launch-quip", stale ? stale.quip : LAUNCH_QUIPS[0]));
|
||||
pane.appendChild(
|
||||
el(
|
||||
@@ -225,7 +225,7 @@ function startLaunchTicker() {
|
||||
const reconnect = document.querySelector(".launch-reconnect");
|
||||
if (reconnect) reconnect.hidden = !stale;
|
||||
if (kicker) kicker.textContent = stale ? stale.kicker : "On it";
|
||||
if (title) title.textContent = stale ? stale.title : `Waking up ${cur.title || "the next mode"}`;
|
||||
if (title) title.textContent = stale ? stale.title : `Waking up ${cur.title || "the next skill"}`;
|
||||
q.textContent = stale ? stale.quip : LAUNCH_QUIPS[Math.floor(elapsed / 2600) % LAUNCH_QUIPS.length];
|
||||
if (hint) {
|
||||
hint.textContent = stale
|
||||
|
||||
@@ -31,19 +31,19 @@ export function tellFolderIssues() {
|
||||
extras.push(document.createTextNode(" "));
|
||||
extras.push(el("code", "banner-hint", fresh.hint));
|
||||
}
|
||||
const open = el("button", "btn tiny banner-action", "Open workspace");
|
||||
const open = el("button", "btn xs soft banner-action", "Open workspace");
|
||||
open.type = "button";
|
||||
open.addEventListener("click", () => {
|
||||
hooks.banner(null);
|
||||
openWorkspace();
|
||||
});
|
||||
extras.push(open);
|
||||
hooks.banner(`The agent can't read @${fresh.name}: ${fresh.reason}`, "warn", extras);
|
||||
const issue = hooks.banner(`The agent cannot read @${fresh.name}: ${fresh.reason}`, "warn", extras);
|
||||
clearTimeout(issueBannerTimer);
|
||||
// Then the next folder waiting to be told, if several came at once.
|
||||
issueBannerTimer = setTimeout(() => {
|
||||
if (page.gone) return;
|
||||
hooks.banner(null);
|
||||
hooks.clearBanner(issue);
|
||||
tellFolderIssues();
|
||||
}, 15000);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ function workspaceScopeText() {
|
||||
|
||||
const NAME_RULE = "Names use lowercase letters, numbers and hyphens.";
|
||||
|
||||
const BROWSE_UNAVAILABLE = "Browse isn't available here — type or paste the path.";
|
||||
const BROWSE_UNAVAILABLE = "Browse is not available here: type or paste the path.";
|
||||
|
||||
// The folder whose Remove is waiting on its inline confirm, by id.
|
||||
let wsConfirm = null;
|
||||
@@ -127,14 +127,14 @@ function workspaceRow(f) {
|
||||
li.dataset.fid = f.id;
|
||||
|
||||
const head = el("div", "ws-head");
|
||||
head.appendChild(el("span", "ws-chip"));
|
||||
if (f.original) head.appendChild(el("span", "ws-original", "started here — can't be removed"));
|
||||
head.appendChild(el("span", "pill is-accent ws-chip"));
|
||||
if (f.original) head.appendChild(el("span", "ws-original", "started here, cannot be removed"));
|
||||
li.appendChild(head);
|
||||
|
||||
const pathRow = el("div", "ws-path-row");
|
||||
const code = el("code", "ws-path");
|
||||
pathRow.appendChild(code);
|
||||
const copy = el("button", "btn small", "Copy path");
|
||||
const copy = el("button", "btn sm", "Copy path");
|
||||
copy.type = "button";
|
||||
copy.addEventListener("click", async () => {
|
||||
const folder = workspaceFolders().find((x) => x.id === f.id);
|
||||
@@ -151,7 +151,7 @@ function workspaceRow(f) {
|
||||
});
|
||||
pathRow.appendChild(copy);
|
||||
if (!f.original) {
|
||||
const remove = el("button", "btn small danger ws-remove", "Remove");
|
||||
const remove = el("button", "btn sm danger ws-remove", "Remove");
|
||||
remove.type = "button";
|
||||
remove.addEventListener("click", () => {
|
||||
wsConfirm = f.id;
|
||||
@@ -175,7 +175,7 @@ function workspaceField(f, field, labelText) {
|
||||
const id = `ws-${field}-${f.id}`;
|
||||
const label = el("label", null, labelText);
|
||||
label.htmlFor = id;
|
||||
const input = el("input");
|
||||
const input = el("input", "is-compact");
|
||||
input.type = "text";
|
||||
input.id = id;
|
||||
input.dataset.field = field;
|
||||
@@ -209,7 +209,7 @@ function workspaceField(f, field, labelText) {
|
||||
setAddMsg("");
|
||||
return showError("");
|
||||
}
|
||||
if (body.reason === "name-taken") showError(`@${value} is taken — try @${body.suggest}.`);
|
||||
if (body.reason === "name-taken") showError(`@${value} is taken, try @${body.suggest}.`);
|
||||
else if (body.reason === "bad-name") showError(NAME_RULE);
|
||||
else showError("That did not save. Try again.");
|
||||
if (leaving) input.value = saved();
|
||||
@@ -241,11 +241,11 @@ function paintWorkspaceRow(li, f) {
|
||||
marks.replaceChildren();
|
||||
if (missing) marks.appendChild(el("p", "ws-mark is-missing", "This folder no longer exists"));
|
||||
if (issue) {
|
||||
marks.appendChild(el("p", "ws-mark is-issue", "The agent can't read this yet: " + issue.reason));
|
||||
marks.appendChild(el("p", "ws-mark is-issue", "The agent cannot read this yet: " + issue.reason));
|
||||
if (issue.hint) {
|
||||
const row = el("div", "ws-hint-row");
|
||||
const code = el("code", "ws-hint", issue.hint);
|
||||
row.append(code, copyButton(issue.hint, "btn tiny", code));
|
||||
row.append(code, copyButton(issue.hint, "btn xs soft", code));
|
||||
marks.appendChild(row);
|
||||
}
|
||||
}
|
||||
@@ -260,14 +260,14 @@ function paintWorkspaceRow(li, f) {
|
||||
const box = el("div", "ws-confirm");
|
||||
box.setAttribute("role", "alert");
|
||||
box.appendChild(el("span", null, `Remove @${f.name}? The agent is told.`));
|
||||
const keep = el("button", "btn small ghost", "Keep it");
|
||||
const keep = el("button", "btn sm ghost", "Keep it");
|
||||
keep.type = "button";
|
||||
keep.addEventListener("click", () => {
|
||||
wsConfirm = null;
|
||||
renderWorkspace();
|
||||
li.querySelector(".ws-remove")?.focus();
|
||||
});
|
||||
const go = el("button", "btn small danger", "Remove");
|
||||
const go = el("button", "btn sm danger", "Remove");
|
||||
go.type = "button";
|
||||
go.addEventListener("click", async () => {
|
||||
go.disabled = true;
|
||||
@@ -305,15 +305,15 @@ async function addWorkspaceFolder(path, name) {
|
||||
}
|
||||
switch (body.reason) {
|
||||
case "not-a-folder":
|
||||
return setAddMsg("That isn't a folder on this machine.", "error");
|
||||
return setAddMsg("That is not a folder on this machine.", "error");
|
||||
case "duplicate":
|
||||
return setAddMsg(`Already in the workspace as @${body.name}.`, "error");
|
||||
case "name-taken": {
|
||||
const taken = name || String(body.suggest || "").replace(/-\d+$/, "");
|
||||
const use = el("button", "btn tiny", `Use @${body.suggest}`);
|
||||
const use = el("button", "btn xs soft", `Use @${body.suggest}`);
|
||||
use.type = "button";
|
||||
use.addEventListener("click", () => addWorkspaceFolder(trimmed, body.suggest));
|
||||
return setAddMsg(`@${taken} is taken — try @${body.suggest}.`, "error", use);
|
||||
return setAddMsg(`@${taken} is taken, try @${body.suggest}.`, "error", use);
|
||||
}
|
||||
case "bad-name":
|
||||
return setAddMsg(NAME_RULE, "error");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Plan2Code Web Console - whether Send is available, and what its button says; defines only.
|
||||
|
||||
import { NOT_CONNECTED } from "./labels.js";
|
||||
import {
|
||||
finish,
|
||||
stranded,
|
||||
@@ -22,13 +23,24 @@ import { pendingNotes } from "./uploads.js";
|
||||
// the main Send would carry. The suggestion chip passes `true`: its request is
|
||||
// the payload.
|
||||
export function sendState(hasPayload = stagedCount() || pendingNotes().length > 0) {
|
||||
const state = sendStateFor(hasPayload);
|
||||
// A view with nothing to send, ever: a finished session, or the git board
|
||||
// with no card open and nothing staged. The button goes (`hide`), and the
|
||||
// footer keeps its status words, so the bar says why rather than showing a
|
||||
// dead button.
|
||||
const finished = Boolean(finish());
|
||||
const idleGit = page.S && page.S.workflow === "git" && !hasPayload && openItems().length === 0;
|
||||
return finished || idleGit ? { ...state, hide: true } : state;
|
||||
}
|
||||
|
||||
function sendStateFor(hasPayload) {
|
||||
// Before `gone`, and before the grace period that can re-enable a send. A
|
||||
// finished session has nobody left to send to, whatever the socket says.
|
||||
if (finish())
|
||||
return finishPaused(finish())
|
||||
? { disabled: true, why: "This session is paused.", short: "Session paused" }
|
||||
? { disabled: true, why: "This session is stopped.", short: "Session stopped" }
|
||||
: { disabled: true, why: "This session is finished.", short: "Session finished" };
|
||||
if (page.gone) return { disabled: true, why: "Not connected right now.", short: "Not connected" };
|
||||
if (page.gone) return { disabled: true, why: NOT_CONNECTED, short: "Not connected" };
|
||||
// The Implementation Loop answers for the agent: nothing to send until it
|
||||
// stops to ask the person something (FR-15, FR-14).
|
||||
if (loopDriving() && !loopWaiting()) {
|
||||
|
||||
@@ -40,6 +40,9 @@ export function fresh() {
|
||||
drafts: {},
|
||||
images: {},
|
||||
sent: {},
|
||||
// Multi cards whose starting ticks were already staged (answers.js seedStaged),
|
||||
// keyed by item id: a card the person cleared is never ticked again.
|
||||
seeded: {},
|
||||
stopping: null,
|
||||
afterBuild: null,
|
||||
// The finish `afterBuild` was pressed on (finishKey), so a different one is a new offer.
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
your-turn banner and the notes. The game draws its own board on the canvas. */
|
||||
|
||||
/* The top bar's die, drawn and lit like the megaphone and the gear beside it. */
|
||||
.icon-btn .dc-body { fill: none; stroke: var(--ink-3); stroke-width: 1.4; }
|
||||
.icon-btn .dc-pip { fill: var(--ink-2); stroke: none; }
|
||||
.icon-btn:hover .dc-body { stroke: var(--accent); }
|
||||
.icon-btn:hover .dc-pip { fill: var(--accent); }
|
||||
/* Show Activities off in User Preferences: .icon-btn's grid would beat the
|
||||
attribute's own display. */
|
||||
#btn-activities[hidden] { display: none; }
|
||||
@@ -280,7 +276,7 @@
|
||||
}
|
||||
.activities-order-pill:hover { border-color: var(--accent-line); color: var(--ink); }
|
||||
.activities-order-pill[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
|
||||
.activities-order-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.activities-order-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.activities-count { margin-left: auto; color: var(--ink-3); font-size: 0.9em; font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.activities-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
|
||||
@container (min-width: 640px) {
|
||||
@@ -303,7 +299,7 @@
|
||||
}
|
||||
.activities-row:hover,
|
||||
.activities-row:focus-visible { border-color: var(--accent-line); background: var(--panel-2); }
|
||||
.activities-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.activities-row:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.activities-row .activities-cover { border: 1px solid var(--rule-2); border-radius: 6px; overflow: hidden; }
|
||||
.activities-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
||||
.activities-row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* agents.css: the Agents & models view - a master-detail split shared by User
|
||||
Preferences' tab and the agent-less setup page. The list is pinned left;
|
||||
the right pane holds the picked agent's form (prefs), the picked entry's
|
||||
state and way forward (setup), or the empty text. Every rule that used to
|
||||
be spread over prefs.css and responsive.css lives here. */
|
||||
/* agents.css: the Agents & models view, a master-detail split shared by
|
||||
Preferences' tab and the agent-less setup page. List left; the pane holds
|
||||
the agent's form (prefs), the entry's state (setup), or the empty text. */
|
||||
|
||||
/* ------------------------------------------------------------- the mount */
|
||||
|
||||
@@ -10,7 +8,7 @@
|
||||
.prefs-agents > .help { margin: 0; }
|
||||
.prefs-agents [hidden], .setup-agents [hidden] { display: none; }
|
||||
[data-av="status"]:empty { display: none; }
|
||||
[data-av="status"].error { color: var(--danger, #d64545); }
|
||||
[data-av="status"].error { color: var(--warn); }
|
||||
|
||||
/* ----------------------------------------------------------- the split */
|
||||
|
||||
@@ -29,7 +27,7 @@
|
||||
min-width: 0;
|
||||
background: var(--panel-2);
|
||||
}
|
||||
.split-list-head { padding: 8px 12px 2px; color: var(--ink-3); font-size: 13px; }
|
||||
.split-list-head { padding: 8px 12px 2px; color: var(--ink-3); font-size: var(--fs-sm); }
|
||||
.split-row {
|
||||
appearance: none;
|
||||
font: inherit;
|
||||
@@ -45,11 +43,11 @@
|
||||
}
|
||||
.split-row:hover { background: var(--accent-soft); }
|
||||
.split-row[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
|
||||
.split-row .row-name { font-weight: 600; font-size: 13.5px; }
|
||||
.split-row .row-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
|
||||
.split-row .row-name { font-weight: 600; font-size: var(--fs-md); }
|
||||
.split-row .row-sub { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); flex-wrap: wrap; }
|
||||
.split-row .row-sub code { color: var(--ink-3); }
|
||||
.split-row .row-models { color: var(--ink-2); overflow-wrap: anywhere; }
|
||||
.split-row .row-note { display: block; margin-top: 2px; font-size: 12px; }
|
||||
.split-row .row-note { display: block; margin-top: 2px; font-size: var(--fs-xs); }
|
||||
.split-row.soon { color: var(--ink-3); font-style: italic; cursor: default; }
|
||||
.split-add { margin: 8px; align-self: flex-start; }
|
||||
|
||||
@@ -60,70 +58,54 @@
|
||||
align-content: start;
|
||||
min-width: 0;
|
||||
}
|
||||
.split-empty { color: var(--ink-3); display: grid; place-items: center; min-height: 240px; text-align: center; }
|
||||
|
||||
/* ------------------------------------------------------------- badges */
|
||||
|
||||
.prefs-badge, .prefs-unsaved-badge {
|
||||
display: inline-block;
|
||||
font-size: 11.5px;
|
||||
line-height: 1.5;
|
||||
padding: 0 7px;
|
||||
border-radius: 10px;
|
||||
background: var(--panel-2);
|
||||
color: var(--ink-3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.split-row .prefs-badge { background: var(--panel); }
|
||||
.prefs-badge.ok { color: var(--ok); }
|
||||
.prefs-badge.missing { color: var(--warn); }
|
||||
.prefs-unsaved-badge { background: none; border: 1px solid var(--warn); color: var(--warn); }
|
||||
|
||||
/* -------------------------------------------------------------- the form */
|
||||
|
||||
.form-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
|
||||
.prefs-agents-title { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 15px; }
|
||||
.prefs-agents-title code { font-size: 12px; color: var(--ink-3); }
|
||||
.prefs-agents-title { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: var(--fs-base); }
|
||||
.prefs-agents-title code { font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
.prefs-agents-title:focus { outline: none; }
|
||||
|
||||
.prefs-agents-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
|
||||
.prefs-agents-fields input { min-width: 0; }
|
||||
.prefs-agents-fields input.invalid, .split-pane input.invalid { border-color: var(--danger, #d64545); }
|
||||
.prefs-agents-fields input.invalid, .split-pane input.invalid { border-color: var(--warn); }
|
||||
|
||||
.agent-field { display: grid; gap: 4px; min-width: 0; }
|
||||
.agent-field > span, .agent-field > label { font-size: 0.85em; opacity: 0.85; }
|
||||
.agent-field > span, .agent-field > label { font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.agent-rows { display: grid; gap: 4px; }
|
||||
.agent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
|
||||
.agent-row.model { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
|
||||
.agent-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.agent-foot .help { margin: 0; }
|
||||
.prefs-agents-test .agent-test-result { flex: 1 1 auto; }
|
||||
.agent-error { margin: 0; color: var(--danger, #d64545); font-size: 0.9em; }
|
||||
.agent-error { margin: 0; color: var(--warn); font-size: var(--fs-sm); }
|
||||
|
||||
.prefs-agents-test { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.prefs-agents-test .help { margin: 0; }
|
||||
.prefs-agents-none { margin: 0; }
|
||||
|
||||
/* A folded section (Models, Command-line arguments): the picked design keeps
|
||||
both behind a summary line until opened. */
|
||||
/* Folded sections (Models, Command-line arguments). */
|
||||
.agent-fold { display: grid; gap: 8px; }
|
||||
.agent-fold > summary { cursor: pointer; color: var(--accent); font-size: 13px; }
|
||||
.agent-fold > summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); }
|
||||
.agent-fold[open] > summary { margin-bottom: 4px; }
|
||||
.agent-fold > .agent-field + .agent-field, .agent-fold > .models-note + .agent-field { margin-top: 8px; }
|
||||
.prefs-agents-args > .agent-field + .agent-field { margin-top: 8px; }
|
||||
|
||||
/* The Saved mark sits in the form's foot, in the flow, after the buttons. */
|
||||
/* The Saved mark flows in the foot after the buttons. */
|
||||
.prefs-agents-foot > .prefs-saved { position: static; max-width: none; text-align: left; }
|
||||
|
||||
/* ------------------------------------------------------------- models lists */
|
||||
|
||||
.models-note { font-size: 0.9em; opacity: 0.85; }
|
||||
.models-note { font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.models-note p, .models-note ul { margin: 0 0 6px; }
|
||||
.models-note ul { padding-left: 18px; }
|
||||
.models-list { display: grid; gap: 4px; max-height: 160px; overflow: auto; }
|
||||
.models-list:empty { display: none; }
|
||||
.models-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
|
||||
.models-row.locked { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-size: 0.88em; opacity: 0.75; }
|
||||
.models-row.locked { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.models-row input { min-width: 0; }
|
||||
|
||||
/* --------------------------------------------------------- the setup pane */
|
||||
@@ -133,7 +115,7 @@
|
||||
.setup-agent-line {
|
||||
margin: 0;
|
||||
color: var(--ink-2);
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
.setup-install {
|
||||
display: flex;
|
||||
@@ -144,9 +126,9 @@
|
||||
}
|
||||
.setup-install code {
|
||||
background: var(--panel-2);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 2px 7px;
|
||||
font-size: 12px;
|
||||
font-size: var(--fs-xs);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- narrow screens */
|
||||
@@ -162,16 +144,15 @@
|
||||
.strength-row { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 6px; align-items: center; }
|
||||
.strength-row:has(select + select) { grid-template-columns: 5.5em minmax(0, 1fr) minmax(0, 8em) auto; }
|
||||
.strength-row select { min-width: 0; }
|
||||
.strength-word { font-size: 0.9em; }
|
||||
.strength-default { margin: 0; font-size: 0.8em; color: var(--ink-3); }
|
||||
.strength-word { font-size: var(--fs-sm); }
|
||||
.strength-default { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
.strength-empty, .strength-offer { margin: 0; }
|
||||
|
||||
/* ------------------------------------------------- Preferences: the roster */
|
||||
|
||||
/* The Agents & models tab in User Preferences: a roster of cards, the picked
|
||||
agent's form in a drawer over it, and the Add agent chooser over both. The
|
||||
drawer and chooser sit in the tab's own box (absolute) and stick to the top
|
||||
of the dialog's scroll, so they stay in view on a long roster. */
|
||||
/* Roster of cards, the agent's form in a drawer over it, the Add agent
|
||||
chooser over both. Drawer and chooser are absolute in the tab and stick to
|
||||
the dialog's scroll top, staying in view on a long roster. */
|
||||
.prefs-agents { position: relative; min-height: 520px; align-content: start; }
|
||||
.roster-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
|
||||
.roster-head > .help { max-width: 62ch; }
|
||||
@@ -192,16 +173,16 @@
|
||||
align-content: start;
|
||||
min-width: 0;
|
||||
}
|
||||
.agent-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
|
||||
.agent-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-2); }
|
||||
.agent-card[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
|
||||
.agent-card .card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
|
||||
.agent-card .card-who { display: grid; gap: 2px; min-width: 0; }
|
||||
.agent-card .row-name { font-weight: 700; font-size: 14.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
|
||||
.agent-card .card-who code { color: var(--ink-3); font-size: 12px; }
|
||||
.agent-card .card-tiers { display: grid; gap: 5px; background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
|
||||
.agent-card .card-tier { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }
|
||||
.agent-card .row-name { font-weight: 700; font-size: var(--fs-base); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
|
||||
.agent-card .card-who code { color: var(--ink-3); font-size: var(--fs-xs); }
|
||||
.agent-card .card-tiers { display: grid; gap: 5px; background: var(--panel-2); border-radius: var(--radius-md); padding: 8px 10px; }
|
||||
.agent-card .card-tier { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 8px; align-items: center; font-size: var(--fs-sm); }
|
||||
.agent-card .card-tier .muted, .strength-model.none { color: var(--ink-3); font-style: italic; }
|
||||
.agent-card .card-foot { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 12px; }
|
||||
.agent-card .card-foot { display: flex; justify-content: space-between; color: var(--ink-3); font-size: var(--fs-xs); }
|
||||
.agent-card .card-edit { color: var(--accent); font-weight: 600; }
|
||||
.agent-card .row-note { margin: 0; }
|
||||
.agent-card.ghost {
|
||||
@@ -214,31 +195,19 @@
|
||||
min-height: 150px;
|
||||
color: var(--ink-2);
|
||||
}
|
||||
.agent-card.ghost .plus { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 20px; }
|
||||
.agent-card.ghost .muted { font-size: 12.5px; color: var(--ink-3); }
|
||||
.agent-card.ghost .plus { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: var(--fs-h2); }
|
||||
.agent-card.ghost .muted { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
|
||||
.tag {
|
||||
display: inline-block;
|
||||
font-size: 11.5px;
|
||||
font-weight: 500;
|
||||
line-height: 1.5;
|
||||
padding: 0 7px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--rule-2);
|
||||
background: var(--panel-2);
|
||||
color: var(--ink-3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Thrifty, Balanced and Best take the rank colors (see tokens.css). */
|
||||
.tier {
|
||||
display: inline-block;
|
||||
justify-self: start;
|
||||
font-size: 11.5px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
line-height: 1.5;
|
||||
padding: 0 8px;
|
||||
border-radius: 10px;
|
||||
border-radius: var(--radius);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tier.t-thrifty { color: var(--lvl-1); background: var(--lvl-1-soft); }
|
||||
@@ -247,9 +216,9 @@
|
||||
|
||||
/* ---------------------------------------------------------------- the drawer */
|
||||
|
||||
.agents-drawer, .agents-chooser { position: absolute; inset: 0; z-index: 5; }
|
||||
.agents-drawer, .agents-chooser { position: absolute; inset: 0; z-index: var(--z-sticky); }
|
||||
.agents-drawer[hidden], .agents-chooser[hidden] { display: none; }
|
||||
.drawer-scrim, .chooser-scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(1px); }
|
||||
.drawer-scrim, .chooser-scrim { position: absolute; inset: 0; background: var(--scrim); }
|
||||
.drawer {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
@@ -262,16 +231,16 @@
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
box-shadow: var(--shadow-3);
|
||||
overflow: hidden;
|
||||
}
|
||||
.drawer .form-head { padding: 14px 16px 6px; justify-content: space-between; align-items: center; flex-wrap: nowrap; }
|
||||
.drawer .prefs-agents-title { font-size: 16px; flex-wrap: wrap; }
|
||||
.drawer .prefs-agents-title { font-size: var(--fs-h4); flex-wrap: wrap; }
|
||||
.agent-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--rule); }
|
||||
.agent-tab {
|
||||
appearance: none;
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
background: none;
|
||||
border: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
@@ -280,40 +249,40 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
.agent-tab:hover { color: var(--ink); }
|
||||
.agent-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
|
||||
.agent-tab[aria-selected="true"] { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
|
||||
.agent-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px 16px; display: grid; gap: 12px; align-content: start; }
|
||||
.drawer .prefs-agents-foot { border-top: 1px solid var(--rule); padding: 10px 16px; background: var(--panel); }
|
||||
/* Nothing to offer on a clean built-in: no empty bar. */
|
||||
.drawer .prefs-agents-foot:not(:has(> :not([hidden]))) { display: none; }
|
||||
/* The same form on the setup page's split pane is not a drawer: let it flow. */
|
||||
/* In the setup split pane the form is not a drawer: let it flow. */
|
||||
.split-pane .agent-body { overflow: visible; padding: 12px 0 0; }
|
||||
.split-pane .agent-tabs { padding: 0; }
|
||||
|
||||
.note { background: var(--accent-soft); color: var(--ink); border-radius: 8px; padding: 9px 12px; font-size: 13px; }
|
||||
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
|
||||
.note { padding: 9px 12px; font-size: var(--fs-sm); }
|
||||
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: var(--fs-sm); }
|
||||
.kv dt { color: var(--ink-3); }
|
||||
.kv dd { margin: 0; }
|
||||
|
||||
/* In the loop: the three words, what each resolves to, and the model pills. */
|
||||
/* In the loop: the three words, what they resolve to, the model pills. */
|
||||
.strength-body .strength-row { grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto auto; }
|
||||
.strength-body .strength-row:not(:has(select)) { grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; }
|
||||
.strength-word { display: grid; gap: 1px; font-size: inherit; }
|
||||
.strength-word small { font-size: 11.5px; }
|
||||
.strength-model { overflow-wrap: anywhere; font-size: 13px; }
|
||||
.strength-word small { font-size: var(--fs-xs); }
|
||||
.strength-model { overflow-wrap: anywhere; font-size: var(--fs-sm); }
|
||||
.models-tip { margin: 0; }
|
||||
.models-list { max-height: none; }
|
||||
.models-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 4px 6px; border-radius: 6px; font-size: 13px; }
|
||||
.models-row.locked { grid-template-columns: minmax(0, 1fr) auto auto; font-size: 13px; opacity: 1; }
|
||||
.models-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 4px 6px; border-radius: var(--radius-sm); font-size: var(--fs-sm); }
|
||||
.models-row.locked { grid-template-columns: minmax(0, 1fr) auto auto; font-size: var(--fs-sm); color: inherit; }
|
||||
.models-row:hover { background: var(--panel-2); }
|
||||
.model-name { display: grid; min-width: 0; overflow-wrap: anywhere; }
|
||||
.model-name code { font-size: 11.5px; color: var(--ink-3); }
|
||||
.model-name code { font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
.strength-pills { display: inline-flex; gap: 4px; }
|
||||
.strength-pill {
|
||||
appearance: none;
|
||||
font: inherit;
|
||||
font-size: 11.5px;
|
||||
font-size: var(--fs-xs);
|
||||
padding: 1px 9px;
|
||||
border-radius: 10px;
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid var(--rule-2);
|
||||
background: transparent;
|
||||
color: var(--ink-3);
|
||||
@@ -339,11 +308,11 @@
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
box-shadow: var(--shadow-3);
|
||||
padding: 16px 18px 18px;
|
||||
}
|
||||
.chooser-head { display: flex; justify-content: space-between; align-items: center; }
|
||||
.chooser-head h3 { margin: 0; font-size: 16px; }
|
||||
.chooser-head h3 { margin: 0; font-size: var(--fs-h4); }
|
||||
.chooser-sheet > .help { margin: 0; }
|
||||
.chooser-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
|
||||
.chooser-tile {
|
||||
@@ -353,23 +322,23 @@
|
||||
color: var(--ink);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
padding: 10px 12px;
|
||||
cursor: pointer;
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
.chooser-tile:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.chooser-tile:disabled { opacity: 0.55; cursor: default; }
|
||||
.chooser-tile b { font-size: 14px; }
|
||||
.chooser-tile code { color: var(--ink-3); font-size: 12px; }
|
||||
.chooser-tile b { font-size: var(--fs-md); }
|
||||
.chooser-tile code { color: var(--ink-3); font-size: var(--fs-xs); }
|
||||
.chooser-tile .muted { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-3); }
|
||||
.chooser-tile.wide { border-style: dashed; }
|
||||
.chooser-state { font-size: 12px; color: var(--ink-3); }
|
||||
.chooser-state { font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
.chooser-state.ok { color: var(--ok); }
|
||||
.chooser-state.missing { color: var(--warn); }
|
||||
.chooser-or { text-align: center; color: var(--ink-3); font-size: 12px; display: flex; align-items: center; gap: 10px; }
|
||||
.chooser-or { text-align: center; color: var(--ink-3); font-size: var(--fs-xs); display: flex; align-items: center; gap: 10px; }
|
||||
.chooser-or::before, .chooser-or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
|
||||
|
||||
@media (max-width: 720px) {
|
||||
@@ -382,4 +351,4 @@
|
||||
.model-add { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
.drawer .help, .chooser-sheet .help, .strength-offer { font-size: 12.5px; color: var(--ink-3); }
|
||||
.drawer .help, .chooser-sheet .help, .strength-offer { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
@@ -13,7 +13,7 @@
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
box-shadow: var(--shadow-1);
|
||||
overflow: hidden;
|
||||
}
|
||||
.ask-head {
|
||||
@@ -22,8 +22,8 @@
|
||||
padding: 16px 22px 14px;
|
||||
border-bottom: 1px solid var(--rule);
|
||||
}
|
||||
.ask-head h2 { font: 600 21px/1.2 var(--serif); margin: 0; flex: 1; }
|
||||
.ask-counter { font: 700 12px/1 var(--mono); color: var(--ink-3); }
|
||||
.ask-head h2 { font: 600 var(--fs-h2)/1.2 var(--serif); margin: 0; flex: 1; }
|
||||
.ask-counter { font: 700 var(--fs-xs)/1 var(--mono); color: var(--ink-3); }
|
||||
|
||||
.ask-list {
|
||||
flex: 1 1 auto;
|
||||
@@ -35,58 +35,41 @@
|
||||
}
|
||||
/* 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 {
|
||||
width: 100%;
|
||||
padding: 9px 13px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
font: inherit;
|
||||
font-size: 13.5px;
|
||||
color: var(--ink-2);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ask-starters-lead { color: var(--ink-3); font-size: var(--fs-md); margin: 0 0 4px; text-align: center; }
|
||||
.ask-starter { width: 100%; font-weight: 400; color: var(--ink-2); text-align: left; }
|
||||
.ask-starter:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
|
||||
.ask-starter:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
||||
.ask-starter:disabled { opacity: 0.55; cursor: not-allowed; }
|
||||
|
||||
.ask-row {
|
||||
max-width: 86%;
|
||||
border-radius: var(--radius);
|
||||
padding: 10px 14px;
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-md);
|
||||
border: 1px solid var(--rule);
|
||||
}
|
||||
.ask-row.person { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-line); }
|
||||
.ask-row.pending { border-style: dashed; background: transparent; }
|
||||
.ask-row.agent { align-self: flex-start; background: var(--panel-2); }
|
||||
.ask-row.decision { align-self: flex-end; background: transparent; border-style: dashed; color: var(--ink-2); font-size: 13px; }
|
||||
.ask-row.decision { align-self: flex-end; background: transparent; border-style: dashed; color: var(--ink-2); font-size: var(--fs-sm); }
|
||||
.ask-row .md { max-width: none; }
|
||||
.ask-row .md > :first-child { margin-top: 0; }
|
||||
.ask-row .md > :last-child { margin-bottom: 0; }
|
||||
.ask-row .attach-tray { margin: 8px 0 0; }
|
||||
.ask-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
|
||||
.ask-about { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--accent); }
|
||||
.ask-about { margin: 0 0 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent); }
|
||||
.ask-decision { margin: 0; font-weight: 600; }
|
||||
.ask-decision.working { display: flex; align-items: center; gap: 8px; }
|
||||
.ask-waiting { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
|
||||
.ask-waiting { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
|
||||
.ask-failed { color: var(--warn); }
|
||||
|
||||
.ask-proposal {
|
||||
margin-top: 10px; padding: 10px 12px;
|
||||
border: 1px solid var(--stage); border-radius: 8px;
|
||||
background: var(--stage-soft);
|
||||
}
|
||||
.ask-proposal { margin-top: 10px; padding: 10px 12px; }
|
||||
.ask-proposal .note-kicker { margin-bottom: 4px; }
|
||||
.ask-proposal-files, .ask-changed { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
|
||||
.ask-proposal-files, .ask-changed { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-sm); }
|
||||
.ask-proposal-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
|
||||
.ask-proposal-actions input[type="text"] { flex: 1 1 200px; width: auto; padding: 7px 10px; }
|
||||
.ask-decided { margin: 8px 0 0; font-weight: 700; font-size: 13px; }
|
||||
.ask-decided { margin: 8px 0 0; font-weight: 700; font-size: var(--fs-sm); }
|
||||
.ask-decided.approve { color: var(--ok); }
|
||||
.ask-decided.decline { color: var(--ink-2); }
|
||||
.ask-changed-count { font: 12px/1 var(--mono); color: var(--ink-3); }
|
||||
.ask-changed-count { font: var(--fs-xs)/1 var(--mono); color: var(--ink-3); }
|
||||
|
||||
.ask-composer {
|
||||
flex: none;
|
||||
@@ -100,9 +83,9 @@
|
||||
.ask-about-chip {
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
margin-bottom: 8px; padding: 3px 4px 3px 11px;
|
||||
border: 1px solid var(--accent-line); border-radius: 99px;
|
||||
border: 1px solid var(--accent-line); border-radius: var(--radius-pill);
|
||||
background: var(--accent-soft); color: var(--accent);
|
||||
font-size: 12px; font-weight: 600;
|
||||
font-size: var(--fs-xs); font-weight: 600;
|
||||
max-width: 100%;
|
||||
}
|
||||
.ask-about-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
@@ -115,7 +98,7 @@
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: calc(100% + 4px);
|
||||
z-index: 20;
|
||||
z-index: var(--z-pop);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 220px;
|
||||
@@ -126,7 +109,7 @@
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
box-shadow: var(--shadow);
|
||||
box-shadow: var(--shadow-2);
|
||||
}
|
||||
.ask-context-item {
|
||||
display: flex;
|
||||
@@ -134,10 +117,10 @@
|
||||
gap: 10px;
|
||||
padding: 7px 10px;
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--ink);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
@@ -145,24 +128,23 @@
|
||||
.ask-context-item:hover,
|
||||
.ask-context-item:focus-visible { background: var(--accent-soft); outline: none; }
|
||||
.ask-context-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.ask-context-kind { flex: none; font-size: 11px; color: var(--ink-3); }
|
||||
.ask-context-kind { flex: none; font-size: var(--fs-2xs); color: var(--ink-3); }
|
||||
.ask-actions .btn.primary { margin-left: auto; }
|
||||
.ask-send-hint { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
|
||||
.ask-send-hint { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
|
||||
.ask-send-hint + .btn.primary { margin-left: 0; }
|
||||
/* The wake-the-agent offer when nobody is there: a button (or, in a browser, a
|
||||
line) pushed right so it sits directly left of Send. */
|
||||
.ask-actions .ask-reconnect { margin-left: auto; }
|
||||
.ask-actions .ask-reconnect + .btn.primary { margin-left: 0; }
|
||||
p.ask-reconnect { margin-top: 0; margin-bottom: 0; font-size: 12.5px; }
|
||||
.ask-count { font: 12px/1 var(--mono); color: var(--ink-3); }
|
||||
p.ask-reconnect { margin-top: 0; margin-bottom: 0; font-size: var(--fs-sm); }
|
||||
.ask-count { font: var(--fs-xs)/1 var(--mono); color: var(--ink-3); }
|
||||
.ask-count.is-over { color: var(--warn); font-weight: 700; }
|
||||
.ask-error { color: var(--warn); font-size: 13px; margin: 8px 0 0; }
|
||||
.ask-error { color: var(--warn); font-size: var(--fs-sm); margin: 8px 0 0; }
|
||||
|
||||
/* The two reasons Send is off read differently, as their wording does: the
|
||||
limit is a plain fact, the missing agent is something to fix. */
|
||||
.ask-disabled-note { margin: 0; font-size: 12.5px; line-height: 1.35; padding: 6px 10px; border-radius: 8px; }
|
||||
.ask-disabled-note { margin: 0; font-size: var(--fs-sm); line-height: 1.35; padding: 6px 10px; border-radius: var(--radius-md); }
|
||||
.ask-disabled-note.is-limit, .ask-disabled-note.is-waiting { color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--rule); }
|
||||
.ask-disabled-note.is-offline { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn); }
|
||||
|
||||
/* Waiting on Plan2Code (an Ask answer, or answers sent from Questions):
|
||||
the tiny ring, left of the label. The extra .spinner is for specificity:
|
||||
|
||||
@@ -2,47 +2,34 @@
|
||||
|
||||
/* ------------------------------------------------------------ dashboard */
|
||||
|
||||
/* The dashboard replaces the question column with a menu, and the send bar
|
||||
with a click on a card. `hidden` alone loses to the bar's own display
|
||||
rule, so it needs saying here. */
|
||||
/* The dashboard replaces the question column and send bar. `hidden` alone loses to the bar's display rule. */
|
||||
.footer[hidden] { display: none; }
|
||||
|
||||
/* The menu follows the Card width setting like the question column does. */
|
||||
/* Follows the Card width setting. */
|
||||
.dash { max-width: min(var(--card-width), 100%); padding-top: 8px; }
|
||||
.dash-title { margin: 6px 0 8px; font: 600 clamp(26px, 4vw, 36px)/1.1 var(--serif); }
|
||||
.dash-note { margin: 0 0 26px; font-size: 14.5px; color: var(--ink-2); }
|
||||
/* The first-run role nudge: one line above the title, wrapping on a narrow
|
||||
window, until looks.json carries a role. */
|
||||
.dash-note { margin: 0 0 26px; font-size: var(--fs-base); color: var(--ink-2); }
|
||||
/* First-run role nudge, shown until looks.json carries a role. */
|
||||
.dash-nudge {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 10px 14px;
|
||||
margin: 0 0 18px;
|
||||
padding: 10px 14px;
|
||||
background: var(--accent-soft);
|
||||
border: 1px solid var(--accent-line);
|
||||
border-radius: var(--radius);
|
||||
color: var(--ink);
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
.dash-nudge-text { flex: 1 1 16em; }
|
||||
/* The session meter at red: the same slot, in the careful color. */
|
||||
.dash-nudge.meter-banner {
|
||||
background: var(--warn-soft);
|
||||
border-color: var(--warn);
|
||||
border-left-width: 4px;
|
||||
color: var(--ink);
|
||||
}
|
||||
/* A newer release: the same slot, in the accent, with the label as the way
|
||||
into the update modal and a small × that hides it for this session. */
|
||||
/* After the first launch: the two optional extras as one quiet line. */
|
||||
.dash-extras { margin: 0 0 14px; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.dash-extras .btn { margin-left: 10px; }
|
||||
.dash-extras-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
|
||||
.dash-extras-link:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
/* Session meter at red: same slot, warn color. */
|
||||
/* Newer release: same slot, accent; the label opens the update modal, the x hides it for the session. */
|
||||
.dash-nudge.update-banner {
|
||||
position: relative;
|
||||
padding-left: 40px;
|
||||
padding-right: 40px;
|
||||
border-left-width: 4px;
|
||||
border-left-color: var(--accent-line);
|
||||
color: var(--ink);
|
||||
box-shadow: var(--glow);
|
||||
}
|
||||
.update-banner-open {
|
||||
@@ -58,8 +45,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
.update-banner-open:hover { text-decoration: underline; }
|
||||
/* 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. */
|
||||
/* Out of the flow so the label centers on the whole banner. */
|
||||
.update-banner-dismiss {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -71,18 +57,21 @@
|
||||
background: none;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: 16px;
|
||||
font-size: var(--fs-h4);
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
.update-banner-dismiss:hover { background: var(--accent-line); }
|
||||
/* Wide enough that the update command sits on one line beside Copy; a
|
||||
narrow window still wraps it rather than overflowing. */
|
||||
/* Wide enough for the command on one line beside Copy; wraps when narrow. */
|
||||
#update-modal { max-width: 720px; }
|
||||
.update-steps { margin: 0 0 12px; padding-left: 1.4em; color: var(--ink); }
|
||||
.update-steps li { margin: 4px 0; }
|
||||
/* The hand-off copy row, in the modal's first step: the command and its Copy
|
||||
side by side. */
|
||||
/* Closed until the one command did not work. */
|
||||
.update-more { margin: 10px 0 0; }
|
||||
.update-more summary { cursor: pointer; color: var(--ink-2); }
|
||||
.update-more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.update-more p { margin: 8px 0 4px; color: var(--ink-2); }
|
||||
/* The command and its Copy side by side. */
|
||||
.update-command {
|
||||
margin: 6px 0 4px;
|
||||
display: flex;
|
||||
@@ -93,17 +82,16 @@
|
||||
.update-command code {
|
||||
flex: 1 1 260px;
|
||||
min-width: 0;
|
||||
font: 13px/1.5 var(--mono);
|
||||
font: var(--fs-sm)/1.5 var(--mono);
|
||||
color: var(--ink);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
padding: 10px 12px;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.dash-nudge-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
|
||||
.dash-nudge-actions .btn.tiny { margin-bottom: 0; }
|
||||
.dash-working {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -114,22 +102,21 @@
|
||||
color: var(--accent);
|
||||
background: var(--accent-soft);
|
||||
border: 1px solid var(--accent-line);
|
||||
border-radius: 10px;
|
||||
border-radius: var(--radius);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dash-group { margin-bottom: 30px; }
|
||||
|
||||
/* A switch, not a checkbox look: it filters the menu live rather than being
|
||||
an answer. The real checkbox stays in the tree (visually hidden) so the
|
||||
keyboard, focus ring and screen readers all work as for any input. */
|
||||
/* A switch: it filters live, not an answer. The real checkbox stays (visually
|
||||
hidden) so keyboard, focus ring and screen readers work. */
|
||||
.dash-toggle {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin: -12px 0 26px;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--ink-2);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
@@ -140,10 +127,10 @@
|
||||
flex: none;
|
||||
width: 34px;
|
||||
height: 20px;
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--rule-2);
|
||||
transition: background 0.15s ease, border-color 0.15s ease;
|
||||
transition: background var(--dur-1), border-color var(--dur-1);
|
||||
}
|
||||
.dash-toggle-track::after {
|
||||
content: "";
|
||||
@@ -154,40 +141,31 @@
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
background: var(--ink-3);
|
||||
transition: transform 0.15s ease, background 0.15s ease;
|
||||
transition: transform var(--dur-1), background var(--dur-1);
|
||||
}
|
||||
.dash-toggle input:checked + .dash-toggle-track { background: var(--accent); border-color: var(--accent); }
|
||||
.dash-toggle input:checked + .dash-toggle-track::after { transform: translateX(14px); background: var(--accent-ink); }
|
||||
.dash-toggle input:focus-visible + .dash-toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.dash-toggle input:focus-visible + .dash-toggle-track { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.dash-toggle:hover .dash-toggle-track { border-color: var(--accent-line); }
|
||||
|
||||
.dash-empty { margin: 0 0 30px; font-size: 13.5px; color: var(--ink-3); font-style: italic; }
|
||||
.dash-group-title {
|
||||
margin: 0 0 12px;
|
||||
font-size: 11.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-3);
|
||||
border-bottom: 1px solid var(--rule);
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
/* Every card in a group has one width, `--dash-cols` to a row: the dashboard
|
||||
picks the count (card-rows.js) so no card sits alone on a row, and centers a
|
||||
last row still short. The 3 is only the first paint's guess. */
|
||||
/* One card width, `--dash-cols` per row: card-rows.js picks the count so no
|
||||
card sits alone, and centers a short last row. The 3 is a first-paint guess. */
|
||||
.dash-grid {
|
||||
--dash-cols: 3;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
.dash-grid > .dash-card { flex: 0 0 calc((100% - (var(--dash-cols) - 1) * 12px) / var(--dash-cols)); min-width: 0; }
|
||||
.dash-grid > .dash-card, .dash-grid > .dash-card-wrap { flex: 0 0 calc((100% - (var(--dash-cols) - 1) * 12px) / var(--dash-cols)); min-width: 0; }
|
||||
.dash-grid.is-centered { justify-content: center; }
|
||||
|
||||
/* A card IS a button, so it carries the reset the page's other big clickable
|
||||
surfaces do; the look is the panel look with a lift on hover, and the
|
||||
accent border that elsewhere means "the thing in play". */
|
||||
/* A card is a button, so it carries the usual reset; panel look, lifts on hover. */
|
||||
.dash-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -200,35 +178,25 @@
|
||||
text-align: left;
|
||||
color: var(--ink);
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
|
||||
transition: transform var(--dur-1), box-shadow var(--dur-1), border-color var(--dur-1);
|
||||
}
|
||||
.dash-card:hover:not(:disabled) {
|
||||
transform: translateY(-2px);
|
||||
border-color: var(--accent-line);
|
||||
box-shadow: var(--shadow);
|
||||
box-shadow: var(--shadow-2);
|
||||
}
|
||||
.dash-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.dash-card:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.dash-card:disabled { cursor: default; opacity: 0.55; }
|
||||
.dash-card.is-suggested { border-color: var(--accent); }
|
||||
.dash-card.is-going { border-color: var(--accent); opacity: 1; }
|
||||
|
||||
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
||||
.dash-chip {
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-3);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 999px;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
.dash-card.is-suggested .dash-chip { color: var(--accent); border-color: var(--accent-line); }
|
||||
.dash-card.is-suggested .dash-chip { --t: var(--accent); --t-line: var(--accent-line); }
|
||||
|
||||
/* The card icon sheet: present for <use href>, never drawn itself. */
|
||||
.card-icons { position: absolute; width: 0; height: 0; overflow: hidden; }
|
||||
|
||||
.dash-card-title { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 650; }
|
||||
.dash-card-title { display: flex; align-items: center; gap: 7px; font-size: var(--fs-base); font-weight: 600; }
|
||||
.dash-card-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
@@ -240,8 +208,8 @@
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
.dash-card.is-suggested .dash-card-icon { stroke: var(--accent); }
|
||||
.dash-card-blurb { font-size: 13px; color: var(--ink-2); flex: 1; }
|
||||
.dash-card-detail { font-size: 12px; color: var(--accent); }
|
||||
.dash-card-blurb { font-size: var(--fs-sm); color: var(--ink-2); flex: 1; }
|
||||
.dash-card-detail { font-size: var(--fs-xs); color: var(--accent); }
|
||||
|
||||
.dash-card-foot {
|
||||
display: flex;
|
||||
@@ -252,26 +220,23 @@
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid var(--rule);
|
||||
}
|
||||
/* Wraps at the dashes rather than cut off: a command missing its end
|
||||
("/plan2code-3-implement-revi…") is no command at all. */
|
||||
/* Wraps at the dashes, never cut off: a truncated command is no command. */
|
||||
.dash-card-cmd {
|
||||
font-family: var(--mono);
|
||||
font-size: 11.5px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--ink-3);
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.dash-card-go { color: var(--accent); font-weight: 700; transition: transform 0.15s ease; }
|
||||
.dash-card-go { color: var(--accent); font-weight: 700; transition: transform var(--dur-1); }
|
||||
.dash-card:hover:not(:disabled) .dash-card-go { transform: translateX(3px); }
|
||||
|
||||
/* 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; }
|
||||
/* Why a card is off (it grays via :disabled), so the menu teaches the pipeline. */
|
||||
.dash-card-off { font-size: var(--fs-xs); color: var(--ink-3); font-style: italic; }
|
||||
|
||||
/* -------------------------------------------------------- spec picker */
|
||||
|
||||
/* The picker's chips are the same vocabulary as the rail's items: a bordered
|
||||
lozenge that lights up on the current one. */
|
||||
/* Chips match the rail's items: a bordered lozenge lit on the current one. */
|
||||
.spec-pick { margin-bottom: 30px; }
|
||||
.spec-row { display: flex; flex-wrap: wrap; gap: 10px; }
|
||||
.spec-chip {
|
||||
@@ -286,22 +251,18 @@
|
||||
text-align: left;
|
||||
color: var(--ink);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||
transition: border-color var(--dur-1), box-shadow var(--dur-1);
|
||||
}
|
||||
.spec-chip:hover { border-color: var(--accent-line); }
|
||||
.spec-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.spec-chip.is-sel { border-color: var(--accent); box-shadow: var(--shadow); }
|
||||
.spec-chip-name { font-size: 13.5px; font-weight: 650; }
|
||||
.spec-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.spec-chip.is-sel { border-color: var(--accent); box-shadow: var(--shadow-1); }
|
||||
.spec-chip-name { font-size: var(--fs-md); font-weight: 600; }
|
||||
.spec-chip-state {
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
}
|
||||
.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 color. */
|
||||
.spec-chip-detail { font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
/* A handoff: dashed, 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); }
|
||||
@@ -315,17 +276,13 @@
|
||||
border: 1px solid var(--stage);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.handoff-preview-title { font: 600 20px/1.25 var(--serif); margin: 0 0 4px; }
|
||||
.handoff-preview-meta { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-3); }
|
||||
.handoff-preview-title { font: 600 var(--fs-h2)/1.25 var(--serif); margin: 0 0 4px; }
|
||||
.handoff-preview-meta { margin: 0 0 14px; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.handoff-preview-label {
|
||||
margin: 0 0 3px;
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--stage);
|
||||
}
|
||||
.handoff-preview-next { margin: 0 0 16px; font-size: 14px; color: var(--ink); }
|
||||
.handoff-preview-next { margin: 0 0 16px; font-size: var(--fs-md); color: var(--ink); }
|
||||
.handoff-preview-actions { display: flex; flex-wrap: wrap; gap: 10px; }
|
||||
.handoff-preview-actions .btn.danger { margin-left: auto; }
|
||||
.modal.handoff-read { width: min(960px, calc(100vw - 32px)); max-width: none; }
|
||||
@@ -334,8 +291,7 @@
|
||||
.handoff-body.md { max-width: none; }
|
||||
.modal.handoff-read .modal-actions { flex: none; }
|
||||
|
||||
/* A spec's Delete button sits beside its chip, not inside it: a button cannot
|
||||
hold a button. Quiet until the chip is hovered or focused. */
|
||||
/* Delete sits beside its chip (a button cannot hold a button); quiet until hover or focus. */
|
||||
.spec-chip-wrap { position: relative; display: flex; }
|
||||
.spec-chip-wrap.is-fixed .spec-chip:not(.is-sel) { opacity: 0.6; }
|
||||
.spec-chip-wrap .spec-chip { padding-right: 36px; }
|
||||
@@ -349,11 +305,11 @@
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: transparent;
|
||||
color: var(--ink-3);
|
||||
font: inherit;
|
||||
font-size: 15px;
|
||||
font-size: var(--fs-base);
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
opacity: 0.55;
|
||||
@@ -361,11 +317,10 @@
|
||||
.spec-chip-wrap:hover .spec-chip-del,
|
||||
.spec-chip-del:focus-visible { opacity: 1; }
|
||||
.spec-chip-del:hover { color: var(--warn); border-color: var(--warn); opacity: 1; }
|
||||
.spec-chip-del:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
|
||||
.spec-chip-del:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.spec-chip-del:disabled { cursor: default; opacity: 0.3; }
|
||||
/* A fixed bug's Delete is always shown, as a pill at the chip's bottom right;
|
||||
the chip makes room below its lines so the pill never covers the name. The
|
||||
chip's is-fixed dimming targets .spec-chip, so the pill keeps full strength. */
|
||||
/* A fixed bug's Delete is always shown, a pill at the chip's bottom right with
|
||||
room below the lines. The is-fixed dimming targets .spec-chip, so the pill stays full strength. */
|
||||
.spec-chip-wrap.is-fixed .spec-chip { padding-right: 14px; padding-bottom: 36px; }
|
||||
.spec-chip-del-label {
|
||||
position: absolute;
|
||||
@@ -373,56 +328,44 @@
|
||||
bottom: 8px;
|
||||
padding: 2px 10px;
|
||||
border: 1px solid var(--warn);
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--panel);
|
||||
color: var(--warn);
|
||||
font: inherit;
|
||||
font-size: 12.5px;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 600;
|
||||
line-height: 1.5;
|
||||
cursor: pointer;
|
||||
}
|
||||
.spec-chip-del-label:hover:not(:disabled) { background: var(--warn-soft); }
|
||||
.spec-chip-del-label:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
|
||||
.spec-chip-del-label:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.spec-chip-del-label:disabled { cursor: default; opacity: 0.4; }
|
||||
.spec-chip-wrap.is-deleting .spec-chip { opacity: 0.5; }
|
||||
.delete-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 13.5px; }
|
||||
.delete-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: var(--fs-md); }
|
||||
.delete-facts dt { color: var(--ink-3); }
|
||||
.delete-facts dd { margin: 0; overflow-wrap: anywhere; }
|
||||
.delete-confirm { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
|
||||
.delete-confirm { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-md); }
|
||||
.delete-confirm[hidden] { display: none; }
|
||||
.delete-confirm input {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
}
|
||||
.delete-confirm input:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
|
||||
|
||||
/* ------------------------------------------------- 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. As wide as the menu (the page
|
||||
width setting), centered like the launching pane it precedes. */
|
||||
/* Between clicking a card and running it: what it is, what it will do, a
|
||||
START that means it. Menu width, centered like the launching pane. */
|
||||
.dash-confirm {
|
||||
max-width: min(var(--card-width), 100%);
|
||||
margin: 3vh auto 0;
|
||||
/* Column flex, not grid: a grid item's sticky range is its own row, so the
|
||||
tail bar below could never travel. align-items does the centering
|
||||
justify-items did; loop-setup opts back into grid. */
|
||||
tail bar could never travel. loop-setup opts back into grid. */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
text-align: center;
|
||||
/* Focused controls must land above the pinned bar, never under it:
|
||||
roughly .confirm-tail's height — keep them in step if the bar grows. */
|
||||
/* Focused controls land above the pinned bar: about .confirm-tail's height, keep in step. */
|
||||
scroll-padding-bottom: 96px;
|
||||
}
|
||||
|
||||
/* A smaller stage than the launching hero: the same sky, a moment shorter. */
|
||||
/* A smaller stage than the launching hero. */
|
||||
.confirm-stage { height: 130px; }
|
||||
.confirm-stage .sky .star { animation: star-fly var(--dur, 5s) linear var(--delay, 0s) infinite; }
|
||||
|
||||
@@ -438,38 +381,36 @@
|
||||
|
||||
.confirm-head { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
|
||||
.dash-confirm .dash-title { margin: 2px 0 0; }
|
||||
/* The pane is as wide as the menu, but prose is not: its lines stop at a
|
||||
readable measure while the controls below keep the full width. */
|
||||
/* Prose stops at a readable measure; the controls keep the full width. */
|
||||
.confirm-about, .confirm-detail, .confirm-spec { max-width: 70ch; }
|
||||
.confirm-about { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
|
||||
.confirm-detail { margin: 0; font-size: 13px; color: var(--accent); }
|
||||
.confirm-spec { margin: 0; font-size: 13px; color: var(--ink-2); }
|
||||
.confirm-spec code { font-family: var(--mono); font-size: 12px; }
|
||||
.confirm-about { margin: 0; font-size: var(--fs-base); line-height: 1.55; color: var(--ink-2); }
|
||||
.confirm-detail { margin: 0; font-size: var(--fs-sm); color: var(--accent); }
|
||||
.confirm-spec { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.confirm-spec code { font-family: var(--mono); font-size: var(--fs-xs); }
|
||||
.confirm-rule { width: 100%; height: 0; margin: 6px 0 2px; border: 0; border-top: 1px solid var(--accent); }
|
||||
.confirm-review { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; color: var(--ink-2); cursor: pointer; }
|
||||
.confirm-review input { accent-color: var(--accent, currentColor); }
|
||||
.confirm-cmd { margin: 2px 0 0; }
|
||||
.confirm-cmd code {
|
||||
font-family: var(--mono);
|
||||
font-size: 12.5px;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--ink-2);
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 4px 10px;
|
||||
}
|
||||
.confirm-cmd-note { margin-left: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
|
||||
.confirm-cmd-note { margin-left: 8px; font-family: var(--mono); font-size: var(--fs-sm); color: var(--accent); }
|
||||
.confirm-actions { display: flex; gap: 10px; margin-top: 10px; }
|
||||
|
||||
/* The command line and the buttons as one bar pinned to the pane's bottom
|
||||
edge: .dash-confirm is the scroller, so a last-child sticky tail stays in
|
||||
view whatever the Notebook box pushes past the fold. Opaque like .doc-head
|
||||
(the pane sits on var(--bg)), with the footer's border and shadow for
|
||||
separation; .confirm-actions keeps its own class so "Start" stays findable. */
|
||||
/* Command line and buttons as one bar pinned to the pane's bottom: .dash-confirm
|
||||
is the scroller, so the sticky last child stays in view past the Notebook box.
|
||||
Opaque like .doc-head, with the footer's border and shadow;
|
||||
.confirm-actions keeps its class so "Start" stays findable. */
|
||||
.confirm-tail {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 5;
|
||||
z-index: var(--z-sticky);
|
||||
align-self: stretch;
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
@@ -477,37 +418,29 @@
|
||||
padding: 10px 0 6px;
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--rule);
|
||||
box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.07);
|
||||
box-shadow: var(--shadow-up);
|
||||
}
|
||||
/* The bar's gap sets the rhythm; the row's own margin is for loop-setup,
|
||||
which has no tail. */
|
||||
/* The bar's gap sets the rhythm; the row's margin is for loop-setup (no tail). */
|
||||
.confirm-tail .confirm-actions { margin-top: 0; }
|
||||
/* The Notebook box frames itself, so the rule line is one separation too
|
||||
many when it is on the pane; the shadow still marks the bar in a scroll. */
|
||||
/* The Notebook box has its own frame, so drop the rule; the shadow still marks the bar. */
|
||||
.dash-confirm:has(.confirm-note-box) .confirm-tail { border-top: 0; }
|
||||
|
||||
/* "Start with a note from your Notebook": the switch, then the tabs beside a
|
||||
preview of the picked one, its pictures each with a tick. */
|
||||
/* Capped rather than stretched past the confirm's centering, and left
|
||||
aligned: a note reads as a document, and documents have a measure. */
|
||||
/* Its own frame sets it apart from the text above, so no rule: just room. */
|
||||
/* "Start with a note from your Notebook": the switch, then tabs beside a
|
||||
preview, its pictures each with a tick. Capped and left aligned (a document
|
||||
has a measure); its own frame sets it apart, so no rule. */
|
||||
.confirm-note-box { display: grid; gap: 8px; width: min(720px, 100%); text-align: left; margin-top: 12px; }
|
||||
.confirm-note-head {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--accent-line);
|
||||
border-left: 3px solid var(--accent);
|
||||
border-radius: 8px;
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
.confirm-note-head.is-on { padding: 8px 12px; }
|
||||
.confirm-note-switch { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 600; cursor: pointer; }
|
||||
.confirm-note-switch input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent, currentColor); }
|
||||
.confirm-note-hint { padding-left: 28px; font-size: 12.5px; color: var(--ink-2); }
|
||||
.confirm-note-hint { padding-left: 28px; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.confirm-note { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr); gap: 10px; }
|
||||
.confirm-note > .confirm-note-msg { grid-column: 1 / -1; }
|
||||
.confirm-note-msg { margin: 0; font-size: 13px; color: var(--ink-3); }
|
||||
.confirm-note-msg { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.confirm-note-tabs { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
|
||||
.confirm-note-tab {
|
||||
display: flex;
|
||||
@@ -515,18 +448,18 @@
|
||||
gap: 6px;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--panel-2);
|
||||
color: var(--ink-2);
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.confirm-note-tab:hover:not(:disabled) { border-color: var(--accent-line); color: var(--accent); }
|
||||
.confirm-note-tab.is-picked { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
|
||||
.confirm-note-tab:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
.confirm-note-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.confirm-note-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.confirm-note-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.confirm-note-preview {
|
||||
display: grid;
|
||||
@@ -537,14 +470,14 @@
|
||||
overflow-y: auto;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--panel);
|
||||
}
|
||||
.confirm-note-text { font-size: 13.5px; max-width: 65ch; }
|
||||
.confirm-note-long { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--warn); }
|
||||
.confirm-note-text { font-size: var(--fs-md); max-width: 65ch; }
|
||||
.confirm-note-long { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--warn); }
|
||||
.confirm-note-pics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
|
||||
.confirm-note-pic label { position: relative; display: block; cursor: pointer; }
|
||||
.confirm-note-pic img { display: block; width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--rule-2); border-radius: 6px; }
|
||||
.confirm-note-pic img { display: block; width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--rule-2); border-radius: var(--radius-sm); }
|
||||
.confirm-note-pic input { position: absolute; top: 4px; left: 4px; margin: 0; accent-color: var(--accent, currentColor); }
|
||||
.confirm-note-pic input:disabled + img { opacity: 0.45; }
|
||||
@media (max-width: 560px) {
|
||||
@@ -562,9 +495,7 @@
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
/* The same sky the dock fills behind Planny, here in a stage sized for a
|
||||
hero: the mask fades the stars at the edges exactly the way it does in
|
||||
the aside. */
|
||||
/* The dock's sky in a hero-sized stage; the mask fades the stars at the edges as in the aside. */
|
||||
.launch-stage {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@@ -574,8 +505,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; center stage they are
|
||||
the show, so the flight runs unconditionally. */
|
||||
/* The dock animates stars only while .is-flying; here the flight always runs. */
|
||||
.launch-stage .sky .star { animation: star-fly var(--dur, 5s) linear var(--delay, 0s) infinite; }
|
||||
|
||||
.launch-planny {
|
||||
@@ -585,25 +515,23 @@
|
||||
width: 74px;
|
||||
height: 102px;
|
||||
margin-left: -37px;
|
||||
/* The dock's flight keyframes carry the forward lean; a second, slower bob
|
||||
on top keeps a long wait from reading as a loop on rails. */
|
||||
/* The flight keyframes carry the lean; a slower bob keeps a long wait from looking like rails. */
|
||||
animation:
|
||||
planny-fly 1.7s ease-in-out infinite,
|
||||
launch-bob 3.4s ease-in-out infinite;
|
||||
}
|
||||
@keyframes launch-bob {
|
||||
0%, 100% { margin-bottom: 0; }
|
||||
50% { margin-bottom: 10px; }
|
||||
0%, 100% { translate: 0 0; }
|
||||
50% { translate: 0 -10px; }
|
||||
}
|
||||
|
||||
.launch-title { margin: 0; font: 600 clamp(24px, 4vw, 34px)/1.12 var(--serif); }
|
||||
.launch-quip {
|
||||
margin: 0;
|
||||
font-size: 14.5px;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
/* The line swaps on a timer; a minimum keeps the hint under it from
|
||||
hopping around as the words change length. */
|
||||
/* The line swaps on a timer; min-height keeps the hint from hopping. */
|
||||
min-height: 1.4em;
|
||||
animation: launch-quip-in 0.35s ease-out;
|
||||
}
|
||||
@@ -611,43 +539,46 @@
|
||||
from { opacity: 0; transform: translateY(5px); }
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
.launch-hint { margin: 0; font-size: 12.5px; color: var(--ink-3); max-width: 46ch; }
|
||||
/* Under the app, a saved pick nobody collected: the button that types continue. */
|
||||
.launch-hint { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); max-width: 46ch; }
|
||||
/* A saved pick nobody collected: the button that types continue. */
|
||||
.launch-reconnect { margin-top: 14px; }
|
||||
.launch-reconnect[hidden] { display: none; }
|
||||
/* A line, never a banner: no border, no background, no icon. */
|
||||
.approval-tip { max-width: 70ch; margin: 18px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
|
||||
/* Under the dashboard's cards it centers on the grid and runs most of its width. */
|
||||
.approval-tip { max-width: 70ch; margin: 18px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-3); }
|
||||
/* Under the cards it centers on the grid. */
|
||||
.dash > .approval-tip { max-width: 140ch; margin-inline: auto; text-align: center; }
|
||||
|
||||
|
||||
/* --------------------------------------------- the Implementation Loop */
|
||||
|
||||
/* The card's own link; a span, since a link may not sit inside a button. */
|
||||
.dash-card-link { font-size: 12px; color: var(--accent); text-decoration: underline; cursor: pointer; justify-self: start; }
|
||||
/* A span: a link may not sit inside a button. */
|
||||
/* The loop card's wrapper: the card button, and its link under it. */
|
||||
.dash-card-wrap { display: flex; flex-direction: column; gap: 6px; }
|
||||
.dash-card-wrap > .dash-card { flex: 1 1 auto; }
|
||||
.dash-card-link { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-xs); color: var(--accent); text-decoration: underline; cursor: pointer; }
|
||||
|
||||
/* The setup screen: the confirm pane's width, with a left-aligned form. */
|
||||
.loop-setup { display: grid; justify-items: stretch; text-align: left; gap: 14px; }
|
||||
.loop-setup .card-kicker, .loop-setup .dash-title, .loop-setup .confirm-spec { justify-self: start; }
|
||||
.loop-lines { display: grid; gap: 4px; }
|
||||
.loop-line { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 75ch; }
|
||||
.loop-facts { display: grid; gap: 6px; margin: 0; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--rule); border-radius: 8px; }
|
||||
.loop-fact { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 10px; font-size: 13px; }
|
||||
.loop-line { margin: 0; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-2); max-width: 75ch; }
|
||||
.loop-facts { display: grid; gap: 6px; margin: 0; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--rule); border-radius: var(--radius-md); }
|
||||
.loop-fact { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 10px; font-size: var(--fs-sm); }
|
||||
.loop-fact dt { color: var(--ink-3); }
|
||||
.loop-fact dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
|
||||
.loop-form { display: grid; gap: 16px; }
|
||||
.loop-field { display: grid; gap: 6px; }
|
||||
.loop-label { margin: 0; font-weight: 600; font-size: 13.5px; }
|
||||
.loop-hint { margin: 0; font-size: 12.5px; color: var(--ink-3); }
|
||||
.loop-switch, .loop-radio { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); }
|
||||
.loop-label { margin: 0; font-weight: 600; font-size: var(--fs-md); }
|
||||
.loop-hint { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.loop-switch, .loop-radio { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.loop-switch input, .loop-radio input { accent-color: var(--accent, currentColor); margin-top: 3px; }
|
||||
.loop-radios { display: grid; gap: 6px; }
|
||||
.loop-radio-body { display: grid; gap: 1px; }
|
||||
.loop-radio-detail { font-size: 12.5px; color: var(--ink-3); }
|
||||
.loop-radio-detail { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.loop-switch.is-gray { opacity: 0.55; cursor: default; }
|
||||
.loop-switch[hidden] { display: none; }
|
||||
.loop-strength-none .linky { font-size: inherit; }
|
||||
.loop-strength-all { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
|
||||
.loop-strength-all { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.loop-strength-grid { position: relative; display: grid; gap: 6px; margin-top: 6px; }
|
||||
.loop-strength-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
|
||||
.loop-strength-line .step { fill: none; stroke: var(--ink-3); stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; }
|
||||
@@ -657,21 +588,23 @@
|
||||
.loop-strength-line .col.lvl-2 { stroke: var(--lvl-2); }
|
||||
.loop-strength-line .col.lvl-3 { stroke: var(--lvl-3); }
|
||||
.loop-strength-rows { display: grid; gap: 0; }
|
||||
.loop-strength-head, .loop-strength-row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(130px, 1.5fr) repeat(4, minmax(0, 1fr)) 64px; align-items: center; column-gap: 4px; font-size: 13.5px; }
|
||||
.loop-strength-head, .loop-strength-row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(130px, 1.5fr) repeat(4, minmax(0, 1fr)) 64px; align-items: center; column-gap: 4px; font-size: var(--fs-md); }
|
||||
.loop-strength-row { min-height: 46px; }
|
||||
.loop-strength-chip { justify-self: center; font-size: 12px; padding: 5px 9px; white-space: normal; text-align: center; line-height: 1.15; max-width: 100%; border-radius: 16px; }
|
||||
.loop-strength-chip { justify-self: center; font-size: var(--fs-xs); padding: 5px 9px; white-space: normal; text-align: center; line-height: 1.15; max-width: 100%; border-radius: 16px; /* one-off: a two-line chip, taller than a pill */ }
|
||||
.loop-strength-chip.is-unmapped { opacity: 0.5; }
|
||||
.loop-strength-phase { overflow-wrap: anywhere; color: var(--ink); padding-right: 8px; }
|
||||
.loop-strength-model { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; text-align: right; }
|
||||
.loop-strength-model { font-size: var(--fs-sm); color: var(--ink-3); overflow-wrap: anywhere; text-align: right; }
|
||||
.loop-strength-cell { --b: var(--lvl-0); position: relative; display: flex; align-items: center; justify-content: center; height: 46px; cursor: pointer; }
|
||||
.loop-strength-cell.lvl-1 { --b: var(--lvl-1); }
|
||||
.loop-strength-cell.lvl-2 { --b: var(--lvl-2); }
|
||||
.loop-strength-cell.lvl-3 { --b: var(--lvl-3); }
|
||||
.loop-strength-cell input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
|
||||
.loop-strength-node { box-sizing: border-box; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-3); background: var(--bg); display: grid; place-items: center; color: var(--bg); transition: all 0.12s; position: relative; z-index: 2; }
|
||||
.loop-strength-node { box-sizing: border-box; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-3); background: var(--bg); display: grid; place-items: center; color: var(--bg); transition: border-color var(--dur-1), background var(--dur-1), box-shadow var(--dur-1), transform var(--dur-1); position: relative; z-index: 2; }
|
||||
.loop-strength-cell:hover .loop-strength-node { border-color: var(--b); transform: scale(1.25); }
|
||||
.loop-strength-cell input:focus-visible + .loop-strength-node { outline: 2px solid var(--focus); outline-offset: 3px; }
|
||||
.loop-strength-cell input:checked + .loop-strength-node { width: 30px; height: 30px; background: var(--b); border-color: var(--b); box-shadow: 0 0 0 4px var(--bg); }
|
||||
.loop-strength-cell input:checked + .loop-strength-node.is-picked { animation: node-grow var(--dur-2) var(--ease-spring); }
|
||||
@keyframes node-grow { from { transform: scale(0.35); } }
|
||||
.loop-strength-node .sa-bars { display: none; }
|
||||
.loop-strength-cell input:checked + .loop-strength-node .sa-bars { display: inline-flex; }
|
||||
.loop-strength-cell.is-unmapped { cursor: default; }
|
||||
@@ -682,25 +615,25 @@
|
||||
/* Match my session has no rank: three flat bars, the middle one lighter. */
|
||||
.sa-bars.is-flat i:nth-child(n) { height: 7px; opacity: 1; }
|
||||
.sa-bars.is-flat i:nth-child(2) { opacity: 0.55; }
|
||||
.loop-select { font: inherit; font-size: 13.5px; padding: 5px 8px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 6px; max-width: 100%; }
|
||||
.loop-select { max-width: 100%; }
|
||||
@media (max-width: 620px) {
|
||||
.loop-strength-head, .loop-strength-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
.loop-strength-spacer, .loop-strength-model { display: none; }
|
||||
.loop-strength-phase { grid-column: 1 / -1; padding-top: 8px; }
|
||||
.loop-strength-chip { font-size: 10.5px; padding: 4px 6px; gap: 4px; flex-wrap: wrap; justify-content: center; }
|
||||
.loop-strength-chip { font-size: var(--fs-2xs); padding: 4px 6px; gap: 4px; flex-wrap: wrap; justify-content: center; }
|
||||
}
|
||||
.loop-ticks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: 4px; }
|
||||
.loop-text { font: inherit; font-size: 14px; padding: 6px 10px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--rule); border-radius: 6px; max-width: 520px; width: 100%; }
|
||||
.loop-text { max-width: 520px; width: 100%; }
|
||||
.loop-text.loop-narrow { width: 90px; }
|
||||
.loop-text.loop-param { width: 180px; }
|
||||
.loop-test { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
|
||||
.loop-test p { margin: 0; font-size: 12.5px; }
|
||||
.loop-number { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
|
||||
.loop-warn { margin: 0; font-size: 12.5px; color: var(--warn); }
|
||||
.loop-test p { margin: 0; font-size: var(--fs-sm); }
|
||||
.loop-number { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.loop-warn { margin: 0; font-size: var(--fs-sm); color: var(--warn); }
|
||||
.loop-start { display: grid; gap: 8px; justify-items: start; }
|
||||
.loop-why { margin: 0; font-size: 13px; color: var(--ink-2); }
|
||||
.loop-error { margin: 0; font-size: 13px; color: var(--warn); }
|
||||
.loop-problems { margin: 0; padding-left: 18px; font-size: 13px; color: var(--warn); }
|
||||
.loop-why { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.loop-error { margin: 0; font-size: var(--fs-sm); color: var(--warn); }
|
||||
.loop-problems { margin: 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--warn); }
|
||||
.loop-help { margin-left: auto; }
|
||||
|
||||
/* A card the loop holds: a record with a tag, no inputs. */
|
||||
@@ -709,23 +642,19 @@
|
||||
|
||||
/* The stop and finish screens the loop's end draws. */
|
||||
.loop-end { display: grid; gap: 14px; }
|
||||
.loop-end-phases { width: 100%; border-collapse: collapse; font-size: 13.5px; }
|
||||
.loop-end-phases { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
|
||||
.loop-end-phases th, .loop-end-phases td { text-align: left; padding: 5px 10px 5px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
|
||||
.loop-end-phases code { font-family: var(--mono); font-size: 12px; }
|
||||
.loop-end-files { margin: 0; padding-left: 18px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
|
||||
.loop-end-phases code { font-family: var(--mono); font-size: var(--fs-xs); }
|
||||
.loop-end-files { margin: 0; padding-left: 18px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); }
|
||||
.loop-end-heading, .loop-end .loop-line { overflow-wrap: anywhere; }
|
||||
.loop-end .loop-why, .loop-end .loop-advice {
|
||||
padding: 9px 13px; border-left: 4px solid var(--warn); border-radius: 0 6px 6px 0;
|
||||
background: var(--warn-soft); color: var(--ink); font-size: 14px; line-height: 1.5; max-width: 75ch; margin: 0;
|
||||
}
|
||||
.loop-end .loop-advice { border-left-color: var(--accent); background: var(--accent-soft); }
|
||||
.loop-end .loop-advice strong { color: var(--accent); }
|
||||
/* Each button with one plain line under it saying what it does. */
|
||||
.loop-end .loop-why, .loop-end .loop-advice { font-size: var(--fs-md); line-height: 1.5; max-width: 75ch; margin: 0; }
|
||||
/* Each button has a line under it saying what it does. */
|
||||
.loop-end-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
|
||||
.loop-end-choice { display: grid; gap: 6px; align-content: start; justify-items: start; }
|
||||
.loop-end-choice .btn { max-width: 100%; }
|
||||
.loop-end-hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
|
||||
.loop-end-safe { margin: 0; font-size: 13.5px; color: var(--ink-2); }
|
||||
.loop-end-hint { margin: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
|
||||
.loop-end-safe { margin: 0; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.loop-end-details { display: grid; gap: 10px; }
|
||||
.loop-end-details > summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
|
||||
.loop-end-details > summary { cursor: pointer; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.loop-end-details[open] > summary { margin-bottom: 8px; }
|
||||
.confirm-note > .confirm-note-retry { justify-self: start; }
|
||||
@@ -6,14 +6,11 @@
|
||||
|
||||
.diff-view { --diff-gutter: 3.4em; --diff-sign: 1.6em; min-width: 0; }
|
||||
|
||||
.diff-totals { margin: 0 0 10px; color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
|
||||
.diff-notice {
|
||||
margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--stage); border-radius: 8px;
|
||||
background: var(--stage-soft); color: var(--ink); font-size: 13px;
|
||||
}
|
||||
.diff-totals { margin: 0 0 10px; color: var(--ink-2); font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
|
||||
.diff-notice { margin: 0 0 12px; padding: 8px 12px; font-size: var(--fs-sm); }
|
||||
.diff-plus { color: var(--ok); font-weight: 600; }
|
||||
.diff-minus { color: var(--warn); font-weight: 600; }
|
||||
.diff-counts { display: inline-flex; gap: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
.diff-counts { display: inline-flex; gap: 6px; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
|
||||
|
||||
/* Two columns, each scrolling inside itself: the tab never grows past the
|
||||
window, so the doc's head (with its way back to the sign-off card) stays in
|
||||
@@ -29,20 +26,14 @@
|
||||
}
|
||||
.diff-list:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
||||
.diff-file {
|
||||
display: grid; gap: 2px; padding: 7px 10px; border-radius: calc(var(--radius) / 2); cursor: pointer;
|
||||
display: grid; gap: 2px; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer;
|
||||
}
|
||||
.diff-file:hover { background: var(--panel-2); }
|
||||
.diff-file.is-picked { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
|
||||
.diff-file-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; min-width: 0; }
|
||||
.diff-file-name strong { font-weight: 600; overflow-wrap: anywhere; }
|
||||
.diff-file-dir { color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
|
||||
.diff-status {
|
||||
font: 700 10px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
|
||||
padding: 0 5px; border-radius: 4px; border: 1px solid var(--rule-2); color: var(--ink-2);
|
||||
}
|
||||
.diff-status-added { border-color: var(--ok); color: var(--ok); }
|
||||
.diff-status-deleted { border-color: var(--warn); color: var(--warn); }
|
||||
.diff-status-renamed { border-color: var(--accent); color: var(--accent); }
|
||||
.diff-file-dir { color: var(--ink-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
|
||||
.diff-status { text-transform: uppercase; }
|
||||
|
||||
/* The pane scrolls both ways, so the sideways scrollbar for a long line sits
|
||||
at the bottom of the pane, never under the file's last row. */
|
||||
@@ -58,7 +49,7 @@
|
||||
.diff-pane-path { font-weight: 600; overflow-wrap: anywhere; }
|
||||
|
||||
/* Long lines scroll sideways with the pane, all rows together, never the page. */
|
||||
.diff-rows { display: grid; min-width: 100%; width: max-content; font: 12px/1.55 var(--mono); }
|
||||
.diff-rows { display: grid; min-width: 100%; width: max-content; font: var(--fs-xs)/1.55 var(--mono); }
|
||||
.diff-hunk { padding: 3px 14px; color: var(--ink-3); background: var(--panel-2); white-space: pre; }
|
||||
.diff-line { display: grid; grid-template-columns: var(--diff-gutter) var(--diff-gutter) var(--diff-sign) auto; }
|
||||
.diff-no { text-align: right; padding-right: 8px; color: var(--ink-3); font-variant-numeric: tabular-nums; user-select: none; }
|
||||
@@ -76,14 +67,25 @@
|
||||
.diff-state { padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
|
||||
.diff-state.diff-error { border-color: var(--warn); background: var(--warn-soft); }
|
||||
.diff-state-msg { margin: 0 0 12px; }
|
||||
.diff-state-why { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; }
|
||||
.diff-state-why { margin: 8px 0 0; color: var(--ink-2); font-size: var(--fs-sm); }
|
||||
.diff-state-why:empty { display: none; }
|
||||
|
||||
/* Loading: muted rows where the list and the lines will be. */
|
||||
.diff-skeleton { display: grid; gap: 10px; padding: 14px; }
|
||||
.diff-skel-row { display: block; height: 14px; border-radius: 4px; background: var(--rule); }
|
||||
.diff-skel-row { display: block; height: 14px; border-radius: var(--radius-xs); background: var(--rule); }
|
||||
.diff-pane.diff-skeleton .diff-skel-row:nth-child(3n) { width: 70%; }
|
||||
.diff-pane.diff-skeleton .diff-skel-row:nth-child(4n + 1) { width: 85%; }
|
||||
.doc-skeleton .diff-skel-row:nth-child(3n) { width: 70%; }
|
||||
.doc-skeleton .diff-skel-row:nth-child(4n + 1) { width: 85%; }
|
||||
/* A shimmer only for people who have not asked for less motion. */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.diff-skel-row {
|
||||
background: linear-gradient(90deg, var(--rule) 25%, var(--rule-2) 50%, var(--rule) 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skel-shimmer 1.4s linear infinite;
|
||||
}
|
||||
@keyframes skel-shimmer { to { background-position: -200% 0; } }
|
||||
}
|
||||
|
||||
/* Narrow window: the file list stacks above the diff as a short list. */
|
||||
@media (max-width: 720px) {
|
||||
|
||||
@@ -8,36 +8,34 @@
|
||||
margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule);
|
||||
/* Stays put while the document scrolls under it. The ::before paints over
|
||||
the pane's own padding, so nothing shows through above the row. */
|
||||
position: sticky; top: 0; z-index: 5; background: var(--bg);
|
||||
position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg);
|
||||
}
|
||||
.doc-head::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 24px; background: var(--bg); }
|
||||
.doc-version { font: 700 12px/1 var(--mono); color: var(--ink-3); }
|
||||
.doc-version { font: 700 var(--fs-xs)/1 var(--mono); color: var(--ink-3); }
|
||||
|
||||
.block { max-width: min(var(--card-width), 100%); border-left: 3px solid transparent; padding: 2px 0 2px 14px; margin: 0 auto 4px; position: relative; }
|
||||
.block.assumed {
|
||||
border-left-color: var(--stage);
|
||||
border-left-style: dashed;
|
||||
background: var(--stage-soft);
|
||||
border-radius: 0 8px 8px 0;
|
||||
border-radius: 0 var(--radius-md) var(--radius-md) 0;
|
||||
}
|
||||
.block.draft { border-left-color: var(--rule-2); opacity: 0.72; }
|
||||
.block.settled { border-left-color: var(--ok-soft); }
|
||||
.block.settled { border-left-color: color-mix(in srgb, var(--ok) 45%, transparent); }
|
||||
.block .md { max-width: none; }
|
||||
|
||||
.block-tag {
|
||||
font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
|
||||
color: var(--stage); display: block; margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.doc-empty { color: var(--ink-3); font-style: italic; }
|
||||
|
||||
/* ----------------------------------------------------------- doc tools */
|
||||
|
||||
.doc-tools { display: flex; gap: 8px; margin-left: auto; flex: none; align-items: center; }
|
||||
.btn.back-home { border-color: var(--accent); color: var(--accent); }
|
||||
.btn.back-home:hover { background: var(--accent-soft); }
|
||||
.doc-saved { font-size: 12px; color: var(--ink-3); }
|
||||
.doc-saved code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
|
||||
.doc-saved { font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
.doc-saved code { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); }
|
||||
.doc-head { align-items: center; }
|
||||
|
||||
|
||||
@@ -48,14 +46,10 @@
|
||||
.proto-list { list-style: none; margin: 0 auto; padding: 0; max-width: min(var(--card-width), 100%); display: grid; gap: 8px; }
|
||||
.proto-open {
|
||||
width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
|
||||
padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px;
|
||||
padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
|
||||
background: var(--panel); color: var(--ink); font: inherit; cursor: pointer;
|
||||
}
|
||||
.proto-open:hover, .proto-open:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.proto-kind {
|
||||
flex: none; min-width: 44px; text-align: center; padding: 3px 6px; border-radius: 6px;
|
||||
font: 700 10.5px/1.2 var(--mono); letter-spacing: 0.05em; border: 1px solid var(--rule-2); color: var(--ink-2);
|
||||
}
|
||||
.proto-kind-html { border-color: var(--accent); color: var(--accent); }
|
||||
.proto-kind { flex: none; min-width: 44px; text-align: center; }
|
||||
.proto-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
|
||||
.proto-how { flex: none; font-size: 12px; color: var(--ink-3); }
|
||||
.proto-how { flex: none; font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
/* ----------------------------------------------------------- hand-off */
|
||||
|
||||
/* The end of the session. Accented edge because it is the one card on the
|
||||
page that is not a question and not a note: it is the way out. */
|
||||
/* Accented edge: the one card that is neither question nor note, the way out. */
|
||||
.card.handoff { border-color: var(--accent-line); }
|
||||
|
||||
.handoff-step {
|
||||
@@ -13,8 +12,7 @@
|
||||
border: 1px solid var(--accent-line);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
/* Diagnose's saved write-up, whole, for pasting into a ticket elsewhere. It
|
||||
scrolls past a set height so Next step stays close below it. */
|
||||
/* Diagnose's write-up, for pasting into a ticket; scrolls so Next step stays close. */
|
||||
.handoff-report {
|
||||
margin: 20px 0 0;
|
||||
padding: 14px 18px 16px;
|
||||
@@ -33,19 +31,13 @@
|
||||
|
||||
.handoff-label {
|
||||
margin: 0 0 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
}
|
||||
.handoff-where { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.handoff-where { margin: 0 0 10px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
|
||||
/* The command and its Copy share a row until the row will not take them.
|
||||
The text itself wraps: with the continue-in-the-browser sentence on the end
|
||||
it rarely fits one line, and a sideways scroll would hide exactly the part
|
||||
someone needs to read before pasting. Nobody retypes it; that is what Copy
|
||||
is for. */
|
||||
/* Command and Copy share a row until it is full. The text wraps: it rarely
|
||||
fits one line, and a sideways scroll would hide the part to read before
|
||||
pasting. */
|
||||
.handoff-command {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
@@ -55,34 +47,30 @@
|
||||
.handoff-code {
|
||||
flex: 1 1 260px;
|
||||
min-width: 0;
|
||||
font: 13px/1.5 var(--mono);
|
||||
font: var(--fs-sm)/1.5 var(--mono);
|
||||
color: var(--ink);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
padding: 10px 12px;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
/* Always on show, unlike the Copy on a fenced code block, which waits for a
|
||||
hover it may never get. This one IS the screen's reason to exist. */
|
||||
/* Always visible, unlike a code block's hover-only Copy. */
|
||||
.handoff-copy { flex: none; }
|
||||
.handoff-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
|
||||
.handoff-note { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.handoff-newsession { margin-top: 10px; }
|
||||
/* Continue here sits under the command row: keep a gap so the two do not touch. */
|
||||
/* Gap under the command row. */
|
||||
.continue-offer { margin-top: 14px; }
|
||||
|
||||
/* A session with nothing left to run. Quieter than a real next step: no
|
||||
accented box, plain body text and a small command, because there is
|
||||
nothing they need to do. */
|
||||
/* Nothing left to run: quieter than a next step, no accented box. */
|
||||
.handoff-done { margin: 18px 0 0; color: var(--ink-2); }
|
||||
.handoff-done-text p { margin: 0 0 10px; }
|
||||
.handoff-done .handoff-code { flex-basis: 180px; font-size: 12px; padding: 6px 10px; }
|
||||
.handoff-done .handoff-code { flex-basis: 180px; font-size: var(--fs-xs); padding: 6px 10px; }
|
||||
|
||||
|
||||
/* The review offer on a finished build. Louder than the next step, on
|
||||
purpose: it has to happen here, before they leave, while the next step can
|
||||
wait for a terminal. A solid accent edge and the big button carry that. */
|
||||
/* Review offer on a finished build. Louder than the next step on purpose: it
|
||||
must happen here, while the next step can wait for a terminal. */
|
||||
.review-offer {
|
||||
margin: 20px 0 0;
|
||||
padding: 18px 20px;
|
||||
@@ -90,35 +78,39 @@
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
}
|
||||
.review-offer-title { margin: 0 0 6px; font-size: 18px; }
|
||||
.review-offer-text { margin: 0; color: var(--ink-2); font-size: 14px; }
|
||||
.review-offer-title { margin: 0 0 6px; font-size: var(--fs-h3); }
|
||||
.review-offer-text { margin: 0; color: var(--ink-2); font-size: var(--fs-md); }
|
||||
.review-offer .btn-row { margin-top: 14px; }
|
||||
.review-offer .review-go { padding: 12px 26px; font-size: 15.5px; }
|
||||
.review-offer .review-go { padding: 12px 26px; font-size: var(--fs-h4); }
|
||||
.review-offer .handoff-command { margin-top: 10px; }
|
||||
|
||||
/* The way back to the dashboard on a finished screen. Quieter than the review
|
||||
offer: no box, just the button and a small note about the conversation. */
|
||||
/* Way back to the dashboard: quieter than the review offer, no box. */
|
||||
.dashboard-offer { margin: 20px 0 0; }
|
||||
.dashboard-offer > p:first-child { margin: 0; color: var(--ink-2); font-size: 14px; }
|
||||
.dashboard-offer > p:first-child { margin: 0; color: var(--ink-2); font-size: var(--fs-md); }
|
||||
.dashboard-offer .handoff-command { margin-top: 10px; }
|
||||
.dashboard-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
|
||||
.handoff-fresh { margin: 16px 0 6px; font-size: 12.5px; color: var(--ink-2); }
|
||||
.handoff-fresh-row .handoff-code { flex-basis: 180px; font-size: 12px; padding: 6px 10px; }
|
||||
.dashboard-note { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.handoff-fresh { margin: 16px 0 6px; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.handoff-fresh-row .handoff-code { flex-basis: 180px; font-size: var(--fs-xs); padding: 6px 10px; }
|
||||
|
||||
/* Quick picks under a long multi-select, the review's fix list above all. */
|
||||
/* "Closing or starting fresh": the finish's quiet extras, closed until asked for (open at a red meter). */
|
||||
.handoff-more { margin: 20px 0 0; }
|
||||
.handoff-more-title { cursor: pointer; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.handoff-more-title:hover { color: var(--ink); }
|
||||
.handoff-more > .handoff-guide { margin-top: 12px; }
|
||||
|
||||
/* Quick picks under a long multi-select. */
|
||||
.presets { margin-top: 12px; gap: 8px; }
|
||||
.presets-label { font-size: 12.5px; color: var(--ink-3); }
|
||||
.presets-label { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
|
||||
/* "Before you close this": three rows on every finished screen. The icon sits
|
||||
in a colored circle and the label says the same thing, so no meaning rests
|
||||
on color alone. */
|
||||
/* "Before you close this": three rows. Icon and label say 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);
|
||||
}
|
||||
.handoff-guide-title { margin: 0 0 10px; font: 600 15px/1.3 var(--serif); color: var(--ink); }
|
||||
.handoff-guide-title { margin: 0 0 10px; font: 600 var(--fs-base)/1.3 var(--serif); color: var(--ink); }
|
||||
.handoff-guide-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
|
||||
.handoff-guide-row { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--ink-2); }
|
||||
.handoff-guide-row { display: flex; align-items: flex-start; gap: 12px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.handoff-guide-text { min-width: 0; overflow-wrap: anywhere; }
|
||||
.handoff-guide-label { color: var(--ink); }
|
||||
.handoff-guide-icon {
|
||||
@@ -133,22 +125,18 @@
|
||||
.handoff-tools { margin-top: 16px; }
|
||||
.handoff-unsent {
|
||||
margin: 14px 0 0;
|
||||
padding: 10px 14px;
|
||||
border-radius: 8px;
|
||||
background: var(--stage-soft);
|
||||
color: var(--stage);
|
||||
font-size: 13.5px;
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------- stopping */
|
||||
|
||||
.stop-steps { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 10px; }
|
||||
.stop-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
|
||||
.stop-steps li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.stop-steps li.is-done { color: var(--ink); }
|
||||
.stop-steps li.is-later { color: var(--ink-3); }
|
||||
.stop-steps li.is-stuck { color: var(--stage); }
|
||||
.stop-mark { width: 13px; flex: none; text-align: center; font-weight: 700; }
|
||||
.stop-steps li.is-done .stop-mark { color: var(--ok); }
|
||||
.stop-note { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.stop-note { margin: 0 0 12px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.stopping .handoff-command { margin-bottom: 4px; }
|
||||
|
||||
@@ -2,18 +2,16 @@
|
||||
|
||||
/* ------------------------------------------------------------ git board */
|
||||
|
||||
/* The git workflow's main column holds the board, and the agent's card sits
|
||||
inside it, in the card slot under the tab strip. A card that scrolled inside
|
||||
a scrolling board would put a scrollbar inside a scrollbar, so here the
|
||||
column takes the one scroll and both flow through it at natural height. */
|
||||
/* The agent's card sits in the board's card slot. A card scrolling inside a
|
||||
scrolling board nests scrollbars, so the column takes the one scroll and
|
||||
both flow at natural height. */
|
||||
.main:has(> .git-board) {
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
/* Listed with .is-primary.has-grow too: that rule (a card with a growing note
|
||||
box takes the column's height and shrinks into it) outranks a plain .card
|
||||
here, and a card shrunk under the board spilled its buttons beneath it. */
|
||||
/* .is-primary.has-grow is listed too: it outranks a plain .card, and a card
|
||||
shrunk under the board spilled its buttons beneath it. */
|
||||
.git-cards > .card,
|
||||
.git-cards > .card.is-primary.has-grow,
|
||||
.main:has(> .git-board) > .git-board {
|
||||
@@ -21,15 +19,12 @@
|
||||
overflow-y: visible;
|
||||
min-height: 0;
|
||||
}
|
||||
/* In the board's card slot a card's boxes cannot fill the column (it flows,
|
||||
it does not stretch), so a note box grows with what is typed instead,
|
||||
rather than scrolling inside a 96px box: an auto-height host does for the
|
||||
Markdown field what field-sizing did for the textarea. */
|
||||
/* The card flows rather than stretches, so a note box grows with the text
|
||||
instead of scrolling in a 96px box (an auto-height host, as field-sizing
|
||||
does for a textarea). */
|
||||
.git-cards > .card .md-host { min-height: 0; max-height: 50vh; }
|
||||
/* 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. */
|
||||
/* Auto inline margins shrink a grid item to its content (a short confirm sat
|
||||
narrow mid-board), so in the slot both fill the width; the gap spaces them. */
|
||||
.git-cards > .card,
|
||||
.git-cards > .pager { margin: 0; }
|
||||
.main > .git-board {
|
||||
@@ -41,8 +36,7 @@
|
||||
gap: 14px;
|
||||
max-width: var(--card-width);
|
||||
}
|
||||
/* The board is sized by its column, not the window: the narrow layout keys
|
||||
off the board's own width. */
|
||||
/* Narrow layout keys off the board's width, not the window's. */
|
||||
.git-board { container-type: inline-size; container-name: git-board; }
|
||||
/* Plan2Code's card, between the tab strip and the tab's content. */
|
||||
.git-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
|
||||
@@ -62,24 +56,24 @@
|
||||
gap: 6px;
|
||||
padding: 8px 14px;
|
||||
border: 0;
|
||||
border-bottom: 3px solid transparent;
|
||||
border-radius: 6px 6px 0 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
font: inherit;
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-md);
|
||||
cursor: pointer;
|
||||
}
|
||||
.git-tab:hover { background: var(--panel-2); color: var(--ink); }
|
||||
.git-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
|
||||
.git-tab:hover { color: var(--ink); }
|
||||
.git-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
|
||||
.git-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
|
||||
.git-tab-badge {
|
||||
min-width: 18px;
|
||||
padding: 0 6px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--mono);
|
||||
font-size: 11.5px;
|
||||
font-size: var(--fs-xs);
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
color: var(--ink-2);
|
||||
@@ -92,10 +86,8 @@
|
||||
.git-done:not(:disabled) { border-color: var(--accent); }
|
||||
|
||||
/* The next step: one primary button, at most one quieter one. */
|
||||
.git-step {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
padding: 14px 18px;
|
||||
.git-step { display: grid; gap: 6px; padding: 14px 18px; }
|
||||
.git-step:not(.callout) {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--accent-line);
|
||||
border-left-width: 4px;
|
||||
@@ -103,48 +95,33 @@
|
||||
}
|
||||
.git-step.is-warn { border-color: var(--stage); background: var(--stage-soft); }
|
||||
.git-step.is-calm { border-color: var(--ok); background: var(--ok-soft); }
|
||||
.git-step-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
|
||||
.git-step-kicker { color: var(--ink-2); }
|
||||
.git-step.is-calm .git-step-kicker { color: var(--ok); }
|
||||
.git-step-title, .git-op-title { margin: 0; font: 600 18px/1.25 var(--serif); }
|
||||
.git-step-why, .git-step-label { margin: 0; font-size: 14px; color: var(--ink-2); }
|
||||
.git-step-title, .git-op-title { margin: 0; font: 600 var(--fs-h3)/1.25 var(--serif); }
|
||||
.git-step-why, .git-step-label { margin: 0; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-step-label { font-weight: 600; color: var(--ink); }
|
||||
.git-step-actions, .git-sync-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||
.git-hint {
|
||||
justify-self: start;
|
||||
padding: 8px 12px;
|
||||
border: 1px dashed var(--accent-line);
|
||||
border-radius: var(--radius);
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
font: inherit;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.git-hint:hover { background: var(--accent-soft); }
|
||||
.git-hint:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
|
||||
.git-stale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--stage); }
|
||||
.git-held { font-size: 13.5px; color: var(--ink-2); }
|
||||
.git-hint { justify-self: start; border-style: dashed; font-weight: 400; }
|
||||
.git-stale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-md); color: var(--stage); }
|
||||
.git-held { font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-held .md-p { margin: 0; }
|
||||
.git-wait { margin: 0; font-size: 13.5px; color: var(--stage); }
|
||||
.git-fresh { margin: 0; font-size: 13px; color: var(--ink-3); }
|
||||
.git-wait { margin: 0; font-size: var(--fs-md); color: var(--stage); }
|
||||
.git-fresh { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.git-fresh.is-stale { color: var(--stage); }
|
||||
/* A landed result fills the step strip's place with two zones: the result
|
||||
itself (green, "Just landed") beside the leftover step (muted). The big
|
||||
headline belongs to what happened, not to the work that is not yours. */
|
||||
/* A landed result replaces the step strip with two zones: the result (green)
|
||||
beside the leftover step (muted). The headline goes to what happened. */
|
||||
.git-duo { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; align-items: start; }
|
||||
.git-landed, .git-left { display: grid; gap: 6px; padding: 14px 18px; border-radius: var(--radius); }
|
||||
.git-landed { background: var(--ok-soft); border: 1px solid var(--ok); border-left-width: 4px; }
|
||||
.git-landed .git-step-kicker { color: var(--ok); }
|
||||
.git-landed .git-result-body { font-size: 14px; color: var(--ink-2); }
|
||||
.git-landed .git-result-body { font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-landed .git-result-body .md-p { margin: 0; }
|
||||
.git-left { background: var(--panel-2); border: 1px solid var(--rule-2); }
|
||||
.git-left .git-step-title { font-size: 16px; }
|
||||
.git-left .git-step-title { font-size: var(--fs-h4); }
|
||||
.git-panel-tab { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
|
||||
.git-changes, .git-sync { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
|
||||
.git-sweep-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--ink-2); }
|
||||
.git-sweep-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-pr-open.is-disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
/* The board's header is a section lead, not a card: the framed elements are
|
||||
the agent's card in the slot and the next step under it. */
|
||||
/* The header is a section lead, not a card. */
|
||||
.git-head {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
@@ -152,40 +129,24 @@
|
||||
border-bottom: 1px solid var(--rule);
|
||||
}
|
||||
.git-head-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
|
||||
.git-branch { margin: 0; font: 600 22px/1.2 var(--serif); overflow-wrap: anywhere; }
|
||||
/* The branch name as a link to its host: it reads as the title until hovered. */
|
||||
.git-branch { margin: 0; font: 600 var(--fs-h2)/1.2 var(--serif); overflow-wrap: anywhere; }
|
||||
/* Branch name as a host link: reads as the title until hovered. */
|
||||
.git-branch-link { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 4px; }
|
||||
.git-branch-link::after { content: " ↗"; font: 400 14px/1 var(--mono); color: var(--ink-2); }
|
||||
/* No arrow glyph: the link's title says it opens the remote in the browser. */
|
||||
.git-branch-link:hover, .git-branch-link:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
|
||||
.git-track { font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
|
||||
.git-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.git-track { font-family: var(--mono); font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-noremote { font-weight: 600; color: var(--stage); }
|
||||
/* The ring sits on the first line of a wrapped activity, as the dock's does. */
|
||||
/* Ring on the first line of a wrapped activity, as in the dock. */
|
||||
.git-activity { display: flex; align-items: flex-start; gap: 8px; color: var(--accent); }
|
||||
.git-activity .spinner.tiny { margin-top: 0.25em; }
|
||||
.git-pr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--rule); }
|
||||
.git-pr-open { text-decoration: none; }
|
||||
.git-pr-ask { font-size: 14px; color: var(--ink); }
|
||||
.git-pr-base { font-size: 13.5px; color: var(--ink-2); }
|
||||
.git-pr-base select, .git-field select, .git-field input, .git-search {
|
||||
font: inherit;
|
||||
font-size: 14px;
|
||||
padding: 6px 10px;
|
||||
color: var(--ink);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.git-warn, .git-op {
|
||||
padding: 12px 16px;
|
||||
border: 1px solid var(--warn);
|
||||
border-left-width: 4px;
|
||||
border-radius: var(--radius);
|
||||
background: var(--warn-soft);
|
||||
color: var(--ink);
|
||||
}
|
||||
.git-op { display: grid; gap: 8px; border-color: var(--stage); background: var(--stage-soft); }
|
||||
.git-op-files { margin: 0; padding-left: 20px; font-size: 13.5px; }
|
||||
.git-pr-ask { font-size: var(--fs-md); color: var(--ink); }
|
||||
.git-pr-base { font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-warn, .git-op { padding: 12px 16px; }
|
||||
.git-op { display: grid; gap: 8px; }
|
||||
.git-op-files { margin: 0; padding-left: 20px; font-size: var(--fs-md); }
|
||||
.git-op-left { color: var(--warn); }
|
||||
.git-op-clear { color: var(--ok); }
|
||||
.git-op-actions, .git-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||
@@ -195,10 +156,10 @@
|
||||
border: 1px solid var(--accent-line);
|
||||
border-radius: var(--radius);
|
||||
background: var(--accent-soft);
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
.git-result-body .md-p { margin: 4px 0 0; }
|
||||
/* The result box is the line length here: git's stderr runs the full width. */
|
||||
/* Git's stderr runs the full width. */
|
||||
.git-result-body.md { max-width: none; }
|
||||
.git-panel {
|
||||
display: grid;
|
||||
@@ -209,31 +170,26 @@
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.git-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
|
||||
.git-panel-title { margin: 0; font-size: 16px; }
|
||||
.git-group-title { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
|
||||
.git-panel-title { margin: 0; font-size: var(--fs-h4); }
|
||||
.git-group-title { margin: 4px 0 0; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-field-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
|
||||
.git-field { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
|
||||
.git-field { display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.git-field.is-wide { flex: 1 1 16em; }
|
||||
.git-new-name { font-family: var(--mono); }
|
||||
.git-name-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--ink-2); }
|
||||
.git-name-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.git-name-status.is-free { color: var(--ok); }
|
||||
.git-name-status.is-invalid, .git-name-status.is-nested { color: var(--warn); }
|
||||
.git-name-status.is-local, .git-name-status.is-remote { color: var(--stage); }
|
||||
.git-offer { margin: 0 auto 0 0; font-size: 14px; }
|
||||
.git-sweep { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-family: var(--mono); font-size: 13.5px; }
|
||||
.git-offer { margin: 0 auto 0 0; font-size: var(--fs-md); }
|
||||
.git-sweep { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-family: var(--mono); font-size: var(--fs-md); }
|
||||
.git-ignore { margin-left: 8px; white-space: nowrap; }
|
||||
.git-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
|
||||
.git-search { flex: 1 1 auto; }
|
||||
.git-branches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
|
||||
.git-table-wrap { overflow-x: auto; }
|
||||
.git-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
|
||||
.git-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
|
||||
.git-table th {
|
||||
text-align: left;
|
||||
font-size: 11.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-3);
|
||||
padding: 6px 8px;
|
||||
border-bottom: 1px solid var(--rule);
|
||||
}
|
||||
@@ -241,25 +197,21 @@
|
||||
.git-table tr.is-current td { background: var(--accent-soft); }
|
||||
.git-table tr.is-held td { color: var(--ink-2); }
|
||||
.git-cell-name { overflow-wrap: anywhere; }
|
||||
/* A branch name stays whole beside its badges (feature/export-csv never splits
|
||||
as feature/export- / csv), and the headers stay on one line: a narrow column
|
||||
scrolls the table sideways instead. */
|
||||
/* Branch names never split beside badges, and headers stay on one line: a
|
||||
narrow column scrolls the table sideways. */
|
||||
.git-cell-name .git-name { white-space: nowrap; }
|
||||
.git-table th { white-space: nowrap; }
|
||||
.git-name, .git-path { font-family: var(--mono); }
|
||||
.git-badge { margin-left: 6px; font-size: 10px; padding: 2px 6px; }
|
||||
.git-badge.is-merged { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
|
||||
.git-badge.is-gone, .git-badge.is-held { color: var(--stage); background: var(--stage-soft); border-color: var(--stage); }
|
||||
.git-badge { margin-left: 6px; }
|
||||
.git-cell-track { font-family: var(--mono); white-space: nowrap; color: var(--ink-2); }
|
||||
/* Stacked with blocks, not `display: grid`: a grid <td> stops being a table
|
||||
cell, and its row's separator no longer lines up with the others. */
|
||||
/* Blocks, not `display: grid`: a grid <td> stops being a table cell and its
|
||||
row separator misaligns. */
|
||||
.git-cell-last > span { display: block; }
|
||||
.git-cell-last > .git-by { margin-top: 2px; }
|
||||
.git-by { font-size: 12px; color: var(--ink-3); }
|
||||
.git-by { font-size: var(--fs-xs); color: var(--ink-3); }
|
||||
.git-cell-actions { white-space: nowrap; text-align: right; }
|
||||
.git-cell-actions .btn + .btn { margin-left: 6px; }
|
||||
.git-remote-only summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
|
||||
.git-empty { margin: 0; font-size: 13.5px; color: var(--ink-3); }
|
||||
|
||||
/* Last on purpose: the narrow layout overrides the board rules above it. */
|
||||
@container git-board (max-width: 720px) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
.modal.help[open] { display: flex; }
|
||||
.modal.help .modal-actions { flex: none; margin-top: 16px; align-items: center; }
|
||||
.help-version { margin-right: auto; font-size: 12.5px; color: var(--ink-3); }
|
||||
.help-version { margin-right: auto; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.help-version a { color: inherit; }
|
||||
|
||||
.help-layout {
|
||||
@@ -22,6 +22,12 @@
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
.help-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
|
||||
.help-filter { width: 100%; min-height: 32px; padding: 4px 10px; font: inherit; font-size: var(--fs-md); }
|
||||
.help-filter-empty { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.help-tab-group { margin: 10px 0 2px; padding: 0 13px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
|
||||
.help-tab-group:first-child { margin-top: 0; }
|
||||
.help-tab-group[hidden], .help-tab[hidden] { display: none; }
|
||||
.help-tabs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -37,19 +43,19 @@
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
padding: 8px 10px 8px 13px;
|
||||
border: 0;
|
||||
border-left: 3px solid transparent;
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
font: inherit;
|
||||
font-size: 13.5px;
|
||||
font-size: var(--fs-md);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.help-tab:hover { background: var(--panel-2); color: var(--ink); }
|
||||
.help-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
|
||||
/* The selected bar is an inset shadow, not a border, so it stays straight against the rounded corners. */
|
||||
.help-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
|
||||
.help-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
|
||||
.help-tab-icon {
|
||||
width: 18px;
|
||||
@@ -63,18 +69,18 @@
|
||||
}
|
||||
.help-tab:hover .help-tab-icon { stroke: var(--accent); }
|
||||
|
||||
.help-panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
|
||||
.help-panel h3 { font: 600 18px/1.3 var(--serif); margin: 0 0 12px; color: var(--accent); }
|
||||
.help-panel p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.help-panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
|
||||
.help-panel h3 { font: 600 var(--fs-h3)/1.3 var(--serif); margin: 0 0 12px; color: var(--accent); }
|
||||
.help-panel p { margin: 0 0 12px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.help-panel p:last-child { margin-bottom: 0; }
|
||||
.help-panel strong { color: var(--ink); }
|
||||
.help-panel .help-lead { font-size: 14.5px; color: var(--ink); margin-bottom: 16px; }
|
||||
.help-panel h4 { font: 600 14px/1.35 var(--sans); margin: 18px 0 6px; color: var(--ink); }
|
||||
.help-panel .help-lead { font-size: var(--fs-base); color: var(--ink); margin-bottom: 16px; }
|
||||
.help-panel h4 { font: 600 var(--fs-md)/1.35 var(--sans); margin: 18px 0 6px; color: var(--ink); }
|
||||
.help-panel ul,
|
||||
.help-panel ol { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.help-panel ol { margin: 0 0 12px; padding-left: 20px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.help-panel li { margin-bottom: 5px; }
|
||||
.help-panel li:last-child { margin-bottom: 0; }
|
||||
.help-panel table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.help-panel table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.help-panel th,
|
||||
.help-panel td { border: 1px solid var(--rule); padding: 7px 10px; text-align: left; vertical-align: top; }
|
||||
.help-panel th { background: var(--panel-2); font-weight: 600; color: var(--ink); }
|
||||
@@ -82,7 +88,7 @@
|
||||
font: 0.88em var(--mono);
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-xs);
|
||||
padding: 1px 5px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
@@ -94,17 +100,16 @@
|
||||
.help-panel .help-callout {
|
||||
display: flex; align-items: flex-start; gap: 12px;
|
||||
margin: 0 0 16px; padding: 12px 14px;
|
||||
background: var(--stage-soft); border: 1px solid var(--stage); border-left-width: 4px; border-radius: var(--radius);
|
||||
}
|
||||
.help-callout-icon { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--stage); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.help-panel .help-callout-label { display: block; margin-bottom: 2px; font-size: 14px; color: var(--ink); }
|
||||
.help-panel .help-callout-label { display: block; margin-bottom: 2px; font-size: var(--fs-md); color: var(--ink); }
|
||||
.help-panel .help-callout p { margin: 0; color: var(--ink); }
|
||||
.help-panel ol.help-rows { list-style: none; margin: 0 0 12px; padding: 0; }
|
||||
.help-row { margin: 0 0 8px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--rule); border-radius: var(--radius); }
|
||||
.help-panel .help-row:last-child { margin-bottom: 0; }
|
||||
.help-row dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; }
|
||||
.help-row dt { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-2); padding-top: 1px; }
|
||||
.help-row dd { margin: 0; font-size: 13.5px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
|
||||
.help-row dt { color: var(--ink-2); padding-top: 1px; }
|
||||
.help-row dd { margin: 0; font-size: var(--fs-md); color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
|
||||
@media (max-width: 520px) {
|
||||
.help-row dl { grid-template-columns: 1fr; gap: 0; }
|
||||
.help-row dt { margin-top: 6px; }
|
||||
@@ -113,10 +118,10 @@
|
||||
.help-panel .handoff-command { margin: 0 0 12px; }
|
||||
.help-panel .handoff-command:last-child { margin-bottom: 0; }
|
||||
.help-panel .handoff-code {
|
||||
font: 13px/1.5 var(--mono);
|
||||
font: var(--fs-sm)/1.5 var(--mono);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
@@ -141,13 +146,13 @@
|
||||
theme and the chosen highlight without a line of script. */
|
||||
.help-figure { margin: 4px 0 16px; }
|
||||
.help-figure figcaption,
|
||||
.help-moods-title { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
|
||||
.help-moods-title { display: block; margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.help-diagram { display: block; width: 100%; max-width: 560px; height: auto; margin: 8px 0 4px; }
|
||||
.hd-box { fill: var(--panel-2); stroke: var(--rule-2); stroke-width: 1.2; }
|
||||
.hd-line { fill: none; stroke: var(--ink-3); stroke-width: 1.4; }
|
||||
.hd-dash { stroke-dasharray: 4 4; }
|
||||
.hd-label { fill: var(--ink); font: 13px var(--sans); }
|
||||
.hd-label.small { fill: var(--ink-2); font-size: 12px; }
|
||||
.hd-label { fill: var(--ink); font: var(--fs-sm) var(--sans); }
|
||||
.hd-label.small { fill: var(--ink-2); font-size: var(--fs-xs); }
|
||||
.hd-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
|
||||
.hd-label.hd-accent { fill: var(--accent); stroke: none; font-weight: 600; }
|
||||
.hd-flow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 10; stroke-linecap: round; }
|
||||
@@ -160,7 +165,7 @@
|
||||
}
|
||||
.help-mood { display: flex; flex-direction: column; align-items: center; gap: 6px; }
|
||||
.help-mood-bot { width: 40px; height: 56px; }
|
||||
.help-mood span { font-size: 12.5px; color: var(--ink-2); text-align: center; }
|
||||
.help-mood span { font-size: var(--fs-sm); color: var(--ink-2); text-align: center; }
|
||||
|
||||
/* 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.
|
||||
@@ -173,20 +178,20 @@
|
||||
@media (max-width: 720px) {
|
||||
.help-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 12px; }
|
||||
.help-tabs { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0 0 4px; }
|
||||
.help-tab-group { display: none; }
|
||||
.help-tab {
|
||||
width: auto;
|
||||
flex: none;
|
||||
white-space: nowrap;
|
||||
border-left: 0;
|
||||
border-bottom: 3px solid transparent;
|
||||
border-radius: 6px 6px 0 0;
|
||||
padding-left: 10px;
|
||||
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
|
||||
}
|
||||
.help-tab[aria-selected="true"] { border-bottom-color: var(--accent); }
|
||||
.help-tab[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--accent); }
|
||||
}
|
||||
|
||||
.about-live {
|
||||
padding: 9px 12px;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--rule);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/* Learning on the dashboard: the slim row (screens/learning-row.js) and the
|
||||
waiting banner. From the saved prototype's variant A
|
||||
(specs/project-learning/prototypes/learning-row.html), on the page's own
|
||||
tokens: the prototype's hold color is --stage, its border --rule. */
|
||||
waiting banner. Hold color is --stage, border --rule. */
|
||||
|
||||
/* The row. Under the spec picker while it needs the person (not set up, off,
|
||||
/* The row: under the spec picker while it needs the person (not set up, off,
|
||||
paused); after the last card group while on. */
|
||||
.learn-row { position: relative; }
|
||||
.learn-row.is-top { margin: 0 0 22px; }
|
||||
@@ -16,32 +14,19 @@
|
||||
padding: 8px 12px;
|
||||
border-top: 1px solid var(--rule);
|
||||
border-bottom: 1px solid var(--rule);
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-md);
|
||||
color: var(--ink);
|
||||
}
|
||||
/* Paused for you: the amber tint, so a paused person sees it at a glance. */
|
||||
/* Paused: amber tint, visible at a glance. */
|
||||
.learn-row.is-paused .learn-line {
|
||||
background: var(--stage-soft);
|
||||
border: 1px solid var(--stage);
|
||||
border-radius: calc(var(--radius) * 0.7);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
.learn-label { font-weight: 650; }
|
||||
.learn-pill {
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
padding: 2px 8px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 999px;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.learn-pill.is-on { color: var(--accent); border-color: var(--accent); }
|
||||
.learn-pill.is-hold { color: var(--stage); border-color: var(--stage); }
|
||||
.learn-label { font-weight: 600; }
|
||||
.learn-say { flex: 1 1 14em; min-width: 0; color: var(--ink-3); }
|
||||
.learn-row.is-paused .learn-say { color: var(--ink); }
|
||||
.learn-controls { margin-left: auto; display: flex; align-items: center; gap: 12px; }
|
||||
.learn-controls .btn { margin: 0; }
|
||||
|
||||
/* Pause for me: a sliding switch. Amber while paused. */
|
||||
.learn-switch {
|
||||
@@ -63,7 +48,7 @@
|
||||
width: 34px;
|
||||
height: 20px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 999px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--rule-2);
|
||||
}
|
||||
@@ -76,15 +61,15 @@
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
background: var(--ink-3);
|
||||
transition: left 0.15s ease;
|
||||
transition: transform var(--dur-1);
|
||||
}
|
||||
.learn-switch.is-on .learn-track { background: var(--stage); border-color: var(--stage); }
|
||||
.learn-switch.is-on .learn-track::after { left: 16px; background: var(--panel); }
|
||||
.learn-switch.is-on .learn-track::after { transform: translateX(14px); background: var(--panel); }
|
||||
.learn-switch:hover:not(:disabled) .learn-track { border-color: var(--accent); }
|
||||
|
||||
.learn-link {
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
min-height: 24px;
|
||||
padding: 0 4px;
|
||||
background: none;
|
||||
@@ -96,14 +81,14 @@
|
||||
.learn-link:hover { text-decoration-thickness: 2px; }
|
||||
.learn-switch:focus-visible,
|
||||
.learn-link:focus-visible,
|
||||
.learn-more-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
||||
.learn-more-item:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
|
||||
/* More: at the bottom of the page, so it opens upward. */
|
||||
.learn-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 100%;
|
||||
z-index: 5;
|
||||
z-index: var(--z-sticky);
|
||||
min-width: 17em;
|
||||
margin: 0 0 4px;
|
||||
padding: 4px;
|
||||
@@ -111,100 +96,88 @@
|
||||
text-align: left;
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: calc(var(--radius) * 0.7);
|
||||
box-shadow: var(--shadow);
|
||||
font-size: 13.5px;
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-2);
|
||||
font-size: var(--fs-md);
|
||||
color: var(--ink);
|
||||
}
|
||||
.learn-more[hidden] { display: none; }
|
||||
.learn-more-item { padding: 7px 10px; border-radius: calc(var(--radius) * 0.5); cursor: pointer; }
|
||||
.learn-more-item { padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; }
|
||||
.learn-more-item:hover,
|
||||
.learn-more-item:focus { background: var(--accent-soft); outline: none; }
|
||||
.learn-more-item:focus { background: var(--accent-soft); }
|
||||
.learn-more-item.is-danger { color: var(--warn); border-top: 1px solid var(--rule); border-top-left-radius: 0; border-top-right-radius: 0; }
|
||||
.learn-more-item[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
|
||||
.learn-more-item[aria-disabled="true"]:hover { background: none; }
|
||||
|
||||
/* Lessons waiting: the banner nearest the title, in the accent tint. */
|
||||
.dash-nudge.learn-banner { border-left-width: 4px; }
|
||||
.learn-banner .btn { margin: 0 0 0 auto; }
|
||||
.learn-banner .btn { margin-left: auto; }
|
||||
|
||||
/* Open the lessons: each file under its own name. */
|
||||
.learn-lessons-file + .learn-lessons-file { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
|
||||
.learn-lessons-name { margin: 0 0 6px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
|
||||
.learn-lessons-name { margin: 0 0 6px; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
|
||||
/* The lessons card (screens/cards.js buildLessons): one block per waiting
|
||||
item, each with its own choices and nothing chosen at first. */
|
||||
.lessons-opening { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-3); }
|
||||
/* The lessons card (cards.js buildLessons): one block per item, none chosen at first. */
|
||||
.lessons-opening { margin: 14px 0 0; font-size: var(--fs-md); color: var(--ink-3); }
|
||||
.lessons-rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
|
||||
.lessons-row {
|
||||
padding: 12px 14px;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: calc(var(--radius) * 0.7);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--panel);
|
||||
}
|
||||
.lessons-row.is-chosen { border-color: var(--accent); }
|
||||
.lessons-row p { margin: 0 0 6px; }
|
||||
.lessons-heading { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
|
||||
.lessons-heading { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
|
||||
.lessons-text { font-weight: 600; color: var(--ink); }
|
||||
.lessons-why,
|
||||
.lessons-found { font-size: 13.5px; color: var(--ink-2); }
|
||||
.lessons-found { font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.lessons-origin,
|
||||
.lessons-note { font-size: 12.5px; color: var(--ink-3); }
|
||||
.lessons-fix-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
|
||||
.lessons-note { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.lessons-fix blockquote {
|
||||
margin: 0 0 8px;
|
||||
padding: 6px 10px;
|
||||
border-left: 3px solid var(--rule-2);
|
||||
font-family: var(--mono);
|
||||
font-size: 12.5px;
|
||||
font-size: var(--fs-sm);
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.lessons-fix .lessons-after { border-left-color: var(--accent); }
|
||||
.lessons-become { margin: 0 0 6px; padding-left: 18px; font-size: 13.5px; }
|
||||
.lessons-become { margin: 0 0 6px; padding-left: 18px; font-size: var(--fs-md); }
|
||||
/* Flagged and refused: said in words, not only in color. */
|
||||
.lessons-flag,
|
||||
.lessons-refused {
|
||||
padding: 5px 9px;
|
||||
border-radius: calc(var(--radius) * 0.5);
|
||||
font-size: 13px;
|
||||
background: var(--stage-soft);
|
||||
color: var(--ink);
|
||||
}
|
||||
.lessons-refused { background: var(--warn-soft); color: var(--warn); }
|
||||
.lessons-refused { padding: 5px 9px; font-size: var(--fs-sm); }
|
||||
.lessons-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
||||
.lessons-choices .btn { margin: 0; }
|
||||
.lessons-edit { margin-top: 10px; display: grid; gap: 8px; }
|
||||
.lessons-field { margin: 0; }
|
||||
.lessons-input,
|
||||
.lessons-select { width: 100%; box-sizing: border-box; }
|
||||
.lessons-error { margin: 10px 0 0; }
|
||||
.lessons-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
|
||||
.lessons-summary { margin: 0; font-size: 13.5px; color: var(--ink-2); }
|
||||
.lessons-foot .btn { margin: 0 0 0 auto; }
|
||||
.lessons-summary { margin: 0; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.lessons-foot .btn { margin-left: auto; }
|
||||
.lessons-first-lesson {
|
||||
margin: 14px 0 0;
|
||||
padding: 12px 14px;
|
||||
border-left: 4px solid var(--accent);
|
||||
background: var(--accent-soft);
|
||||
border-radius: calc(var(--radius) * 0.5);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.lessons-first-lesson p { margin: 0 0 4px; }
|
||||
.lessons-first-about { margin: 12px 0 0; }
|
||||
.lessons-later { margin-top: 8px; }
|
||||
|
||||
/* Review from the dashboard: the same card in a dialog over the menu. Sized
|
||||
like the Notebook dialog; max-width: none lifts the base .modal 440px cap. */
|
||||
/* Review: the same card in a dialog, sized like the Notebook; max-width: none
|
||||
lifts the base .modal 440px cap. */
|
||||
.modal.lessons-dialog { width: min(1200px, 90vw); max-width: none; }
|
||||
.lessons-dialog .card { margin: 0; box-shadow: none; border: 0; padding: 0; max-width: none; }
|
||||
|
||||
/* The lessons dialog: closable (the corner ×, Not now, Escape), and locked
|
||||
while Save lessons goes. */
|
||||
/* Closable (corner x, Not now, Escape), locked while saving. */
|
||||
.lessons-dialog .modal-actions { align-items: center; justify-content: flex-end; }
|
||||
.lessons-dialog .modal-actions .btn { margin: 0; }
|
||||
.lessons-suggestions { flex: 1 1 100%; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: calc(var(--radius) * 0.5); }
|
||||
.lessons-suggestions h3 { margin: 0 0 6px; font-size: 13.5px; }
|
||||
.lessons-suggestions .md { max-height: 40vh; overflow: auto; font-size: 13.5px; }
|
||||
.lessons-suggestions { flex: 1 1 100%; }
|
||||
.lessons-suggestions h3 { margin: 0 0 6px; font-size: var(--fs-md); }
|
||||
.lessons-suggestions .md { max-height: 40vh; overflow: auto; font-size: var(--fs-md); }
|
||||
.lessons-dialog .modal-actions { flex-wrap: wrap; }
|
||||
.lessons-dialog .modal-actions .btn .spinner { margin-right: 8px; }
|
||||
.modal-x {
|
||||
@@ -216,25 +189,24 @@
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
font-size: 22px;
|
||||
font-size: var(--fs-h2);
|
||||
line-height: 1;
|
||||
color: var(--ink-3);
|
||||
background: none;
|
||||
border: 0;
|
||||
border-radius: calc(var(--radius) * 0.5);
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
}
|
||||
.modal-x:hover:not(:disabled),
|
||||
.modal-x:focus-visible { color: var(--ink); background: var(--panel-2); }
|
||||
.modal-x:disabled { opacity: 0.4; cursor: default; }
|
||||
.lessons-dialog.is-saving .card { opacity: 0.6; }
|
||||
.lessons-unsaved { flex: 1 1 100%; padding: 10px 12px; border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: calc(var(--radius) * 0.5); }
|
||||
.lessons-unsaved { flex: 1 1 100%; }
|
||||
.lessons-unsaved .modal-actions { flex-wrap: wrap; }
|
||||
.lessons-unsaved .btn { white-space: nowrap; }
|
||||
.lessons-unsaved-text { margin: 0 0 8px; font-size: 13.5px; color: var(--ink); }
|
||||
.lessons-unsaved-text { margin: 0 0 8px; font-size: var(--fs-md); color: var(--ink); }
|
||||
|
||||
/* Switching Learning on or off, opening Review, saving: shown the moment the
|
||||
button is pressed. */
|
||||
/* Shown the moment a Learning, Review or save button is pressed. */
|
||||
.learn-busy { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); }
|
||||
.learn-banner.is-busy .dash-nudge-text { display: inline-flex; align-items: center; gap: 8px; }
|
||||
.learn-row.is-busy .learn-pill { opacity: 0.6; }
|
||||
@@ -2,41 +2,35 @@
|
||||
|
||||
/* ------------------------------------------------------- looks button */
|
||||
|
||||
/* The top bar's tools: one group at the right edge. */
|
||||
.topbar-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
|
||||
.icon-btn {
|
||||
appearance: none;
|
||||
flex: none;
|
||||
margin-left: 14px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-btn:hover { background: var(--panel-2); border-color: var(--rule); }
|
||||
/* One icon set: 24-unit drawings, a 1.8 stroke, round caps and joins, one ink
|
||||
color at rest and the highlight on hover. The top bar buttons (here) and
|
||||
the second row's buttons (below) share it. */
|
||||
.icon-btn svg { width: 22px; height: 22px; }
|
||||
.icon-btn .ab-ring { fill: none; stroke: var(--ink-3); stroke-width: 1.4; }
|
||||
.icon-btn .ab-mark { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; }
|
||||
.icon-btn .ab-dot { fill: var(--ink-2); }
|
||||
.icon-btn:hover .ab-ring { stroke: var(--accent); }
|
||||
.icon-btn:hover .ab-mark, .icon-btn:hover .ab-dot { stroke: var(--accent); fill: none; }
|
||||
.icon-btn:hover .ab-dot { fill: var(--accent); }
|
||||
.icon-btn svg * { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.icon-btn svg .ab-dot, .icon-btn svg .dc-pip { fill: var(--ink-2); stroke: none; }
|
||||
.icon-btn:hover svg * { stroke: var(--accent); }
|
||||
.icon-btn:hover svg .ab-dot, .icon-btn:hover svg .dc-pip { fill: var(--accent); stroke: none; }
|
||||
|
||||
a.icon-btn { box-sizing: border-box; text-decoration: none; }
|
||||
/* A link in a dialog (the update modal's release, Help's version) keeps the
|
||||
accent once visited: the browser's purple is unreadable on the dark theme. */
|
||||
.modal a:not(.btn), .modal a:not(.btn):visited { color: var(--accent); }
|
||||
.icon-btn .mg-body { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linejoin: round; }
|
||||
.icon-btn .mg-line { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.icon-btn:hover .mg-body, .icon-btn:hover .mg-line { stroke: var(--accent); }
|
||||
|
||||
.icon-btn .gr-teeth { fill: none; stroke: var(--ink-3); stroke-width: 2.2; }
|
||||
.icon-btn .gr-ring { fill: none; stroke: var(--ink-3); stroke-width: 1.6; }
|
||||
.icon-btn .gr-hub { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
|
||||
.icon-btn:hover .gr-teeth, .icon-btn:hover .gr-ring, .icon-btn:hover .gr-hub { stroke: var(--accent); }
|
||||
|
||||
/* ------------------------------------------------------------ swatches */
|
||||
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
/* `hidden` loses to the display above without this (agent-less sessions hide it). */
|
||||
.notepad-btn[hidden] { display: none; }
|
||||
.btn.notepad-btn { padding: 0 8px; align-self: stretch; }
|
||||
.notepad-btn .notepad-label { font-size: 13px; line-height: 1; }
|
||||
.notepad-btn .notepad-label { font-size: var(--fs-sm); line-height: 1; }
|
||||
.notepad-btn .np-band { fill: var(--ink-2); stroke: none; }
|
||||
.notepad-btn:hover:not(:disabled) .np-band { fill: var(--accent); }
|
||||
.notepad-btn:disabled .np-band { fill: var(--ink-3); }
|
||||
.notepad-btn svg { width: 16px; height: 16px; display: block; }
|
||||
.notepad-btn .np-page,
|
||||
.notepad-btn .np-ring,
|
||||
.notepad-btn .np-line { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-linecap: round; }
|
||||
.notepad-btn .np-page { stroke-width: 1.3; }
|
||||
.notepad-btn .np-line { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.notepad-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-line); }
|
||||
.notepad-btn:hover:not(:disabled) .np-page,
|
||||
.notepad-btn:hover:not(:disabled) .np-ring,
|
||||
@@ -23,8 +22,7 @@
|
||||
.notepad-btn:disabled .np-ring,
|
||||
.notepad-btn:disabled .np-line { stroke: var(--ink-3); }
|
||||
|
||||
/* The Notebook dialog: large, with the editor taking whatever height the
|
||||
title, the pictures and the actions leave. Only the editor scrolls. */
|
||||
/* The dialog: the editor takes the height left over and alone scrolls. */
|
||||
.modal.notepad {
|
||||
width: min(1200px, 90vw);
|
||||
height: min(900px, 85vh);
|
||||
@@ -46,12 +44,10 @@
|
||||
}
|
||||
.notepad-editor:focus-within { border-color: var(--accent-line); }
|
||||
/* The open tab's last send from the dashboard, muted under the editor. */
|
||||
.notepad-sent { flex: none; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
|
||||
.notepad-sent { flex: none; margin: 6px 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.notepad-sent[hidden] { display: none; }
|
||||
/* The pictures under the editor: the Add image button, then the thumbnails,
|
||||
wrapping. Capped at two rows, so 200 pictures never squeeze the editor
|
||||
away; the strip scrolls instead. The whole region lights while pictures are
|
||||
dragged over the dialog. */
|
||||
/* Add image, then wrapping thumbnails. Capped at two rows so many pictures
|
||||
never squeeze the editor; the strip scrolls. Lights up on drag-over. */
|
||||
.notepad-images {
|
||||
flex: none;
|
||||
display: flex;
|
||||
@@ -60,7 +56,7 @@
|
||||
margin-top: 12px;
|
||||
padding: 6px;
|
||||
border: 1px dashed transparent;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
.notepad-add { flex: none; }
|
||||
.notepad-strip {
|
||||
@@ -80,25 +76,23 @@
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
/* One thumbnail: the picture is a button that opens the picview (the shared
|
||||
.attach-open in shell.css), with the tray's round X in its corner, and the
|
||||
inline delete question or the upload state laid over it. */
|
||||
/* A thumbnail: a button opening the picview (shared .attach-open), with a
|
||||
round X, and the delete question or upload state overlaid. */
|
||||
.notepad-thumb.attach-thumb { width: 88px; height: 88px; }
|
||||
.notepad-thumb .attach-overlay p { margin: 0; padding: 0 4px; }
|
||||
.notepad-thumb .attach-overlay .btn.tiny { margin: 0; padding: 1px 6px; font-size: 10.5px; }
|
||||
.notepad-thumb .attach-overlay .btn.xs { padding: 1px 6px; font-size: var(--fs-2xs); }
|
||||
.notepad-ask {
|
||||
background: color-mix(in srgb, var(--panel) 92%, transparent);
|
||||
color: var(--ink); font-size: 10.5px; font-weight: 600; text-align: center;
|
||||
color: var(--ink); font-size: var(--fs-2xs); font-weight: 600; text-align: center;
|
||||
}
|
||||
.notepad-ask-row { display: flex; gap: 4px; }
|
||||
|
||||
.modal.notepad .modal-actions { flex: none; align-items: center; margin-top: 14px; }
|
||||
.notepad-status { margin: 0 auto 0 0; min-height: 1.4em; font-size: 12.5px; color: var(--ink-3); }
|
||||
.notepad-status { margin: 0 auto 0 0; min-height: 1.4em; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.notepad-status.is-problem { color: var(--warn); }
|
||||
|
||||
/* The tab bar: a scrolling row of tabs, each its name and an x, with the
|
||||
current one marked, then New tab. A double-click renames, the x deletes and
|
||||
a drag moves; the questions open in the small dialogs below. */
|
||||
/* Scrolling tab row, then New tab. Double-click renames, x deletes, drag
|
||||
moves; questions open in the small dialogs below. */
|
||||
.notepad-tabbar { flex: none; display: flex; align-items: flex-end; gap: 8px; margin-bottom: -1px; position: relative; z-index: 1; }
|
||||
.notepad-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 0; }
|
||||
.notepad-tabwrap {
|
||||
@@ -107,7 +101,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px 8px 0 0;
|
||||
border-radius: var(--radius-md) var(--radius-md) 0 0;
|
||||
background: var(--panel-2);
|
||||
color: var(--ink-2);
|
||||
}
|
||||
@@ -126,7 +120,7 @@
|
||||
background: none;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.2;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
@@ -134,19 +128,7 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
.notepad-tab[aria-selected="true"] { font-weight: 600; }
|
||||
.notepad-sent-badge {
|
||||
flex: none;
|
||||
margin: 0 2px 0 2px;
|
||||
padding: 1px 5px;
|
||||
border: 1px solid var(--accent-line);
|
||||
border-radius: 999px;
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
font-size: 10.5px;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.notepad-sent-badge { flex: none; margin: 0 2px; }
|
||||
.notepad-tab-x {
|
||||
flex: none;
|
||||
width: 20px;
|
||||
@@ -154,11 +136,11 @@
|
||||
margin-right: 6px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-xs);
|
||||
background: none;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: 16px;
|
||||
font-size: var(--fs-h4);
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
@@ -169,36 +151,25 @@
|
||||
.notepad-tab-x:hover { background: var(--panel); color: var(--warn); }
|
||||
.notepad-tab:focus-visible,
|
||||
.notepad-tab-x:focus-visible,
|
||||
.notepad-tab-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.notepad-tab-new:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
.notepad-tabwrap:has(.is-dragging) { opacity: 0.5; }
|
||||
.notepad-tabwrap:has(.is-drop-before) { box-shadow: -3px 0 0 0 var(--accent); }
|
||||
.notepad-tabs.is-drop-end { box-shadow: inset -3px 0 0 0 var(--accent); }
|
||||
.notepad-tab-new { flex: none; margin-bottom: 4px; }
|
||||
|
||||
/* The name and delete questions: small dialogs over the Notebook, never a
|
||||
browser prompt. The empty state sits where the editor would. */
|
||||
/* Name and delete questions: small dialogs, never a browser prompt. */
|
||||
.notepad-empty {
|
||||
flex: none;
|
||||
margin: 0 0 10px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--panel-2);
|
||||
}
|
||||
.notepad-empty[hidden] { display: none; }
|
||||
.modal.notepad-sub { width: min(420px, calc(100vw - 32px)); }
|
||||
.modal.notepad-sub h2 { margin: 0 0 10px; }
|
||||
.notepad-name-form input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 6px 8px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 6px;
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
}
|
||||
.notepad-name-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
|
||||
.notepad-name-form input { display: block; }
|
||||
.notepad-name-count { margin: 4px 0 0; text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.notepad-name-count.over { color: var(--warn); }
|
||||
.notepad-name-error { min-height: 1.2em; margin: 6px 0 0; }
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,14 +2,12 @@
|
||||
|
||||
/* ---------------------------------------------------------- the flight
|
||||
|
||||
While Plan2Code is thinking, stars stream past and Planny leans into it:
|
||||
tilted forward, bobbing, with speed lines behind him. The motion belongs to
|
||||
him, so it reads as "he is off working on it" rather than as a background
|
||||
effect. Chosen from ten prototypes (prototypes/thinking-starfield.html).
|
||||
While Plan2Code is thinking, stars stream past and Planny leans in, bobbing,
|
||||
with speed lines behind him, so it reads as "he is off working on it", not
|
||||
as a background effect.
|
||||
|
||||
The flight and the spinner are one signal: every line that turns the ring
|
||||
also flies. Every other state keeps the dock still, so the motion itself
|
||||
carries meaning. */
|
||||
also flies. Every other state keeps the dock still. */
|
||||
|
||||
.sky {
|
||||
position: absolute;
|
||||
@@ -24,9 +22,7 @@
|
||||
.dock.is-flying .sky { opacity: 0.85; }
|
||||
|
||||
/* Each star rides a track as wide as the dock and moves by a percentage of
|
||||
it, so the field fills whatever width the dock has: 250px, 210px on a
|
||||
narrower window, the full width on a phone. The dot sits at the track's
|
||||
right-hand end. */
|
||||
it, so the field fills any dock width. The dot sits at the track's right end. */
|
||||
.sky .star {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -58,12 +54,11 @@
|
||||
50% { transform: translateY(-3px) rotate(6deg); }
|
||||
}
|
||||
|
||||
/* Speed lines, trailing off his back. Hung off Planny rather than off the
|
||||
dock, so they follow him into the phone layout, where he sits beside the
|
||||
text instead of above it. */
|
||||
/* Speed lines off his back. Hung off Planny, not the dock, so they follow him
|
||||
into the phone layout, where he sits beside the text. */
|
||||
.trail { position: absolute; right: 100%; top: 0; width: 40px; height: 100%; margin-right: 4px; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
|
||||
.dock.is-flying .trail { opacity: 1; }
|
||||
.trail i { position: absolute; right: 0; height: 1.5px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--ink-3)); }
|
||||
.trail i { position: absolute; right: 0; height: 1.5px; border-radius: var(--radius-xs); background: linear-gradient(90deg, transparent, var(--ink-3)); }
|
||||
.trail i:nth-child(1) { top: 38%; width: 26px; }
|
||||
.trail i:nth-child(2) { top: 52%; width: 36px; }
|
||||
.trail i:nth-child(3) { top: 66%; width: 22px; }
|
||||
@@ -75,12 +70,12 @@
|
||||
to { transform: translateX(-22px); opacity: 0; }
|
||||
}
|
||||
|
||||
/* The line under him stays readable with stars passing behind it. */
|
||||
/* Keeps his line readable over passing stars. */
|
||||
.dock.is-flying .dock-say { text-shadow: 0 0 3px var(--panel-2), 0 0 6px var(--panel-2), 0 0 10px var(--panel-2); }
|
||||
|
||||
.dock-say {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
font-size: var(--fs-sm);
|
||||
line-height: 1.45;
|
||||
color: var(--ink-2);
|
||||
text-wrap: balance;
|
||||
@@ -88,10 +83,9 @@
|
||||
|
||||
/* ------------------------------------------------------------ Planny */
|
||||
|
||||
/* The mascot is the page's state, not decoration on top of it: his star eye
|
||||
lights up when something is yours and turns while the agent works, his arms
|
||||
take a pose for each mood, and he fades and shuts his eye when the
|
||||
connection drops. One class from app.js switches all of it. */
|
||||
/* The mascot is the page's state: his star eye lights when something is yours
|
||||
and turns while the agent works, his arms pose per mood, and he fades with
|
||||
his eye shut when the connection drops. One class from app.js switches it. */
|
||||
.planny { width: 46px; height: 63px; flex: none; overflow: visible; }
|
||||
|
||||
.planny .shell,
|
||||
@@ -103,7 +97,7 @@
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
/* The mouth is a lip, not a grin: at the body's own 1.3 it reads as lipstick. */
|
||||
/* Thinner than the body's 1.3, which reads as lipstick. */
|
||||
.planny .smile { stroke-width: 0.9; }
|
||||
.planny .arm path { stroke-width: 1.2; }
|
||||
.planny .arm circle,
|
||||
@@ -120,10 +114,9 @@
|
||||
animation: planny-blink 6.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* Arms: one set per mood, and only that set shows. Moods without a set of
|
||||
their own (happy) keep the resting arms; adrift has none at all, which is
|
||||
most of what makes him look lost. Arms that move pivot at the shoulder, so
|
||||
they carry view-box origins rather than their own boxes. */
|
||||
/* Arms: one set per mood, only that set shows. Moods without one (happy) keep
|
||||
the resting arms; adrift has none, which makes him look lost. Moving arms
|
||||
pivot at the shoulder, so they use view-box origins. */
|
||||
.planny .arms { display: none; }
|
||||
.planny .a-rest { display: inline; }
|
||||
.planny:is(.is-point, .is-work, .is-done, .is-gone, .is-adrift, .is-setup) .a-rest { display: none; }
|
||||
@@ -154,11 +147,11 @@
|
||||
@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 color, a wave. */
|
||||
/* Yours to do: star lit, a wave. */
|
||||
.planny.is-point { animation: planny-lean 2.6s ease-in-out infinite; }
|
||||
.planny.is-point .eye { fill: var(--accent); }
|
||||
|
||||
/* The agent has it: the star turns, arms pump and his feet walk on the spot. */
|
||||
/* The agent has it: star turns, arms pump, feet walk in place. */
|
||||
.planny.is-work .eye { fill: var(--accent); animation: planny-spin 2.6s linear infinite; }
|
||||
.planny.is-work .foot.f1 { animation: foot-step-a 0.7s ease-in-out infinite; }
|
||||
.planny.is-work .foot.f2 { animation: foot-step-b 0.7s ease-in-out infinite; }
|
||||
@@ -166,16 +159,13 @@
|
||||
/* Nothing outstanding. */
|
||||
.planny.is-happy .eye { fill: var(--ok); }
|
||||
|
||||
/* 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. Gray, still, and no arms: he has nothing to
|
||||
do with them until someone answers. */
|
||||
/* The server is up but nothing answers at the other end. Not the `gone` look:
|
||||
this page works fine. Gray, still, no arms until someone answers. */
|
||||
.planny.is-adrift .eye { fill: var(--ink-3); animation: none; }
|
||||
.planny.is-adrift .smile { opacity: 0.6; }
|
||||
|
||||
/* Finished. Settled rather than switched off: green star, arms up, eye open.
|
||||
The `gone` look below would be wrong here -- the server IS about to go away,
|
||||
and a faded Planny with his eye shut reads as a breakage. */
|
||||
/* Finished: green star, arms up, eye open. Not `gone`: a faded Planny with
|
||||
his eye shut reads as a breakage. */
|
||||
.planny.is-done .eye { fill: var(--ok); animation: none; }
|
||||
.planny.is-done .smile { stroke-width: 1.5; }
|
||||
|
||||
@@ -183,21 +173,18 @@
|
||||
.planny.is-gone { opacity: 0.5; }
|
||||
.planny.is-gone .eye { fill: var(--warn); animation: none; transform: scaleY(0.12); }
|
||||
|
||||
/* The setup page, waiting on a pick: the point look without the work
|
||||
spinner -- a friendly lean and wave, star lit, while nothing runs yet. */
|
||||
/* The setup page, waiting on a pick: the point look, nothing running yet. */
|
||||
.planny.is-setup { animation: planny-lean 2.6s ease-in-out infinite; }
|
||||
.planny.is-setup .eye { fill: var(--accent); }
|
||||
|
||||
/* ------------------------------------------------------ mood variants
|
||||
|
||||
Each mood above is a family, not a single drawing: app.js rolls a v0/v1/v2
|
||||
every time the mood CHANGES, so "your turn" does not look identical every
|
||||
time it comes around. v0 is always the plain version written above; the
|
||||
variants below are the alternates. Rules stay on the parts (arms, eye,
|
||||
feet) rather than on the svg where a variant can help it, so the flight
|
||||
transform can keep owning the svg itself while the agent works. */
|
||||
app.js rolls a v0/v1/v2 each time the mood CHANGES, so "your turn" does not
|
||||
always look the same. v0 is the plain version above. Rules stay on the
|
||||
parts (arms, eye, feet) where possible, so the flight transform keeps
|
||||
owning the svg while the agent works. */
|
||||
|
||||
/* Parts only the alternates use. Hidden here, woken by the variant. */
|
||||
/* Parts only the variants use; hidden until woken. */
|
||||
.planny .spark { opacity: 0; }
|
||||
.planny .spark path {
|
||||
fill: var(--accent);
|
||||
@@ -256,17 +243,16 @@
|
||||
}
|
||||
|
||||
/* point -- something is yours to do. */
|
||||
/* v1: an eager little hop while he waves. */
|
||||
/* v1: a little hop while he waves. */
|
||||
.planny.is-point.v1 { animation: planny-float 1.4s ease-in-out infinite; }
|
||||
/* v2: still leaning, but his star darts like he is pointing things out. */
|
||||
/* v2: leaning, star darting as if pointing things out. */
|
||||
.planny.is-point.v2 { animation: planny-lean 3.2s ease-in-out infinite; }
|
||||
.planny.is-point.v2 .eye { animation: eye-dart 3.4s ease-in-out infinite; }
|
||||
|
||||
/* work -- the agent has it. The flight already owns the svg, so every work
|
||||
variant plays on his parts only. */
|
||||
/* v1: reading. The star sweeps back and forth instead of turning. */
|
||||
/* work -- the agent has it. The flight owns the svg, so variants use parts only. */
|
||||
/* v1: reading, the star sweeps instead of turning. */
|
||||
.planny.is-work.v1 .eye { animation: eye-scan 1.6s ease-in-out infinite; }
|
||||
/* v2: full tilt. The star turns faster and throbs while he runs. */
|
||||
/* v2: full tilt, star turns faster and throbs. */
|
||||
.planny.is-work.v2 .eye { animation: planny-spin 1.4s linear infinite, star-throb 0.7s ease-in-out infinite; }
|
||||
.planny.is-work.v2 .arm.pump-l,
|
||||
.planny.is-work.v2 .arm.pump-r,
|
||||
@@ -281,13 +267,13 @@
|
||||
.planny.is-happy.v2 .spark g + g path { animation-delay: 1.5s; }
|
||||
|
||||
/* done -- session over. */
|
||||
/* v1: a small satisfied nod, on a long leash so it reads as occasional. */
|
||||
/* v1: a small nod, spaced out so it reads as occasional. */
|
||||
.planny.is-done.v1 { animation: planny-nod 4.4s ease-in-out infinite; transform-origin: 50% 92%; }
|
||||
.planny.is-done.v1 .spark { opacity: 1; }
|
||||
.planny.is-done.v1 .spark path { animation: spark-pop 4.4s ease-in-out infinite; }
|
||||
|
||||
/* adrift -- the page is fine, the other end is not. */
|
||||
/* v1: a slow lost sway, star drifting up to look for him. */
|
||||
/* v1: a slow lost sway, star drifting up. */
|
||||
.planny.is-adrift.v1 { animation: planny-sway 5.4s ease-in-out infinite; transform-origin: 50% 100%; }
|
||||
.planny.is-adrift.v1 .eye { animation: eye-up 5.4s ease-in-out infinite; }
|
||||
|
||||
@@ -299,13 +285,12 @@
|
||||
|
||||
/* ------------------------------------------------------------ wake-up
|
||||
|
||||
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 color behind the sleeping bot, following light/dark via --bg. */
|
||||
A fresh dashboard: Planny powers on center stage, then glides into the rail
|
||||
(boot.js). Each beat is a delayed keyframe under `.booting`; boot.js passes
|
||||
the glide target as --wake-glide. The layer takes clicks so none reaches a
|
||||
card underneath. */
|
||||
.wake { position: fixed; inset: 0; z-index: var(--z-wake); pointer-events: auto; }
|
||||
/* Solid page color behind the bot (--bg follows light/dark). */
|
||||
.wake::before { content: ""; position: absolute; inset: 0; background: var(--bg); }
|
||||
.wake[hidden] { display: none; }
|
||||
.wake-bot {
|
||||
@@ -322,8 +307,8 @@
|
||||
.wake-bot .shell { fill: var(--panel-2); }
|
||||
.wake-bot .foot { fill: var(--ink-3); }
|
||||
.wake-bot .eye { fill: var(--ink); transform-box: fill-box; transform-origin: center; }
|
||||
/* The star and its scan sit in .look, so the glance moves them together
|
||||
without fighting the star's own open-and-light transform. */
|
||||
/* Star and scan sit in .look so the glance moves both without fighting the
|
||||
star's own open-and-light transform. */
|
||||
.wake-bot .look { transform-box: view-box; }
|
||||
.wake-bot .scan { fill: none; stroke: var(--accent); stroke-width: 0.5; opacity: 0; }
|
||||
.wake-bot .body { transform-box: view-box; transform-origin: 11px 28.8px; }
|
||||
@@ -331,13 +316,13 @@
|
||||
.wake-bot .limb { transform-box: view-box; }
|
||||
.wake-bot .limb.l { transform-origin: 3px 18px; }
|
||||
.wake-bot .limb.r { transform-origin: 19px 18px; }
|
||||
/* His Z's sit outside .body, so neither the breathing nor the hop moves them. */
|
||||
/* The Z's sit outside .body, so breathing and the hop do not move them. */
|
||||
.wake-bot .zzz { transform-box: view-box; transform-origin: 18px 1px; }
|
||||
.wake-bot .zzz path {
|
||||
fill: none; stroke: var(--ink-3); stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round;
|
||||
opacity: 0; transform-box: fill-box;
|
||||
}
|
||||
/* Dormant, before the first click: the one line telling them to wake him. */
|
||||
/* Dormant, before the first click: tells them to wake him. */
|
||||
.wake.dormant { cursor: pointer; }
|
||||
.wake-hint {
|
||||
position: absolute; left: 0; right: 0; top: 50%; margin: 147px 0 0;
|
||||
@@ -346,18 +331,17 @@
|
||||
}
|
||||
.wake.dormant .wake-hint { opacity: 1; }
|
||||
|
||||
/* Skip: bottom right, out of the animation's way but big enough to find. */
|
||||
/* Skip: bottom right, out of the way but easy to find. */
|
||||
.wake-skip {
|
||||
position: absolute; right: 24px; bottom: 24px;
|
||||
min-width: 120px; padding: 10px 26px; border: 1.5px solid var(--ink-2); border-radius: 6px;
|
||||
min-width: 120px; padding: 10px 26px; border: 1.5px solid var(--ink-2); border-radius: var(--radius-sm);
|
||||
background: var(--panel-2); color: var(--ink-2);
|
||||
font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
|
||||
cursor: pointer; opacity: 0.9;
|
||||
}
|
||||
.wake-skip:hover, .wake-skip:focus-visible { opacity: 1; color: var(--ink); border-color: var(--ink); }
|
||||
|
||||
/* 0.0 s, powered down: the resting state every beat starts from. Arms hang
|
||||
slack against his sides, the star is shut and the smile not yet drawn. */
|
||||
/* 0.0 s, powered down: the start of every beat. Arms slack, star shut, no smile. */
|
||||
.wake-bot { filter: grayscale(1); opacity: 0.55; }
|
||||
.wake-bot .limb.l { transform: rotate(-14deg); }
|
||||
.wake-bot .limb.r { transform: rotate(14deg); }
|
||||
@@ -365,10 +349,9 @@
|
||||
.wake-bot .smile { stroke-dasharray: 7; stroke-dashoffset: 7; }
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
/* Asleep until the click, on loop: Z's drift up, he breathes, his slack
|
||||
arms sway out of step, and his feet pulse like a standby light. Each
|
||||
stops the moment .booting swaps in and hands the part to its beat below.
|
||||
The Z's keep rising through the pop, so they never jump back. */
|
||||
/* Asleep until the click, looping: Z's drift up, he breathes, arms sway out
|
||||
of step, feet pulse like a standby light. Each stops when .booting swaps
|
||||
in its beat below; the Z's keep rising through the pop so they never jump. */
|
||||
.wake:is(.dormant, .stirring, .booting) .wake-bot .zzz path { animation: zzz-rise 3.2s ease-in infinite; }
|
||||
.wake:is(.dormant, .stirring, .booting) .wake-bot .zzz path:nth-of-type(2) { animation-delay: 1.05s; }
|
||||
.wake:is(.dormant, .stirring, .booting) .wake-bot .zzz path:nth-of-type(3) { animation-delay: 2.1s; }
|
||||
@@ -376,16 +359,14 @@
|
||||
.wake:is(.dormant, .stirring) .wake-bot .limb.l { animation: wake-doze-l 3.6s ease-in-out infinite; }
|
||||
.wake:is(.dormant, .stirring) .wake-bot .limb.r { animation: wake-doze-r 4.1s ease-in-out infinite; }
|
||||
.wake:is(.dormant, .stirring) .wake-bot .foot { animation: wake-standby 2.8s ease-in-out infinite; }
|
||||
/* Nudged, for one snore (app.js stir): still asleep, rocked gently side to
|
||||
side about his feet, a pair of rocks then a pause, as if being shaken. */
|
||||
/* Nudged for one snore (app.js stir): still asleep, rocked about his feet. */
|
||||
.wake.stirring .wake-bot .body { animation: wake-nudge 1.3s ease-in-out infinite; }
|
||||
/* Startled awake: the Z's blow outward and are gone. */
|
||||
/* Startled awake: the Z's blow outward. */
|
||||
.wake.booting .wake-bot .zzz { animation: wake-zzz-pop 0.3s ease-out both; }
|
||||
|
||||
/* 0.4 s power-on and feet blink · 1.35 s feet plant · 1.5 s / 1.9 s arms
|
||||
lift off his sides · 2.5 s star opens with the scan, lit · 2.85 s he
|
||||
looks left, then right, then ahead · 3.2 s smile · 3.6 s hop, arms up in
|
||||
a cheer, star back to ink. */
|
||||
/* 0.4 s power-on, feet blink · 1.35 s feet plant · 1.5/1.9 s arms lift ·
|
||||
2.5 s star opens, lit · 2.85 s looks left, right, ahead · 3.2 s smile ·
|
||||
3.6 s hop, arms up, star back to ink. */
|
||||
.wake.booting .wake-bot { animation: wake-power 0.3s ease 0.4s both; }
|
||||
.wake.booting .wake-bot .foot { animation: wake-feet 0.5s steps(1) 0.4s both, wake-plant 0.2s ease 1.35s both; }
|
||||
.wake.booting .wake-bot .limb.l { animation: wake-lift-l 0.45s cubic-bezier(.3,1.6,.5,1) 1.5s both, wake-cheer-l 0.5s ease-out 3.6s both; }
|
||||
@@ -396,13 +377,12 @@
|
||||
.wake.booting .wake-bot .smile { animation: wake-smile 0.4s ease-out 3.2s both; }
|
||||
.wake.booting .wake-bot .body { animation: wake-hop 0.5s ease-out 3.6s both; }
|
||||
|
||||
/* 4.3 s, into the rail. The power-on is long finished by now and holds its
|
||||
last frame, so the transition owns the transform alone. */
|
||||
/* 4.3 s, into the rail. The power-on holds its last frame, so the transition
|
||||
owns the transform alone. */
|
||||
.wake.gliding .wake-bot { transform: var(--wake-glide); transition: transform 0.6s cubic-bezier(.6,0,.2,1); }
|
||||
.wake.gliding::before { opacity: 0; transition: opacity 0.6s ease; }
|
||||
|
||||
/* The menu comes in as he leaves: pre-hidden while he wakes, then each
|
||||
group rises in, a beat after the one above it. */
|
||||
/* The menu is hidden while he wakes, then each group rises in turn. */
|
||||
.dash.waking .dash-group { opacity: 0; transform: translateY(8px); }
|
||||
.dash.waking.is-in .dash-group { animation: dash-rise 0.5s ease both; }
|
||||
.dash.waking.is-in .dash-group:nth-child(2 of .dash-group) { animation-delay: 0.06s; }
|
||||
@@ -412,14 +392,14 @@
|
||||
.dash.waking.is-in .dash-group:nth-child(6 of .dash-group) { animation-delay: 0.3s; }
|
||||
}
|
||||
|
||||
/* One Planny on screen: the rail's waits out of sight (keeping its place,
|
||||
so the glide can measure it) until the big one lands on it. */
|
||||
/* One Planny on screen: the rail's hides, keeping its place so the glide can
|
||||
measure it, until the big one lands. */
|
||||
.pilot.is-waking { visibility: hidden; }
|
||||
/* The note types in (app.js revealNote): what it has not reached waits. */
|
||||
.dash-note .is-untyped { visibility: hidden; }
|
||||
|
||||
@keyframes wake-power { from { filter: grayscale(1); opacity: 0.55; } to { filter: none; opacity: 1; } }
|
||||
/* Off for the delay, then on-off-on-off-on, like a standby light waking. */
|
||||
/* Off for the delay, then on-off-on-off-on like a standby light. */
|
||||
@keyframes wake-feet {
|
||||
0% { fill: var(--ink-3); }
|
||||
0.1% { fill: var(--accent); }
|
||||
@@ -431,8 +411,7 @@
|
||||
@keyframes wake-plant { from { fill: var(--accent); } to { fill: var(--ink-2); } }
|
||||
@keyframes wake-lift-l { from { transform: rotate(-14deg); } to { transform: rotate(0); } }
|
||||
@keyframes wake-lift-r { from { transform: rotate(14deg); } to { transform: rotate(0); } }
|
||||
/* Up and back down: the arms end on the rest pose the rail draws, so the
|
||||
glide hands over to an identical drawing. */
|
||||
/* Arms end on the rail's rest pose so the glide hands over seamlessly. */
|
||||
@keyframes wake-cheer-l {
|
||||
0%, 100% { transform: rotate(0); }
|
||||
45%, 60% { transform: rotate(116deg); }
|
||||
@@ -452,8 +431,7 @@
|
||||
20%, 80% { opacity: 1; }
|
||||
100% { opacity: 0; transform: translateX(3px); }
|
||||
}
|
||||
/* A glance each way, then eyes front before the hop: he ends where the rail
|
||||
draws him, so the glide still lands on an identical drawing. */
|
||||
/* A glance each way, then eyes front: he ends as the rail draws him. */
|
||||
@keyframes wake-look {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
17.5%, 42.5% { transform: translateX(-2.2px); }
|
||||
@@ -530,9 +508,9 @@
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
font: inherit;
|
||||
font-size: 13.5px;
|
||||
font-size: var(--fs-md);
|
||||
padding: 6px 13px;
|
||||
border-radius: 99px;
|
||||
border-radius: var(--radius-pill);
|
||||
cursor: pointer;
|
||||
/* A doc titled with a sentence keeps the tab row to one line. */
|
||||
max-width: 22ch;
|
||||
@@ -548,7 +526,7 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
.view-tab .tab-count {
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-2xs);
|
||||
opacity: 0.75;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
@@ -22,22 +22,21 @@
|
||||
align-items: flex-start;
|
||||
gap: 2px;
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
padding: 8px 10px 8px 13px;
|
||||
border: 0;
|
||||
border-left: 3px solid transparent;
|
||||
border-radius: 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
font: inherit;
|
||||
font-size: 13.5px;
|
||||
font-size: var(--fs-md);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
.prefs-tab:hover { background: var(--panel-2); color: var(--ink); }
|
||||
.prefs-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
|
||||
.prefs-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
|
||||
.prefs-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
|
||||
.prefs-tab-label { display: block; line-height: 1.3; }
|
||||
.prefs-tab-hint { display: block; font-size: 12px; line-height: 1.35; color: var(--ink-3); }
|
||||
.prefs-tab-hint { display: block; font-size: var(--fs-xs); line-height: 1.35; color: var(--ink-3); }
|
||||
|
||||
.prefs-panels { min-width: 0; }
|
||||
.prefs-panel[hidden] { display: none; }
|
||||
@@ -54,14 +53,17 @@
|
||||
top: 0;
|
||||
right: 0;
|
||||
max-width: 60%;
|
||||
font-size: 12px;
|
||||
font-size: var(--fs-xs);
|
||||
line-height: 1.3;
|
||||
text-align: right;
|
||||
color: var(--ok);
|
||||
opacity: 0;
|
||||
}
|
||||
.prefs-saved.is-saved { opacity: 1; }
|
||||
.prefs-saved.error { color: var(--danger, #d64545); opacity: 1; }
|
||||
.prefs-saved.error { color: var(--warn); opacity: 1; }
|
||||
/* After Reset this tab: "Reset. Undo", held a few seconds, no fade. */
|
||||
.prefs-saved.is-reset { opacity: 1; color: var(--ink-2); }
|
||||
.prefs-saved .prefs-undo { padding: 0 2px; font: inherit; color: var(--accent); text-decoration: underline; background: none; border: 0; cursor: pointer; }
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
@keyframes prefs-saved-fade {
|
||||
@@ -80,22 +82,22 @@
|
||||
.prefs-unsaved {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 5;
|
||||
z-index: var(--z-sticky);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 16px;
|
||||
background: color-mix(in srgb, var(--bg, #000) 55%, transparent);
|
||||
background: var(--scrim);
|
||||
}
|
||||
.prefs-unsaved[hidden] { display: none; }
|
||||
.prefs-unsaved-box {
|
||||
max-width: 380px;
|
||||
padding: 16px 18px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 10px;
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
box-shadow: 0 8px 30px rgb(0 0 0 / 0.25);
|
||||
box-shadow: var(--shadow-3);
|
||||
}
|
||||
.prefs-unsaved-box h3 { margin: 0 0 6px; font-size: 15px; }
|
||||
.prefs-unsaved-box h3 { margin: 0 0 6px; font-size: var(--fs-base); }
|
||||
.prefs-unsaved-box p { margin: 0 0 12px; }
|
||||
.prefs-unsaved-actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
|
||||
@@ -115,11 +117,10 @@
|
||||
width: auto;
|
||||
flex: none;
|
||||
white-space: nowrap;
|
||||
border-left: 0;
|
||||
border-bottom: 3px solid transparent;
|
||||
border-radius: 6px 6px 0 0;
|
||||
padding-left: 10px;
|
||||
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
|
||||
}
|
||||
.prefs-tab[aria-selected="true"] { border-bottom-color: var(--accent); }
|
||||
.prefs-tab[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--accent); }
|
||||
.prefs-tab-hint { display: none; }
|
||||
}
|
||||
|
||||
@@ -146,3 +147,6 @@
|
||||
}
|
||||
.setup-no-page { margin: 10px 0 0; }
|
||||
.setup-no-page[hidden] { display: none; }
|
||||
|
||||
/* One line under the title: what saves by itself and what does not. */
|
||||
.prefs-lead { margin: -4px 0 10px; font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
/* ---------------------------------------------------------------- print */
|
||||
|
||||
/* What gets printed is the document being read, on its own. Everything that
|
||||
steers the session is furniture and has no business on paper. */
|
||||
/* Print only the document; session furniture stays off paper. */
|
||||
@media print {
|
||||
.topbar, .rail, .aside, .footer, .banner, .skip, .doc-tools, .pager, .modal, .arrival, .review-offer { display: none !important; }
|
||||
html, body { height: auto; background: #fff; color: #000; }
|
||||
@@ -11,7 +10,7 @@
|
||||
.layout { display: block; overflow: visible; }
|
||||
.main { overflow: visible; padding: 0; max-width: none; }
|
||||
.main > * { max-width: none; }
|
||||
/* The diagnosis prints whole, not cut at the box's on-screen height. */
|
||||
/* Diagnosis prints whole. */
|
||||
.handoff-report-body { max-height: none; overflow: visible; }
|
||||
.block, .card { break-inside: avoid; box-shadow: none; }
|
||||
.doc-head { border-bottom: 1px solid #ccc; }
|
||||
@@ -22,22 +21,32 @@
|
||||
/* ------------------------------------------------------------ responsive */
|
||||
|
||||
@media (max-width: 1080px) {
|
||||
.layout { grid-template-columns: 210px minmax(0, 1fr); }
|
||||
.layout,
|
||||
.layout:has(> .aside:empty),
|
||||
.layout:has(.git-board) { grid-template-columns: 210px minmax(0, 1fr); }
|
||||
.aside { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); }
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
/* V20, from a live look at 700 to 1000px: from 900px down the rail beside the
|
||||
question and the notes pane under it left the card a few lines tall, so the
|
||||
rail becomes a strip above the page (Planny beside the list) and the notes
|
||||
follow the card, as on a phone. */
|
||||
@media (max-width: 900px) {
|
||||
body { display: block; }
|
||||
.layout { display: block; }
|
||||
.layout, .layout:has(> .aside:empty), .layout:has(.git-board) { display: block; }
|
||||
.rail { border-right: 0; border-bottom: 1px solid var(--rule); }
|
||||
.sidebar, .aside { border: 0; border-bottom: 1px solid var(--rule); max-height: 30vh; }
|
||||
.main { padding: 18px 16px 30px; }
|
||||
.card { --card-pad-b: 18px; padding: 18px 16px var(--card-pad-b); border-radius: 8px; }
|
||||
.dock { flex-direction: row; text-align: left; gap: 12px; padding: 12px 16px; }
|
||||
.planny { width: 32px; height: 44px; }
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.card { --card-pad-b: 18px; padding: 18px 16px var(--card-pad-b); border-radius: var(--radius-md); }
|
||||
.main > .card { padding-right: 22px; }
|
||||
.card h2 { font-size: 21px; }
|
||||
/* Back to a wrapping row: the summary and Send take two lines here and fill
|
||||
the bar's middle, so the where slot has no room and goes. */
|
||||
.footer { display: flex; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 20; box-shadow: 0 -4px 14px rgba(0,0,0,0.07); }
|
||||
.card h2 { font-size: var(--fs-h2); }
|
||||
/* Wrapping row: summary and Send fill the bar, so the where slot goes. */
|
||||
.footer { display: flex; flex-wrap: wrap; position: sticky; bottom: 0; z-index: var(--z-sticky); box-shadow: var(--shadow-up); }
|
||||
.footer-summary { flex: 1; }
|
||||
.footer-actions { white-space: normal; }
|
||||
.footer-where { display: none; }
|
||||
@@ -47,17 +56,15 @@
|
||||
.topbar { padding: 12px 16px 0; }
|
||||
.topbar-row.second { gap: 9px; }
|
||||
.views-arrow { display: none; }
|
||||
/* Side by side, because vertical space is the scarce thing here. */
|
||||
.topbar-label { display: none; }
|
||||
/* Side by side: vertical space is scarce. */
|
||||
.dock { flex-direction: row; text-align: left; gap: 12px; padding: 12px 16px; }
|
||||
.planny { width: 32px; height: 44px; }
|
||||
/* Three items on one line is one too many at this width, and the count is
|
||||
the one that is only nice to have. */
|
||||
/* Three items per line is too many; the count is the optional one. */
|
||||
.pager { gap: 8px; }
|
||||
.pager-count { display: none; }
|
||||
/* The Notebook takes the whole screen, and every control in it is a
|
||||
fingertip wide. The pictures go under Add image rather than beside it, so
|
||||
the strip gets the full width, and the preview's side columns narrow to
|
||||
give the picture their room. */
|
||||
/* The Notebook is full screen with fingertip-sized controls. Pictures go
|
||||
under Add image for full strip width; the preview's side columns narrow. */
|
||||
.btn.notepad-btn { min-width: 44px; }
|
||||
.modal.notepad { width: 100%; height: 100%; margin: 0; padding: 18px 16px 16px; border: 0; border-radius: 0; }
|
||||
.modal.notepad .notepad-add,
|
||||
@@ -71,73 +78,95 @@
|
||||
.notepad-tab-x { min-height: 44px; }
|
||||
.notepad-tab-x { width: 32px; }
|
||||
.notepad-add { align-self: flex-start; }
|
||||
.notepad-thumb .notepad-thumb-delete { width: 30px; height: 30px; font-size: 18px; }
|
||||
.notepad-thumb .notepad-thumb-delete { width: 30px; height: 30px; font-size: var(--fs-h3); }
|
||||
.modal.picview[open] { grid-template-columns: 52px minmax(0, 1fr) 52px; }
|
||||
}
|
||||
|
||||
/* A finger, not a pointer: buttons are at least 40px tall and the small close
|
||||
buttons 32px. Nothing here is drawn for a mouse. */
|
||||
@media (pointer: coarse) {
|
||||
.btn, .btn.sm, .btn.tiny { min-height: 40px; }
|
||||
.attach-remove, .notepad-tab-x, .modal-x { min-width: 32px; min-height: 32px; }
|
||||
}
|
||||
|
||||
/* No hover to reveal them, so the controls that wait for one are always shown. */
|
||||
@media (hover: none) {
|
||||
.md-copy, .spec-chip-del { opacity: 1; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
|
||||
/* Re-enable the indicators whose whole job is to show that time is passing.
|
||||
Frozen, the spinner reads as a broken ring and Planny's star as a dead
|
||||
light, so the star keeps turning, slowly. His lean, blink, arms and feet
|
||||
are decoration and stay off. */
|
||||
/* Pseudo-elements too, and no delay (a delayed entrance would sit blank). */
|
||||
*, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
|
||||
/* Keep the progress indicators: frozen, the spinner looks broken and
|
||||
Planny's star dead, so the star turns slowly. Lean, blink, arms and feet
|
||||
stay off. */
|
||||
.spinner { animation: spin 1.6s linear infinite !important; }
|
||||
.planny.is-work .eye { animation: planny-spin 4s linear infinite !important; }
|
||||
/* The flight holds still rather than collapsing. Collapsed to its last
|
||||
frame every star would sit off the left edge and the sky would be empty;
|
||||
stopped, the field stays and Planny keeps his forward lean. */
|
||||
/* The flight holds still: collapsed to its last frame every star would sit
|
||||
off the left edge and the sky would be empty. */
|
||||
.sky .star, .trail i, .dock.is-flying .planny { animation: none !important; }
|
||||
/* The step poses hold their finished drawing -- every tick and line
|
||||
written, confetti where it was drawn -- and keep only the star's pulse. */
|
||||
/* Step poses hold their finished drawing; only the star pulses. */
|
||||
.pose, .pose * { animation: none !important; }
|
||||
.pose .ey.blink { animation: pose-pulse 2.4s ease-in-out infinite !important; }
|
||||
/* Help's Planny moods are pictures, not indicators: all of them hold
|
||||
still, the working star included. */
|
||||
/* Help's Planny moods are pictures: all hold still. */
|
||||
.help-mood-bot, .help-mood-bot *, .help-mood-bot.is-work .eye { animation: none !important; }
|
||||
#btn-send { animation: none; }
|
||||
.nudge { animation: none; }
|
||||
}
|
||||
|
||||
/* User Preferences: action rows (Cleanup's scan/delete buttons share this
|
||||
class; the model menu's own rules moved to agents.css). */
|
||||
/* Preferences action rows (Cleanup's buttons share this class). */
|
||||
.models-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.models-actions .help.error { color: var(--danger, #d64545); }
|
||||
.models-actions .help.error { color: var(--warn); }
|
||||
|
||||
/* User Preferences: Cleanup's list of what would go, shown before anything
|
||||
is deleted. */
|
||||
/* Cleanup's list of what would go. */
|
||||
.cleanup-list { display: grid; gap: 4px; max-height: 200px; overflow: auto; font-size: 0.88em; }
|
||||
.cleanup-list:empty { display: none; }
|
||||
.cleanup-summary { margin: 0 0 2px; font-weight: 600; }
|
||||
.cleanup-row { display: flex; justify-content: space-between; gap: 12px; }
|
||||
.cleanup-row span:first-child { min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); }
|
||||
.cleanup-size { flex: none; color: var(--ink-3); }
|
||||
.cleanup-row { display: flex; align-items: baseline; gap: 10px; }
|
||||
label.cleanup-row { cursor: pointer; }
|
||||
.cleanup-row input { flex: none; margin: 0; align-self: center; }
|
||||
.cleanup-row > span:not(.cleanup-size) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); }
|
||||
.cleanup-kept-note summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); }
|
||||
.cleanup-size { flex: none; color: var(--ink-3); font-variant-numeric: tabular-nums; }
|
||||
.cleanup-more { display: grid; gap: 4px; }
|
||||
.cleanup-more summary { cursor: pointer; color: var(--ink-2); }
|
||||
#cleanup-delete[hidden] { display: none; }
|
||||
|
||||
/* A word the person has to type, bold and in their highlight color so it
|
||||
does not get lost in the status sentence. */
|
||||
/* A word to type, bold and accented so it stands out in the sentence. */
|
||||
.agent-key {
|
||||
color: var(--accent);
|
||||
font-weight: 700;
|
||||
}
|
||||
/* Under the app, the word is a button that types it into the agent's terminal;
|
||||
"terminal" itself, while the app's panel is collapsed, expands it. */
|
||||
/* In the app the word is a button typing it into the terminal; "terminal"
|
||||
expands a collapsed panel. */
|
||||
.agent-key-btn, .agent-terminal-btn {
|
||||
font: inherit; font-weight: 700; color: var(--accent);
|
||||
background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px;
|
||||
background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm);
|
||||
padding: 0 6px; cursor: pointer;
|
||||
}
|
||||
.agent-key-btn:hover:not(:disabled), .agent-terminal-btn:hover { border-color: var(--accent); }
|
||||
.agent-key-btn:disabled { opacity: 0.55; cursor: default; }
|
||||
.agent-key-btn:focus-visible, .agent-terminal-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
||||
|
||||
/* "What to check", beside the quiet and Not running lines. A link in a button's clothes. */
|
||||
/* "What to check": a link styled as a button. */
|
||||
.status-help {
|
||||
font: inherit; font-size: 0.92em; font-weight: 600;
|
||||
color: var(--accent); background: none; border: 0; padding: 0 2px;
|
||||
text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
|
||||
}
|
||||
.status-help:hover { text-decoration-thickness: 2px; }
|
||||
.status-help:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
|
||||
.status-help:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
|
||||
|
||||
|
||||
/* V25: Windows High Contrast. Looked at first (forced colors, emulated in
|
||||
Chromium): the progress bar vanished (its fill and track are backgrounds),
|
||||
and the selected tab and the current rail item looked like the others
|
||||
(their selected look is a background). Those get a system-color outline;
|
||||
the filled marks keep their own colors, the switch thumbs take the text
|
||||
color so they stay visible. */
|
||||
@media (forced-colors: active) {
|
||||
.swatch, .progress-fill, .meter-ring { forced-color-adjust: none; }
|
||||
.progress-track { outline: 1px solid CanvasText; }
|
||||
[aria-selected="true"], [aria-current="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
|
||||
.learn-track::after, .learn-switch.is-on .learn-track::after { background: ButtonText; }
|
||||
}
|
||||
@@ -2,25 +2,23 @@
|
||||
|
||||
/* ------------------------------------------------------------- banner */
|
||||
|
||||
/* 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
|
||||
safe: the messages it carries are the reason nothing there needs pressing. */
|
||||
/* A pill over the footer, centered on the bar. Overlaid, not a grid row, so
|
||||
it never shifts the layout. It covers the footer's middle, which is safe:
|
||||
nothing there needs pressing while it shows. */
|
||||
.banner {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 10px;
|
||||
transform: translateX(-50%);
|
||||
z-index: 46;
|
||||
z-index: var(--z-toast);
|
||||
max-width: min(680px, calc(100vw - 32px));
|
||||
padding: 9px 22px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: 99px;
|
||||
box-shadow: var(--shadow);
|
||||
border-radius: var(--radius-pill);
|
||||
box-shadow: var(--shadow-2);
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
font-size: var(--fs-md);
|
||||
background: var(--warn-soft);
|
||||
color: var(--warn);
|
||||
animation: banner-in 0.22s ease;
|
||||
@@ -59,36 +57,31 @@
|
||||
.row-left { display: flex; align-items: center; gap: 8px; }
|
||||
.brief-btn { border-color: var(--rule-2); color: var(--ink-2); }
|
||||
|
||||
/* Back to the dashboard: a filled triangle in the highlight color, so it
|
||||
recolors with the swatch like everything else that is the person's to use. */
|
||||
/* Back to the dashboard: a triangle in the highlight color. */
|
||||
.home-btn { border-color: var(--rule-2); display: inline-flex; align-items: center; justify-content: center; }
|
||||
/* As tall as Stop session beside it, with an icon's narrower sides. */
|
||||
.btn.home-btn { padding: 0 6px; align-self: stretch; margin-right: -8px; }
|
||||
.home-btn[hidden] { display: none; }
|
||||
.home-btn svg { width: 16px; height: 16px; display: block; }
|
||||
.home-btn path { fill: var(--accent); }
|
||||
.home-btn:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-soft); }
|
||||
.home-btn:disabled path { fill: var(--ink-3); }
|
||||
.home-btn path { fill: var(--accent); stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
|
||||
.home-btn:hover:not(:disabled):not(.is-locked) { border-color: var(--accent-line); background: var(--accent-soft); }
|
||||
.home-btn:disabled path, .home-btn.is-locked path { fill: var(--ink-3); stroke: var(--ink-3); }
|
||||
|
||||
/* Ending the session. Quiet, because it is the one control on the page that
|
||||
is never the next step, and red only on hover, because it is not dangerous:
|
||||
it saves, then stops. */
|
||||
/* Ending the session: quiet (never the next step), red only on hover (it
|
||||
saves, then stops, so it is not dangerous). */
|
||||
.stop-btn { border-color: var(--rule-2); color: var(--ink-2); }
|
||||
.stop-btn:hover:not(:disabled) { color: var(--warn); border-color: var(--warn); }
|
||||
.stop-btn:hover:not(:disabled):not(.is-locked) { color: var(--warn); border-color: var(--warn); }
|
||||
.brief-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-line); }
|
||||
|
||||
/* Subagents: an orchestrator and its helpers. Unlit is a hollow outline in
|
||||
the quiet ink; lit fills the nodes with the highlight color. */
|
||||
/* Subagents: hollow outline unlit, filled with the highlight color when lit. */
|
||||
.subagents-btn { border-color: var(--rule-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
|
||||
.btn.subagents-btn { padding: 0 6px; align-self: stretch; }
|
||||
.subagents-btn[hidden] { display: none; }
|
||||
.subagents-btn svg { width: 16px; height: 16px; display: block; }
|
||||
.subagents-btn .sa-link { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-linecap: round; }
|
||||
.subagents-btn .sa-hub { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
|
||||
.subagents-btn .sa-node { fill: none; stroke: var(--ink-2); stroke-width: 1.2; }
|
||||
.subagents-btn[aria-pressed="true"] .sa-hub,
|
||||
.subagents-btn[aria-pressed="true"] .sa-node { fill: var(--accent); stroke: var(--accent); }
|
||||
.subagents-btn[aria-pressed="true"] .sa-link { stroke: var(--accent); }
|
||||
.subagents-btn .sa-link, .subagents-btn .sa-hub, .subagents-btn .sa-node { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.subagents-btn[data-on="true"] .sa-hub,
|
||||
.subagents-btn[data-on="true"] .sa-node { fill: var(--accent); stroke: var(--accent); }
|
||||
.subagents-btn[data-on="true"] .sa-link { stroke: var(--accent); }
|
||||
.subagents-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-line); }
|
||||
.subagents-btn:hover:not(:disabled) .sa-link,
|
||||
.subagents-btn:hover:not(:disabled) .sa-hub,
|
||||
@@ -99,19 +92,18 @@
|
||||
|
||||
.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 color. Green, amber and red are the page's own done / staged /
|
||||
careful colors, so both themes are covered by the variables. */
|
||||
/* The session meter: a ring that fills with the points, in the level's color
|
||||
(the page's done / staged / careful variables, so both themes work). */
|
||||
.meter-slot { position: relative; flex: none; align-self: center; }
|
||||
.meter-pill {
|
||||
--m: var(--ok);
|
||||
display: inline-flex; align-items: center; gap: 7px;
|
||||
padding: 2px 10px 2px 3px;
|
||||
border: 1px solid color-mix(in srgb, var(--m) 40%, transparent);
|
||||
border-radius: 99px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--panel);
|
||||
color: var(--m);
|
||||
font: inherit; font-size: 12px; font-weight: 600;
|
||||
font: inherit; font-size: var(--fs-xs); font-weight: 600;
|
||||
white-space: nowrap; cursor: pointer;
|
||||
}
|
||||
.meter-pill[hidden] { display: none; }
|
||||
@@ -121,59 +113,48 @@
|
||||
.meter-ring { width: 20px; height: 20px; transform: rotate(-90deg); flex: none; }
|
||||
.meter-ring circle { fill: none; stroke-width: 3; }
|
||||
.meter-track { stroke: var(--rule); }
|
||||
.meter-fill { stroke: var(--m); transition: stroke-dashoffset 0.2s ease; }
|
||||
.meter-fill { stroke: var(--m); transition: stroke-dashoffset var(--dur-2); }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.meter-fill { transition: none; }
|
||||
}
|
||||
.meter-pop {
|
||||
position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
|
||||
position: absolute; top: calc(100% + 6px); left: 0; z-index: var(--z-pop);
|
||||
width: max-content; max-width: min(320px, calc(100vw - 32px));
|
||||
padding: 10px 12px;
|
||||
background: var(--panel); color: var(--ink);
|
||||
border: 1px solid var(--rule-2); border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
border: 1px solid var(--rule-2); border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-2);
|
||||
}
|
||||
.meter-pop[hidden] { display: none; }
|
||||
.meter-tip { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
|
||||
.meter-tip { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.meter-once { margin: 0 0 8px; padding: 6px 8px; border-left: 3px solid var(--stage); font-size: var(--fs-sm); color: var(--ink); }
|
||||
.meter-list {
|
||||
list-style: none; margin: 0 0 8px; padding: 6px 0 0;
|
||||
border-top: 1px solid var(--rule);
|
||||
max-height: 40vh; overflow-y: auto;
|
||||
font-size: 12px; color: var(--ink-2);
|
||||
font-size: var(--fs-xs); color: var(--ink-2);
|
||||
}
|
||||
.meter-list[hidden] { display: none; }
|
||||
.meter-list li { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
|
||||
.meter-fresh { margin: 0 0 8px; padding-top: 6px; border-top: 1px solid var(--rule); }
|
||||
.meter-fresh[hidden] { display: none; }
|
||||
.meter-fresh-text { margin: 0 0 6px; font-size: 12px; color: var(--ink-2); }
|
||||
.meter-fresh-text { margin: 0 0 6px; font-size: var(--fs-xs); color: var(--ink-2); }
|
||||
/* Under the app the whole note is one button: a press is the bar's New Session. */
|
||||
.meter-fresh-btn { display: block; width: 100%; margin: 2px 0 6px; }
|
||||
.meter-fresh-row .handoff-code { flex-basis: 180px; font-size: 12px; padding: 6px 10px; }
|
||||
.meter-fresh-row .handoff-code { flex-basis: 180px; font-size: var(--fs-xs); padding: 6px 10px; }
|
||||
.meter-item-points { flex: none; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
|
||||
|
||||
/* The spec in hand: small and muted so it never competes with the title. */
|
||||
.spec-tag {
|
||||
flex: 0 1 auto; min-width: 0; max-width: 220px; align-self: center;
|
||||
font-size: 11.5px; color: var(--ink-3);
|
||||
font-size: var(--fs-xs); color: var(--ink-3);
|
||||
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
}
|
||||
.spec-tag[hidden] { display: none; }
|
||||
|
||||
.badge {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
background: var(--accent-soft);
|
||||
border: 1px solid var(--accent-line);
|
||||
padding: 3px 8px;
|
||||
border-radius: 99px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font: 600 19px/1.2 var(--serif);
|
||||
font: 600 var(--fs-h3)/1.2 var(--serif);
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -182,43 +163,37 @@ h1 {
|
||||
|
||||
.progress-block { flex: 1 1 260px; min-width: 200px; max-width: 460px; margin-left: auto; }
|
||||
|
||||
/* When the progress block is hidden (the dashboard, the git board) nothing
|
||||
grows to fill the row, so the icon buttons would sit beside the title. The
|
||||
first takes the slack instead; with the block shown its flex already eats
|
||||
the space, so this costs nothing. */
|
||||
#btn-looks { margin-left: auto; }
|
||||
|
||||
.progress-label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
font-size: 12.5px;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--ink-2);
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#progress-text { font-weight: 600; color: var(--ink); }
|
||||
#progress-text { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
|
||||
.confidence { color: var(--ink-3); text-align: right; }
|
||||
|
||||
.progress-track {
|
||||
height: 7px;
|
||||
background: var(--rule);
|
||||
border-radius: 99px;
|
||||
border-radius: var(--radius-pill);
|
||||
overflow: hidden;
|
||||
}
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
width: 100%;
|
||||
background: var(--ok);
|
||||
border-radius: 99px;
|
||||
transition: width 0.5s ease;
|
||||
/* The track clips the rounded left end; scaleX leaves the right end square. */
|
||||
transform: scaleX(var(--p, 0));
|
||||
transform-origin: left;
|
||||
transition: transform 0.5s ease;
|
||||
}
|
||||
|
||||
.tick { color: var(--ink-3); font-variant-numeric: tabular-nums; }
|
||||
|
||||
/* Planny's own corner. He was 23px in a title bar, which is a logo, not a
|
||||
guide: too small to read a mood off and too small to look at. Here he has
|
||||
room, he sits above the question list where the eye starts, and his line
|
||||
wraps instead of squeezing the view tabs. */
|
||||
/* Planny's corner, above the question list: big enough to read a mood off,
|
||||
and his line wraps instead of squeezing the view tabs. */
|
||||
.dock {
|
||||
flex: none;
|
||||
display: flex;
|
||||
@@ -244,6 +219,15 @@ h1 {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* A side column with nothing to show is not drawn: an empty aside gives its
|
||||
track back (the dashboard, the git board, the finish and document views),
|
||||
and the git board never has notes. The main column is centered, so the
|
||||
freed width becomes margin or, past card-rows.js's math, another card column. */
|
||||
.layout:has(> .aside:empty),
|
||||
.layout:has(.git-board) { grid-template-columns: 250px minmax(0, 1fr); }
|
||||
.layout > .aside:empty,
|
||||
.layout:has(.git-board) > .aside { display: none; }
|
||||
|
||||
.rail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -255,11 +239,9 @@ h1 {
|
||||
.sidebar { flex: 1; }
|
||||
.aside { border-left: 1px solid var(--rule); background: var(--panel-2); }
|
||||
|
||||
/* The question column does not scroll: the CARD does.
|
||||
A long question used to push Previous / Next below the fold, so the way on
|
||||
disappeared exactly when the question was big enough to need it. The card is
|
||||
the only thing here that shrinks, so it takes the squeeze and scrolls its own
|
||||
contents while its frame, and the pager under it, stay put. */
|
||||
/* The question column does not scroll: the CARD does, so a long question
|
||||
never pushes Previous / Next below the fold. The card alone shrinks and
|
||||
scrolls its contents; its frame and the pager stay put. */
|
||||
.main {
|
||||
padding: 24px 28px;
|
||||
overflow: hidden;
|
||||
@@ -269,29 +251,25 @@ h1 {
|
||||
}
|
||||
.main > * { width: 100%; max-width: min(var(--card-width), 100%); margin-left: auto; margin-right: auto; }
|
||||
/* The card is the column's only framed child: a page holds ONE, with notes
|
||||
and lulls folded into it as sections. It takes the squeeze and scrolls its
|
||||
own contents while its frame, and the pager under it, stay put. */
|
||||
and lulls folded in as sections. */
|
||||
.main > .card {
|
||||
flex: 0 1 auto;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-gutter: stable;
|
||||
padding-right: 32px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
/* The dashboard's menu and the launching pane play by the card's rule too:
|
||||
they are not .card, but they are the column's whole contents, so they take
|
||||
the squeeze and scroll themselves while the column frame stays put. Without
|
||||
this the catalog is clipped at the fold with no way to reach it. */
|
||||
/* The dashboard menu and launching pane follow the card's rule: they are the
|
||||
column's whole contents, and without it the catalog is clipped at the fold. */
|
||||
.main > .dash, .main > .launching, .main > .dash-confirm, .main > .waiting-pane {
|
||||
flex: 0 1 auto;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-gutter: stable;
|
||||
padding-right: 32px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
/* The agent setup page is the column's whole contents too, and its agent list
|
||||
runs past the fold, so it scrolls itself like the menu above. */
|
||||
/* The agent setup page is the column's whole contents too; it scrolls itself. */
|
||||
.main > .setup-screen {
|
||||
flex: 0 1 auto;
|
||||
min-height: 0;
|
||||
@@ -299,32 +277,27 @@ h1 {
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
/* Its parts keep their height: the agent list clips its own overflow, so left
|
||||
to shrink it would be cut at the fold instead of scrolling. */
|
||||
/* Its parts keep their height: the agent list clips its overflow, so a shrink
|
||||
would cut it at the fold. */
|
||||
.main > .setup-screen > * { flex-shrink: 0; }
|
||||
|
||||
/* The column itself never scrolls; the card does. The git board is the one
|
||||
exception, below: its card sits in the board's card slot, so the column
|
||||
takes the scroll there and card and board flow through it at natural height. */
|
||||
/* The column never scrolls; the card does. Exception, below: on the git board
|
||||
the column scrolls and card and board flow at natural height. */
|
||||
.main > .card:not(.is-primary) { flex-shrink: 100; min-height: 104px; }
|
||||
.main > .card.is-primary { flex-shrink: 1; min-height: 0; }
|
||||
/* A card with a growing answer box takes the column's full height above the
|
||||
pager, and still scrolls its own contents. app.js sizes the box to fill it. */
|
||||
pager (app.js sizes the box). */
|
||||
.main > .card.is-primary.has-grow { flex: 1 1 auto; }
|
||||
/* More below the fold (app.js markMore): the bottom edge fades, so a card
|
||||
cut by the window never reads as finished. */
|
||||
/* More below the fold (app.js markMore): the bottom edge fades. */
|
||||
.main > .card.has-more {
|
||||
-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
|
||||
mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
|
||||
}
|
||||
.pager { flex: none; }
|
||||
|
||||
/* A document is read top to bottom and has no pinned furniture, so it goes back
|
||||
to being an ordinary scrolling column. */
|
||||
/* The tail the column no longer carries: a document IS the scroll, so it wants
|
||||
room after its last line. The question column does not, because the pager is
|
||||
pinned to the bottom of it and anything under the pager is dead space the
|
||||
card could have been scrolling through. */
|
||||
/* A document is an ordinary scrolling column with no pinned furniture, so it
|
||||
wants room after its last line; the question column does not (space under
|
||||
the pager is dead space). */
|
||||
.main.is-doc { display: block; overflow-y: auto; padding-bottom: 40px; }
|
||||
|
||||
/* ------------------------------------------------------------ sidebar */
|
||||
@@ -332,11 +305,6 @@ h1 {
|
||||
.rail-group { margin-bottom: 22px; }
|
||||
|
||||
.rail-title {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-3);
|
||||
margin: 0 0 8px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -354,7 +322,7 @@ h1 {
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
font: inherit;
|
||||
font-size: 13.5px;
|
||||
font-size: var(--fs-md);
|
||||
padding: 7px 9px;
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
@@ -362,9 +330,8 @@ h1 {
|
||||
}
|
||||
.rail-item:hover:not(:disabled) { background: var(--panel-2); color: var(--ink); }
|
||||
.rail-item:disabled { cursor: default; }
|
||||
/* The dashboard lists every skill in the rail; the ones the selected spec
|
||||
rules out should read as out of reach at a glance, not as one more link. */
|
||||
.rail-item.is-unavailable { opacity: 0.35; cursor: not-allowed; }
|
||||
/* Skills the selected spec rules out read as out of reach, not as links. */
|
||||
.rail-item.is-unavailable { opacity: 0.5; cursor: not-allowed; }
|
||||
.rail-item.is-unavailable .rail-mark { color: var(--ink-3); }
|
||||
.rail-item[aria-current="true"] {
|
||||
background: var(--accent-soft);
|
||||
@@ -373,13 +340,12 @@ h1 {
|
||||
box-shadow: inset 2px 0 0 var(--accent);
|
||||
}
|
||||
|
||||
.rail-mark { flex: none; width: 15px; text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
|
||||
.rail-mark { flex: none; width: 15px; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
|
||||
.rail-mark.done { color: var(--ok); }
|
||||
.rail-mark.staged { color: var(--stage); font-weight: 700; }
|
||||
|
||||
/* Echoes the center pane's "Suggested" pill, which can scroll out of view;
|
||||
the dot keeps the call-out visible while just scanning the rail. The
|
||||
title grows to push the dot flush with the row's right edge. */
|
||||
/* Echoes the center pane's "Suggested" pill, which can scroll out of view.
|
||||
The title grows to push the dot to the row's right edge. */
|
||||
.rail-item > span:not(.rail-mark):not(.rail-suggested-dot) { flex: 1 1 auto; }
|
||||
.rail-suggested-dot {
|
||||
flex: none;
|
||||
@@ -392,42 +358,29 @@ h1 {
|
||||
.rail-item.is-suggested:not([aria-current="true"]) { color: var(--ink); }
|
||||
.rail-mark.open { color: var(--accent); }
|
||||
|
||||
/* The session's own page, above the topic groups. It names the state it is
|
||||
-- PAUSED, SESSION ENDED -- in the same small caps the group titles use,
|
||||
because it is a peer of theirs, not another question in the list. */
|
||||
.rail-end-label {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
/* The session's own page, above the topic groups: a peer of them. */
|
||||
|
||||
.rail-empty { color: var(--ink-3); font-size: 13px; font-style: italic; }
|
||||
|
||||
/* -------------------------------------------------------------- aside */
|
||||
|
||||
.aside h2 {
|
||||
font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
|
||||
color: var(--ink-3); margin: 0 0 12px;
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.msg {
|
||||
border-radius: 8px; padding: 10px 13px; margin-bottom: 9px; font-size: 13.5px;
|
||||
border-radius: var(--radius-md); padding: 10px 13px; margin-bottom: 9px; font-size: var(--fs-md);
|
||||
background: var(--panel); border: 1px solid var(--rule);
|
||||
}
|
||||
.msg.you { background: var(--stage-soft); border-color: transparent; }
|
||||
.msg.staged { border-style: dashed; border-color: var(--stage); background: transparent; }
|
||||
.msg-who {
|
||||
font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
|
||||
color: var(--ink-3); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px;
|
||||
margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px;
|
||||
}
|
||||
|
||||
.msg-who .sent-wait { display: inline-flex; align-items: center; gap: 6px; }
|
||||
|
||||
.aside-empty { color: var(--ink-3); font-size: 13px; font-style: italic; }
|
||||
|
||||
/* The note box takes whatever height the panel has left, never under 160px.
|
||||
Scoped here so the page-wide box minimum still holds everywhere else. */
|
||||
/* The note box takes the panel's leftover height, min 160px (scoped here). */
|
||||
.aside { display: flex; flex-direction: column; }
|
||||
.aside > .field { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 0; }
|
||||
.aside .md-host { flex: 1 1 auto; min-height: 160px; resize: vertical; }
|
||||
@@ -440,26 +393,20 @@ h1 {
|
||||
|
||||
.attach-row { display: flex; align-items: center; margin: -4px 0 6px -13px; }
|
||||
.attach-row.is-under { margin: 6px 0 4px -13px; }
|
||||
/* .btn on the chip's rule: pieces.css loads later, and .btn.tiny's bottom
|
||||
margin would otherwise lift the chip off the row's center line. */
|
||||
.attach-row .btn.suggest-chip { margin: 0 0 0 auto; }
|
||||
.attach-row .suggest-nudge { margin-left: auto; }
|
||||
.attach-row .suggest-nudge + .suggest-chip { margin-left: 9px; }
|
||||
.msg .suggest-tag {
|
||||
display: inline-block; margin-bottom: 4px;
|
||||
background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line);
|
||||
}
|
||||
.msg .suggest-tag { margin-bottom: 4px; }
|
||||
.attach-tray { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
|
||||
.attach-thumb {
|
||||
position: relative;
|
||||
width: 72px; height: 72px; margin: 0;
|
||||
border: 1px solid var(--rule); border-radius: 8px;
|
||||
border: 1px solid var(--rule); border-radius: var(--radius-md);
|
||||
overflow: hidden; background: var(--panel);
|
||||
flex: none;
|
||||
}
|
||||
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
/* The picture in a thumbnail is a button that opens the picview, with the
|
||||
tray's round X in its corner and the upload state laid over it. */
|
||||
/* The thumbnail picture is a button that opens the picview. */
|
||||
.attach-open {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -469,14 +416,14 @@ h1 {
|
||||
background: none;
|
||||
cursor: zoom-in;
|
||||
}
|
||||
.attach-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
.attach-open:focus-visible { outline: 2px solid var(--focus); outline-offset: calc(var(--focus-offset) * -1); }
|
||||
.attach-thumb.is-uploading .attach-open,
|
||||
.attach-thumb.is-failed .attach-open { cursor: default; }
|
||||
.attach-remove {
|
||||
position: absolute; top: 3px; right: 3px; z-index: 2;
|
||||
width: 20px; height: 20px; padding: 0;
|
||||
display: grid; place-items: center;
|
||||
font: 700 14px/1 var(--sans);
|
||||
font: 700 var(--fs-md)/1 var(--sans);
|
||||
color: var(--ink); background: var(--panel);
|
||||
border: 1px solid var(--rule-2); border-radius: 50%;
|
||||
cursor: pointer; opacity: 0.9;
|
||||
@@ -489,9 +436,9 @@ h1 {
|
||||
}
|
||||
.attach-overlay.failed {
|
||||
background: color-mix(in srgb, var(--panel) 88%, transparent);
|
||||
color: var(--ink-2); font-size: 10.5px; font-weight: 600; text-align: center;
|
||||
color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 600; text-align: center;
|
||||
}
|
||||
.attach-overlay.failed .btn.tiny { margin: 0; padding: 1px 6px; font-size: 10.5px; }
|
||||
.attach-overlay.failed .btn.xs { padding: 1px 6px; font-size: var(--fs-2xs); }
|
||||
.attach-chip {
|
||||
width: 180px;
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
@@ -503,26 +450,24 @@ h1 {
|
||||
}
|
||||
.attach-chip-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
|
||||
.attach-chip-badge {
|
||||
padding: 0 5px; border-radius: 4px;
|
||||
font: 700 10px/1.5 var(--sans); letter-spacing: 0.04em; font-variant: small-caps;
|
||||
padding: 0 5px; border-radius: var(--radius-xs);
|
||||
font: 700 var(--fs-2xs)/1.5 var(--sans); letter-spacing: 0.04em; font-variant: small-caps;
|
||||
color: var(--ink); background: var(--accent-soft);
|
||||
}
|
||||
.attach-chip-name {
|
||||
max-width: 100%;
|
||||
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
|
||||
font-size: 12.5px; font-weight: 600; color: var(--ink);
|
||||
font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
|
||||
}
|
||||
.attach-chip-size { color: var(--ink-2); font-size: 11.5px; }
|
||||
.attach-link { color: inherit; text-decoration: none; border-radius: 8px; }
|
||||
.attach-chip-size { color: var(--ink-2); font-size: var(--fs-xs); }
|
||||
.attach-link { color: inherit; text-decoration: none; border-radius: var(--radius-md); }
|
||||
.attach-link:hover .attach-thumb, .attach-link:focus-visible .attach-thumb { border-color: var(--accent); }
|
||||
.attach-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
/* The same hover border a linked thumbnail gets, for a thumbnail whose own
|
||||
button opens the picview. */
|
||||
.attach-link:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
/* Same hover border as a linked thumbnail. */
|
||||
.attach-thumb:has(.attach-open:hover) { border-color: var(--accent); }
|
||||
|
||||
/* The full-screen picture 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 colors are fixed, not tokens. */
|
||||
/* Full-screen picture preview on a near-black backdrop in both themes (a
|
||||
picture is judged against dark), so its colors are fixed, not tokens. */
|
||||
.modal.picview {
|
||||
inset: 0;
|
||||
width: 100vw;
|
||||
@@ -562,7 +507,7 @@ h1 {
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
color: #fff;
|
||||
font: 600 28px/1 var(--sans);
|
||||
font: 600 var(--fs-h1)/1 var(--sans);
|
||||
cursor: pointer;
|
||||
}
|
||||
.picview-step.is-prev { grid-column: 1; }
|
||||
@@ -579,37 +524,34 @@ h1 {
|
||||
gap: 16px;
|
||||
padding: 12px 16px 20px;
|
||||
}
|
||||
.picview-count { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.8); }
|
||||
.picview-count { margin: 0; font-size: var(--fs-md); color: rgba(255, 255, 255, 0.8); }
|
||||
.btn.picview-close { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
|
||||
.btn.picview-close:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
|
||||
|
||||
.msg.pending { border-style: dashed; border-color: var(--stage); background: transparent; }
|
||||
.ask-row .attach-chip { padding-right: 10px; }
|
||||
|
||||
.footer-held { margin-top: 3px; color: var(--ink-2); font-size: 12.5px; }
|
||||
.footer-held { margin-top: 3px; color: var(--ink-2); font-size: var(--fs-sm); }
|
||||
|
||||
/* ------------------------------------------------------------- footer */
|
||||
|
||||
/* Three columns: summary, where, actions. Equal side tracks keep the middle
|
||||
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. */
|
||||
centered; a long summary wraps and wide actions nudge the center instead of
|
||||
overlapping. The middle gives way first (ellipsis), summary and Send never. */
|
||||
.footer {
|
||||
display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 18px;
|
||||
padding: 13px 20px;
|
||||
background: var(--panel);
|
||||
border-top: 1px solid var(--rule);
|
||||
}
|
||||
.footer-summary { min-width: 200px; font-size: 13.5px; color: var(--ink-2); }
|
||||
.footer-summary { min-width: 200px; font-size: var(--fs-md); color: var(--ink-2); }
|
||||
.footer-summary strong { color: var(--ink); }
|
||||
/* 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. */
|
||||
/* The workspace label, centered on the bar; a click opens the Workspace
|
||||
dialog. The notification pill covers it while it shows. */
|
||||
.footer-where {
|
||||
max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
padding: 2px 6px; border: 0; background: none;
|
||||
font: inherit; font-size: 12px; color: var(--ink-3);
|
||||
font: inherit; font-size: var(--fs-xs); color: var(--ink-3);
|
||||
cursor: pointer;
|
||||
}
|
||||
.footer-where:hover { text-decoration: underline; }
|
||||
@@ -620,9 +562,8 @@ h1 {
|
||||
display: inline-block; width: 7px; height: 7px; margin-left: 6px;
|
||||
border-radius: 50%; background: var(--warn); vertical-align: 1px;
|
||||
}
|
||||
.footer-where:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
|
||||
/* One line, so the grid sizes this track to the whole row and takes the room
|
||||
from the middle instead of folding Send in two. */
|
||||
.footer-where:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
|
||||
/* One line, so the track takes room from the middle instead of folding Send. */
|
||||
.footer-actions { display: flex; gap: 10px; align-items: center; grid-column: 3; justify-self: end; white-space: nowrap; }
|
||||
/* The dashboard: no summary, no Send, just the workspace label. */
|
||||
.footer.is-dash .footer-summary,
|
||||
@@ -631,24 +572,22 @@ h1 {
|
||||
.footer.is-dash-done .footer-actions { display: none; }
|
||||
.footer.is-loop-idle .footer-summary,
|
||||
.footer.is-loop-idle .footer-actions { visibility: hidden; }
|
||||
.hint { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
|
||||
/* A label, not a sentence: the full reason rides in the hint's tooltip, and
|
||||
the dock already carries the ticking clock this would otherwise repeat. */
|
||||
.hint { font-size: var(--fs-sm); color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
|
||||
/* A label; the full reason rides in the tooltip. */
|
||||
.hint-text { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
kbd {
|
||||
font: 11.5px var(--mono);
|
||||
font: var(--fs-xs) var(--mono);
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--rule-2);
|
||||
border-bottom-width: 2px;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-xs);
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ waiting */
|
||||
|
||||
/* Laid out like the starting screen, so when a session goes from one to the
|
||||
other Planny stays put and only the words under him change. */
|
||||
/* Laid out like the starting screen, so Planny stays put between them. */
|
||||
.waiting-pane {
|
||||
max-width: 560px;
|
||||
margin: 4vh auto 0 !important;
|
||||
@@ -658,10 +597,9 @@ kbd {
|
||||
gap: 12px;
|
||||
justify-items: center;
|
||||
}
|
||||
.waiting-pane h2 { font: 600 23px/1.3 var(--serif); color: var(--ink); margin: 0; }
|
||||
.waiting-pane h2 { font: 600 var(--fs-h1)/1.3 var(--serif); color: var(--ink); margin: 0; }
|
||||
.waiting-pane p { max-width: 70ch; margin: 0; }
|
||||
/* The words that open the live task view (the phase-file tab on a build):
|
||||
bold in the highlight color, a button that reads as part of the sentence. */
|
||||
/* Words that open the live task view: a button styled as part of the sentence. */
|
||||
.waiting-jump {
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
@@ -672,9 +610,8 @@ kbd {
|
||||
}
|
||||
button.waiting-jump { cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
|
||||
button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
/* Once the work is under way Planny steps back a size, and the ring in
|
||||
front of the stage name carries the "still going" signal instead. */
|
||||
.waiting-pane .pose-stage { height: 130px; transition: height 0.35s ease; }
|
||||
/* Once work is under way Planny shrinks and the ring carries "still going". */
|
||||
.waiting-pane .pose-stage { height: 130px; transition: height var(--dur-3); }
|
||||
.waiting-pane h2 .waiting-spin { display: inline-block; width: 16px; height: 16px; vertical-align: 1px; margin-right: 10px; }
|
||||
|
||||
.spinner {
|
||||
@@ -686,9 +623,8 @@ button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
/* The footer's "waiting on the agent" tell. Same ring, sized to sit on a line
|
||||
of text. It inherits the reduced-motion exception below, which is deliberate:
|
||||
a frozen spinner reads as a broken app, which is the opposite of the point. */
|
||||
/* The footer's "waiting on the agent" ring, line-sized. It keeps spinning under
|
||||
reduced motion on purpose: a frozen spinner reads as a broken app. */
|
||||
.spinner.tiny {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
@@ -697,23 +633,21 @@ button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
flex: none;
|
||||
}
|
||||
|
||||
/* The same ring again, in front of Planny's line while the agent has the
|
||||
ball. Inline so it sits on the first line of a wrapped sentence. The
|
||||
[hidden] rule is needed because display here outranks the browser's own. */
|
||||
/* The ring in front of Planny's line, inline on a wrapped sentence's first
|
||||
line. [hidden] is needed because display here outranks the browser's. */
|
||||
.dock-spin { display: inline-block; vertical-align: -2px; margin-right: 6px; }
|
||||
.dock-spin[hidden] { display: none; }
|
||||
|
||||
.robot { font: 12px/1.25 var(--mono); color: var(--ink-3); white-space: pre; margin: 0 0 16px; }
|
||||
.robot { font: var(--fs-xs)/1.25 var(--mono); color: var(--ink-3); white-space: pre; margin: 0 0 16px; }
|
||||
|
||||
/* ------------------------------------------------------------ arrival */
|
||||
|
||||
/* The beat when new questions land. Covers the whole page, says what just
|
||||
happened, and leaves by itself in under two seconds. Built from the page's
|
||||
own tokens so it follows the theme and the chosen highlight color. */
|
||||
/* The beat when new questions land: covers the page and leaves by itself in
|
||||
under two seconds. Uses page tokens, so it follows theme and highlight. */
|
||||
.arrival {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
z-index: var(--z-overlay);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: color-mix(in srgb, var(--bg) 72%, transparent);
|
||||
@@ -725,18 +659,15 @@ button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
|
||||
.arrival-box { text-align: center; padding: 24px; max-width: min(640px, 100vw - 32px); }
|
||||
|
||||
.rail-end-label { color: inherit; }
|
||||
.arrival-kicker {
|
||||
margin: 0 0 10px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
animation: arrival-rise 0.45s 0.05s ease-out both;
|
||||
}
|
||||
|
||||
/* The words themselves are the effect: they sweep in on a band of the
|
||||
highlight color, the way a page turns, rather than anything spinning. */
|
||||
/* The words sweep in on a band of the highlight color, nothing spinning. */
|
||||
.arrival-title {
|
||||
margin: 0;
|
||||
font: 600 clamp(38px, 7vw, 64px)/1.05 var(--serif);
|
||||
@@ -757,7 +688,7 @@ button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
height: 3px;
|
||||
width: 96px;
|
||||
margin: 14px auto 0;
|
||||
border-radius: 99px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--accent);
|
||||
transform-origin: center;
|
||||
animation: arrival-draw 0.5s 0.45s ease-out both;
|
||||
@@ -765,14 +696,14 @@ button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
|
||||
.arrival-what {
|
||||
margin: 16px 0 0;
|
||||
font-size: 17px;
|
||||
font-size: var(--fs-lg);
|
||||
font-weight: 600;
|
||||
color: var(--ink-2);
|
||||
animation: arrival-rise 0.45s 0.35s ease-out both;
|
||||
}
|
||||
.arrival-more {
|
||||
margin: 4px 0 0;
|
||||
font-size: 13.5px;
|
||||
font-size: var(--fs-md);
|
||||
color: var(--ink-3);
|
||||
animation: arrival-rise 0.45s 0.45s ease-out both;
|
||||
}
|
||||
@@ -791,16 +722,13 @@ button.waiting-jump:hover { text-decoration-color: var(--accent); }
|
||||
|
||||
|
||||
/* A question that arrived while the person was typing, until it is opened. */
|
||||
.rail-new {
|
||||
flex: none;
|
||||
align-self: flex-start;
|
||||
margin-top: 2px;
|
||||
padding: 0 6px;
|
||||
border-radius: 999px;
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: .04em;
|
||||
text-transform: uppercase;
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
}
|
||||
.rail-new { flex: none; align-self: flex-start; margin-top: 2px; }
|
||||
|
||||
/* A warning stays until dismissed or replaced: its close button, at the end of the line. */
|
||||
.banner .banner-dismiss { margin-left: 10px; padding: 2px; border: 0; background: none; color: inherit; cursor: pointer; vertical-align: middle; }
|
||||
.banner .banner-dismiss svg { width: 14px; height: 14px; display: block; }
|
||||
.banner .banner-dismiss:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); }
|
||||
|
||||
/* The home and Subagents buttons name themselves beside their icons, as Notebook does; the narrow strip keeps the icons alone. */
|
||||
.home-btn .topbar-label, .subagents-btn .topbar-label { margin-left: 6px; font-size: var(--fs-sm); line-height: 1; }
|
||||
.btn.home-btn { gap: 0; }
|
||||
@@ -1,8 +1,7 @@
|
||||
/* 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
|
||||
work offline and under a CSP with no 'unsafe-inline'. */
|
||||
/* Light by default, dark when the system asks. No external fonts: the page
|
||||
must work offline under a CSP with no 'unsafe-inline'. */
|
||||
|
||||
:root {
|
||||
--bg: #f6f3ee;
|
||||
@@ -10,7 +9,7 @@
|
||||
--panel-2: #fbf9f6;
|
||||
--ink: #1d1a17;
|
||||
--ink-2: #5d564d;
|
||||
/* Same hue as before, darkened to 4.56:1 on --bg (WCAG AA for body text). */
|
||||
/* 4.56:1 on --bg (WCAG AA body text). */
|
||||
--ink-3: #756e62;
|
||||
--rule: #e4ddd1;
|
||||
--rule-2: #cfc6b6;
|
||||
@@ -20,41 +19,92 @@
|
||||
--accent-line: #9ab4d3;
|
||||
--ok: #2f6b45;
|
||||
--ok-soft: #e4f0e8;
|
||||
--stage: #9a6a12;
|
||||
--stage: #8f620f;
|
||||
--stage-soft: #fbf0d8;
|
||||
--warn: #9c3327;
|
||||
--warn-soft: #fbe7e3;
|
||||
/* Text on a --warn fill. */
|
||||
--warn-ink: #ffffff;
|
||||
--focus: #1f6feb;
|
||||
/* Not a color, so the dark blocks need no copy. */
|
||||
--focus-offset: 2px;
|
||||
/* Rank colors for low / mid / high badges (a helper's strength and effort). */
|
||||
--lvl-0: #5b6472;
|
||||
--lvl-0-soft: #e8eaee;
|
||||
--lvl-1: #23716a;
|
||||
--lvl-1-soft: #e1f1ee;
|
||||
--lvl-2: #9a6a12;
|
||||
--lvl-2: #8f620f;
|
||||
--lvl-2-soft: #fbf0d8;
|
||||
--lvl-3: #7a3fa8;
|
||||
--lvl-3-soft: #f1e7f8;
|
||||
--shadow: 0 1px 2px rgba(29, 26, 23, 0.05), 0 8px 24px rgba(29, 26, 23, 0.06);
|
||||
/* A soft accent halo for the things that want noticing: the update banner
|
||||
and an enabled Send. Built from --accent, so a picked accent glows too. */
|
||||
/* Three elevations: cards, popovers, dialogs. --shadow stays for the games. */
|
||||
--shadow-1: 0 1px 2px rgba(29, 26, 23, 0.05), 0 8px 24px rgba(29, 26, 23, 0.06);
|
||||
--shadow-2: 0 2px 4px rgba(29, 26, 23, 0.08), 0 12px 28px rgba(29, 26, 23, 0.14);
|
||||
--shadow-3: 0 24px 64px rgb(0 0 0 / 0.22);
|
||||
--shadow: var(--shadow-1);
|
||||
/* Accent halo for the update banner and an enabled Send; follows --accent. */
|
||||
--glow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 35%, transparent);
|
||||
/* Sticky footer shadow, dialog dim, and form control fill (sunken). */
|
||||
--shadow-up: 0 -4px 14px rgba(29, 26, 23, 0.07);
|
||||
--scrim: rgba(29, 26, 23, 0.45);
|
||||
--field: #fbf9f6;
|
||||
--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
--serif: "Iowan Old Style", Charter, Georgia, Cambria, serif;
|
||||
--serif: "Iowan Old Style", Charter, Cambria, Georgia, serif;
|
||||
--mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
|
||||
/* Shape: xs chips and focus rings, sm small controls, md inputs and rows,
|
||||
--radius cards and dialogs. */
|
||||
--radius-xs: 4px;
|
||||
--radius-sm: 6px;
|
||||
--radius-md: 8px;
|
||||
--radius: 10px;
|
||||
--radius-pill: 999px;
|
||||
/* Layers (local 0/1/2 stacking keeps its literal). The skip link outranks the
|
||||
arrival overlay so a keyboard user can still see it. */
|
||||
--z-sticky: 5;
|
||||
--z-pop: 40;
|
||||
--z-wake: 45;
|
||||
--z-toast: 46;
|
||||
--z-overlay: 50;
|
||||
--z-menu: 60;
|
||||
/* Spacing steps, for new work only. */
|
||||
--sp-1: 4px;
|
||||
--sp-2: 8px;
|
||||
--sp-3: 12px;
|
||||
--sp-4: 16px;
|
||||
--sp-5: 24px;
|
||||
--sp-6: 32px;
|
||||
/* The column's width: the card, the pager and the documents. */
|
||||
--card-width: 880px;
|
||||
/* Type: text steps, h1 to h4, one poster size; weights 400, 600, 700 only. */
|
||||
--fs-2xs: 11px;
|
||||
--fs-xs: 12px;
|
||||
--fs-sm: 13px;
|
||||
--fs-md: 14px;
|
||||
--fs-base: 15px;
|
||||
--fs-lg: 17px;
|
||||
--fs-h4: 16px;
|
||||
--fs-h3: 18px;
|
||||
--fs-h2: 21px;
|
||||
--fs-h1: 25px;
|
||||
--fs-poster: 38px;
|
||||
--lh-tight: 1.25;
|
||||
--lh-ui: 1.4;
|
||||
--lh-body: 1.55;
|
||||
/* Motion. */
|
||||
--dur-1: 120ms;
|
||||
--dur-2: 200ms;
|
||||
--dur-3: 350ms;
|
||||
--ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
--ease-spring: cubic-bezier(0.3, 1.6, 0.5, 1);
|
||||
}
|
||||
/* The card-width presets. These must agree with CARD_WIDTHS in palette.js,
|
||||
which validates the saved choice and paints data-width on first load. */
|
||||
/* Card-width presets: must agree with CARD_WIDTHS in palette.js. */
|
||||
:root[data-width="narrow"] { --card-width: 720px; }
|
||||
:root[data-width="wide"] { --card-width: 1080px; }
|
||||
:root[data-width="ultrawide"] { --card-width: 1440px; }
|
||||
|
||||
/* Dark is written twice on purpose, and the duplication is the whole mechanism.
|
||||
The first copy follows the system unless the person has explicitly asked for
|
||||
light; the second is the explicit ask. Without the `:not()` a system-dark
|
||||
browser would win over someone who chose light in the settings panel. */
|
||||
/* Dark is written twice on purpose. The first copy follows the system unless
|
||||
light was chosen; the second is the explicit ask. Without the `:not()` a
|
||||
system-dark browser would override a chosen light. */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
--bg: #171513;
|
||||
@@ -62,7 +112,7 @@
|
||||
--panel-2: #262220;
|
||||
--ink: #f0ece5;
|
||||
--ink-2: #b6afa3;
|
||||
--ink-3: #8b8376;
|
||||
--ink-3: #9a9285;
|
||||
--rule: #332e29;
|
||||
--rule-2: #46403a;
|
||||
--accent: #619fe5;
|
||||
@@ -75,6 +125,7 @@
|
||||
--stage-soft: #332a17;
|
||||
--warn: #f0897a;
|
||||
--warn-soft: #34201d;
|
||||
--warn-ink: #1a0f0d;
|
||||
--lvl-0: #a9b1bf;
|
||||
--lvl-0-soft: #262a31;
|
||||
--lvl-1: #6cc4b8;
|
||||
@@ -84,8 +135,14 @@
|
||||
--lvl-3: #c49bea;
|
||||
--lvl-3-soft: #2a2035;
|
||||
--focus: #6aa3ff;
|
||||
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
|
||||
--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
|
||||
--shadow-2: 0 4px 8px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.45);
|
||||
--shadow-3: 0 24px 64px rgb(0 0 0 / 0.55);
|
||||
--shadow-up: 0 -1px 0 var(--rule-2), 0 -6px 18px rgba(0, 0, 0, 0.5);
|
||||
--scrim: rgba(0, 0, 0, 0.6);
|
||||
--field: #1b1816;
|
||||
--glow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +152,7 @@
|
||||
--panel-2: #262220;
|
||||
--ink: #f0ece5;
|
||||
--ink-2: #b6afa3;
|
||||
--ink-3: #8b8376;
|
||||
--ink-3: #9a9285;
|
||||
--rule: #332e29;
|
||||
--rule-2: #46403a;
|
||||
--accent: #619fe5;
|
||||
@@ -108,6 +165,7 @@
|
||||
--stage-soft: #332a17;
|
||||
--warn: #f0897a;
|
||||
--warn-soft: #34201d;
|
||||
--warn-ink: #1a0f0d;
|
||||
--lvl-0: #a9b1bf;
|
||||
--lvl-0-soft: #262a31;
|
||||
--lvl-1: #6cc4b8;
|
||||
@@ -117,11 +175,24 @@
|
||||
--lvl-3: #c49bea;
|
||||
--lvl-3-soft: #2a2035;
|
||||
--focus: #6aa3ff;
|
||||
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
|
||||
--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
|
||||
--shadow-2: 0 4px 8px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.45);
|
||||
--shadow-3: 0 24px 64px rgb(0 0 0 / 0.55);
|
||||
--shadow-up: 0 -1px 0 var(--rule-2), 0 -6px 18px rgba(0, 0, 0, 0.5);
|
||||
--scrim: rgba(0, 0, 0, 0.6);
|
||||
--field: #1b1816;
|
||||
--glow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
|
||||
|
||||
/* Georgia, the Windows serif, has only old-style figures and ignores lining-nums
|
||||
(checked in Chrome on Windows), so Cambria sits ahead of it in --serif. */
|
||||
h1, h2, h3, .md-h, .dash-title, .git-branch, .git-step-title { font-variant-numeric: lining-nums; text-wrap: balance; }
|
||||
.launch-title, .arrival-title { text-wrap: balance; }
|
||||
.md-p, .card .prompt { text-wrap: pretty; }
|
||||
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
|
||||
|
||||
html, body { height: 100%; }
|
||||
|
||||
@@ -129,7 +200,7 @@ body {
|
||||
margin: 0;
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
font: 15px/1.55 var(--sans);
|
||||
font: var(--fs-base)/var(--lh-body) var(--sans);
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
min-height: 100vh;
|
||||
@@ -137,8 +208,21 @@ body {
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--focus);
|
||||
outline-offset: 2px;
|
||||
border-radius: 4px;
|
||||
outline-offset: var(--focus-offset);
|
||||
border-radius: var(--radius-xs);
|
||||
}
|
||||
|
||||
/* The one small-caps label: every selector here is an eyebrow. Own rules add
|
||||
only margin, color or a deliberate difference (posters widen spacing to 0.14em). */
|
||||
.dash-group-title, .spec-chip-state, .handoff-preview-label, .block-tag,
|
||||
.handoff-label, .git-step-kicker, .git-table th, .help-row dt,
|
||||
.lessons-fix-label, .card-kicker, .note-kicker, .option-group, .answered-head,
|
||||
.pager-kicker, .modal-ranges legend, .rail-title, .rail-end-label, .aside h2,
|
||||
.msg-who, .arrival-kicker, .welcome-kicker {
|
||||
font: 700 var(--fs-2xs)/1.3 var(--sans);
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
|
||||
.skip {
|
||||
@@ -148,14 +232,12 @@ body {
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
padding: 10px 16px;
|
||||
z-index: 50;
|
||||
z-index: var(--z-menu);
|
||||
border-radius: 0 0 var(--radius) 0;
|
||||
}
|
||||
.skip:focus { left: 0; }
|
||||
|
||||
/* Pin each region to its own row rather than relying on order: the banner
|
||||
is fixed now and never a grid item, but keeping the rows explicit means a
|
||||
future element that hides the same way cannot shuffle the tracks. */
|
||||
/* Explicit rows, so a future element hidden the same way cannot shuffle tracks. */
|
||||
.topbar { grid-row: 1; }
|
||||
.layout { grid-row: 2; }
|
||||
.footer { grid-row: 3; }
|
||||
|
||||
@@ -36,10 +36,10 @@ export const STRENGTHS = Object.freeze(["balanced", "thrifty", "best", "session"
|
||||
export const DEFAULT_STRENGTH = "balanced";
|
||||
// The line under the dialog's strength radios for the picked one.
|
||||
export const STRENGTH_HELP = Object.freeze({
|
||||
balanced: "Each helper gets the strength its job needs: light for lookups, stronger for reviews and design work.",
|
||||
balanced: "Each subagent gets the strength its job needs: light for lookups, stronger for reviews and design work.",
|
||||
thrifty: "One step lighter everywhere to save cost; reviews stay at standard or above.",
|
||||
best: "The strongest model and high effort for everything except lookups.",
|
||||
session: "Helpers run on whatever your session uses; nothing is set for them.",
|
||||
session: "Subagents run on whatever your session uses; nothing is set for them.",
|
||||
});
|
||||
// What a reported helper may say it actually ran with.
|
||||
export const HELPER_STRENGTHS = Object.freeze(["light", "standard", "strongest", "inherit"]);
|
||||
|
||||
@@ -30,12 +30,23 @@ const NARROW = "(max-width: 720px)";
|
||||
// `panels` the element holding one child per tab marked data-tab="<id>".
|
||||
// `beforeSelect(from, to)` returning false, or a Promise of false, holds the
|
||||
// switch; `onSelect(id)` runs after one.
|
||||
export function wireTabs({ tabs, list, panels, prefix, tabClass, renderTab, beforeSelect, onSelect }) {
|
||||
export function wireTabs({ tabs, list, panels, prefix, tabClass, renderTab, beforeSelect, onSelect, groupStart, groupClass = "tab-group" }) {
|
||||
const tabId = (id) => `${prefix}-tab-${id}`;
|
||||
const panelId = (id) => `${prefix}-panel-${id}`;
|
||||
let selected = null;
|
||||
|
||||
for (const t of tabs) {
|
||||
// A group heading: text only, never a tab stop, so the arrow keys skip it
|
||||
// (they walk `tabs`, not the list's children).
|
||||
const heading = groupStart ? groupStart(t.id) : null;
|
||||
if (heading) {
|
||||
const head = document.createElement("div");
|
||||
head.className = groupClass;
|
||||
head.setAttribute("role", "presentation");
|
||||
head.dataset.before = t.id;
|
||||
head.textContent = heading;
|
||||
list.appendChild(head);
|
||||
}
|
||||
const btn = document.createElement("button");
|
||||
btn.type = "button";
|
||||
btn.className = tabClass;
|
||||
@@ -60,15 +71,44 @@ export function wireTabs({ tabs, list, panels, prefix, tabClass, renderTab, befo
|
||||
panel.hidden = true;
|
||||
}
|
||||
|
||||
// The tabs a filter has not hidden, in order: what the arrow keys walk.
|
||||
const shown = () => tabs.filter((t) => !document.getElementById(tabId(t.id)).hidden);
|
||||
|
||||
list.addEventListener("keydown", (e) => {
|
||||
const current = tabs.findIndex((t) => tabId(t.id) === e.target.id);
|
||||
const walk = shown();
|
||||
const current = walk.findIndex((t) => tabId(t.id) === e.target.id);
|
||||
if (current < 0) return;
|
||||
const n = tabKeyTarget(e.key, current, tabs.length);
|
||||
const n = tabKeyTarget(e.key, current, walk.length);
|
||||
if (n < 0) return;
|
||||
e.preventDefault();
|
||||
select(tabs[n].id, { focus: true });
|
||||
select(walk[n].id, { focus: true });
|
||||
});
|
||||
|
||||
// Hides the tabs `keep(tab)` refuses, and a group heading once none of its
|
||||
// tabs is left. Returns how many tabs are still shown. The selected tab's
|
||||
// panel stays up either way.
|
||||
function filter(keep) {
|
||||
let count = 0;
|
||||
// One tab stop at a time: the selected tab's, or, when the filter hides it,
|
||||
// the first one still shown, so the list stays reachable by keyboard.
|
||||
for (const t of tabs) document.getElementById(tabId(t.id)).tabIndex = -1;
|
||||
for (const t of tabs) {
|
||||
const on = !keep || Boolean(keep(t));
|
||||
document.getElementById(tabId(t.id)).hidden = !on;
|
||||
if (on) count++;
|
||||
}
|
||||
// A heading belongs to the run of tabs from its own to the next heading.
|
||||
const heads = [...list.querySelectorAll("." + groupClass)];
|
||||
heads.forEach((head, i) => {
|
||||
const from = tabs.findIndex((t) => t.id === head.dataset.before);
|
||||
const next = heads[i + 1] ? tabs.findIndex((t) => t.id === heads[i + 1].dataset.before) : tabs.length;
|
||||
head.hidden = !tabs.slice(from, next).some((t) => !document.getElementById(tabId(t.id)).hidden);
|
||||
});
|
||||
const stop = tabs.find((t) => t.id === selected && !document.getElementById(tabId(t.id)).hidden) || shown()[0];
|
||||
if (stop) document.getElementById(tabId(stop.id)).tabIndex = 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
const narrow = matchMedia(NARROW);
|
||||
const orient = () => list.setAttribute("aria-orientation", narrow.matches ? "horizontal" : "vertical");
|
||||
orient();
|
||||
@@ -99,5 +139,5 @@ export function wireTabs({ tabs, list, panels, prefix, tabClass, renderTab, befo
|
||||
return true;
|
||||
}
|
||||
|
||||
return { select, current: () => selected };
|
||||
return { select, filter, shown, current: () => selected };
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Shared by the question cards and the Ask pane, so neither imports the other.
|
||||
|
||||
import { SVG_NS, el } from "./render.js";
|
||||
import { SVG_NS, el, icon } from "./render.js";
|
||||
import {
|
||||
docExt,
|
||||
formatBytes,
|
||||
@@ -66,7 +66,7 @@ export function docChip(entry, status) {
|
||||
// card's own. Files go to the item's note attachments either way.
|
||||
export function attachRow(itemId, ariaLabel) {
|
||||
const row = el("div", "attach-row");
|
||||
const btn = el("button", "btn small ghost", "+ Attach file");
|
||||
const btn = el("button", "btn sm ghost", "+ Attach file");
|
||||
btn.type = "button";
|
||||
btn.setAttribute("aria-label", ariaLabel);
|
||||
btn.disabled = noteImages(itemId).length >= MAX_ATTACHMENTS;
|
||||
@@ -114,7 +114,8 @@ export function attachTray(itemId, attached) {
|
||||
fig.appendChild(open);
|
||||
}
|
||||
}
|
||||
const rm = el("button", "attach-remove", "×");
|
||||
const rm = el("button", "attach-remove");
|
||||
rm.appendChild(icon("close"));
|
||||
rm.type = "button";
|
||||
rm.setAttribute("aria-label", `Remove ${img.name}`);
|
||||
rm.addEventListener("click", () => removeImage(itemId, img.key));
|
||||
@@ -126,10 +127,10 @@ export function attachTray(itemId, attached) {
|
||||
} else if (img.status === "failed") {
|
||||
const over = el("div", "attach-overlay failed");
|
||||
over.appendChild(el("span", null, "Upload failed"));
|
||||
const retry = el("button", "btn tiny", "Retry");
|
||||
const retry = el("button", "btn xs soft", "Retry");
|
||||
retry.type = "button";
|
||||
retry.addEventListener("click", () => retryImage(itemId, img.key));
|
||||
const drop = el("button", "btn tiny", "Remove");
|
||||
const drop = el("button", "btn xs soft", "Remove");
|
||||
drop.type = "button";
|
||||
drop.addEventListener("click", () => removeImage(itemId, img.key));
|
||||
over.appendChild(retry);
|
||||
@@ -218,7 +219,14 @@ const retryBlobs = new Map();
|
||||
export const noteImages = (itemId) =>
|
||||
itemId === CHAT_IMAGES ? page.local.chat.images : (page.local.images && page.local.images[itemId]) || [];
|
||||
|
||||
const findImage = (itemId, key) => noteImages(itemId).find((img) => img.key === key) || null;
|
||||
// A picture set aside by Clear (its Undo window is open) is still found by an
|
||||
// upload that lands meanwhile, so Undo restores it finished, not stuck uploading.
|
||||
let setAside = () => null;
|
||||
export function findSetAside(fn) {
|
||||
setAside = fn;
|
||||
}
|
||||
|
||||
const findImage = (itemId, key) => noteImages(itemId).find((img) => img.key === key) || setAside(itemId, key) || null;
|
||||
|
||||
function setNoteImages(itemId, list) {
|
||||
if (itemId === CHAT_IMAGES) page.local.chat.images = list;
|
||||
@@ -344,6 +352,20 @@ export async function removeImage(itemId, key) {
|
||||
if (img && img.id) fetch(deleteUrl(img), { method: "DELETE" }).catch(() => {});
|
||||
}
|
||||
|
||||
// Forgets pictures that were set aside by Clear once its Undo window closed:
|
||||
// their thumbnails, retry blobs and the files on the server. `lists` is the
|
||||
// page.local.images shape ({ itemId: [image] }). Errors are ignored: the
|
||||
// 30-day sweep is the backstop.
|
||||
export function purgeImages(lists) {
|
||||
for (const list of Object.values(lists || {})) {
|
||||
for (const img of list) {
|
||||
thumbs.delete(img.key);
|
||||
retryBlobs.delete(img.key);
|
||||
if (img && img.id) fetch(deleteUrl(img), { method: "DELETE" }).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function retryImage(itemId, key) {
|
||||
const blob = retryBlobs.get(key);
|
||||
if (blob) return uploadBlob(itemId, key, blob);
|
||||
|
||||
@@ -380,8 +380,8 @@ function renderIndex(ctx) {
|
||||
)
|
||||
.replace('<h1 id="title">Plan2Code Console</h1>', () => `<h1 id="title">${escHtml(title)}</h1>`)
|
||||
.replace(
|
||||
'<span class="badge" id="badge">Pathfinder</span>',
|
||||
() => `<span class="badge" id="badge">${escHtml(workflowLabel(workflow))}</span>`
|
||||
'<span class="pill is-accent is-caps badge" id="badge">Pathfinder</span>',
|
||||
() => `<span class="pill is-accent is-caps badge" id="badge">${escHtml(workflowLabel(workflow))}</span>`
|
||||
)
|
||||
.replace(
|
||||
'<h2 class="launch-title" id="boot-title">Opening the console</h2>',
|
||||
|
||||
@@ -478,7 +478,9 @@ function refusalLine(names) {
|
||||
* notepad whose newest file is `maxAgeMs` old is listed too, one item per
|
||||
* folder carrying the `folder` it belongs to (null when its meta.json is gone):
|
||||
* this is the only way a notepad is ever removed.
|
||||
* Resolves to `{ items: [{ id, where, name, kind, bytes, folder? }], bytes }`.
|
||||
* Resolves to `{ items: [{ id, where, name, kind, bytes, folder?, title?, workflow?, at? }], bytes }`;
|
||||
* a session item also carries its `title`, `workflow` and `at` (when it was last touched, ISO), which the
|
||||
* page reads in place of the folder name. Paths never go to the page.
|
||||
*/
|
||||
export async function cleanupFindings({
|
||||
consoleDir = HOME_DIR,
|
||||
@@ -492,7 +494,19 @@ export async function cleanupFindings({
|
||||
const sessionsDir = path.join(consoleDir, "sessions");
|
||||
for (const sid of staleSessions(sessionsDir, now, maxAgeMs, skipSid)) {
|
||||
if (now - newestMtime(path.join(sessionsDir, sid)) <= maxAgeMs) continue;
|
||||
found.push({ id: "session:" + sid, where: "session", name: sid, kind: "folder", path: path.join(sessionsDir, sid) });
|
||||
const dir = path.join(sessionsDir, sid);
|
||||
const state = readJson(path.join(dir, "state.json"), null);
|
||||
const str = (v) => (typeof v === "string" ? v.slice(0, 120) : "");
|
||||
found.push({
|
||||
id: "session:" + sid,
|
||||
where: "session",
|
||||
name: sid,
|
||||
kind: "folder",
|
||||
path: dir,
|
||||
title: str(state && state.title),
|
||||
workflow: str(state && state.workflow),
|
||||
at: new Date(newestMtime(dir)).toISOString(),
|
||||
});
|
||||
}
|
||||
found.push(...strayEntries(consoleDir, KEPT_CONSOLE_ENTRIES, "console", now, CONSOLE_VERSION_DIR));
|
||||
if (path.resolve(consoleDir) === path.resolve(plan2codeDir, "console")) {
|
||||
@@ -513,6 +527,7 @@ export async function cleanupFindings({
|
||||
bytes += size;
|
||||
const item = { id: f.id, where: f.where, name: f.name, kind: f.kind, bytes: size, path: f.path };
|
||||
if (f.where === "notepad") item.folder = f.folder;
|
||||
if (f.where === "session") Object.assign(item, { title: f.title, workflow: f.workflow, at: f.at });
|
||||
if (f.where === "completed") item.tracked = f.tracked;
|
||||
items.push(item);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user