From f968aeded87806285dfb33f3e8b6e025baf094a8 Mon Sep 17 00:00:00 2001 From: Justin Parker Date: Sun, 4 Oct 2026 20:14:53 -0700 Subject: [PATCH] Show a small spinner left of the web console's Questions and Ask tab names while Plan2Code is on it: Questions spins from Send until the answers are picked up, Ask while a picked-up question has no answer yet, and neither turns once the agent goes quiet or offline --- CHANGELOG.md | 1 + .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- .../references/web-console/public/app.css | 13 ++++++++----- .../references/web-console/public/app.js | 17 +++++++++++++++-- .../references/web-console/public/index.html | 3 +-- src/web-console/public/app.css | 13 ++++++++----- src/web-console/public/app.js | 17 +++++++++++++++-- src/web-console/public/index.html | 3 +-- 43 files changed, 337 insertions(+), 126 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2b7a2d..c37ed5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ All notable changes to Plan2Code will be documented in this file. - **commit-msg.mjs**, **review-scope.mjs**, **agents-md.mjs**, **agent-files.mjs**, **handoff-path.mjs**: the commit command from the branch's ticket, Review's git scope and doc share, AGENTS.md's structure and orphans, the AI agent file sync, and the handoff's timestamped path and git ignore check. - **tests**: `scripts/test-skill-scripts.mjs` and `scripts/test-script-.mjs`, run by `npm test` against the built `skills/` tree. One test fails if a `SKILL.md` names a script its skill does not ship. - **web console**: the Workspace dialog's folders are remembered across console sessions, in `~/.plan2code/console/workspaces.json` beside `looks.json` (never in the project), keyed by the folder a session runs in and then by spec. Every change is saved. *Start from scratch* on the dashboard shows the project's list; picking a spec loads its own, which starts as a copy of the project's and is separate after that, and a spec created mid-run takes the list in force with it. The dialog says whose list it is. New `console.mjs forget --spec specs/`, which Finalize's Spec Cleanup runs after archiving a spec. +- **web-console**: the Questions and Ask tabs show a small spinner left of their name while Plan2Code is on it. Questions (Dashboard on the dashboard) spins from Send until the answers are picked up, the same wait as *Sent. Waiting for Plan2Code.*; Ask spins while a question the agent picked up has no answer yet, exactly when the conversation's own ring does. Neither turns once the agent goes quiet or offline, so a dead session never reads as a slow one. ### 🔧 Changed diff --git a/skills/plan2code-0-pathfinder/references/web-console/public/app.css b/skills/plan2code-0-pathfinder/references/web-console/public/app.css index 698a36d..7f5c617 100644 --- a/skills/plan2code-0-pathfinder/references/web-console/public/app.css +++ b/skills/plan2code-0-pathfinder/references/web-console/public/app.css @@ -1096,6 +1096,14 @@ h1 { .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. */ +.view-tab .tab-spin { + display: inline-block; + margin-right: 6px; + vertical-align: -1px; +} + /* A reply landed while another tab was open. */ .view-tab .tab-dot { display: inline-block; @@ -3144,11 +3152,6 @@ a.icon-btn { box-sizing: border-box; text-decoration: none; } 0%, 15%, 75%, 100% { transform: scale(1); opacity: 0.16; } 45% { transform: scale(0.7); opacity: 0.08; } } -.pose .fz-halo { opacity: 0.25; animation: fz-halo 1.6s ease-in-out infinite; } -@keyframes fz-halo { - 0%, 100% { transform: scale(1); opacity: 0.2; } - 45% { transform: scale(1.3); opacity: 0.4; } -} .pose .fz-tick { stroke: var(--accent-ink); } .pose .fz-flag { transform-origin: 0% 50%; animation: fz-wave 1.2s ease-in-out infinite; } @keyframes fz-wave { diff --git a/skills/plan2code-0-pathfinder/references/web-console/public/app.js b/skills/plan2code-0-pathfinder/references/web-console/public/app.js index 2288022..e133580 100644 --- a/skills/plan2code-0-pathfinder/references/web-console/public/app.js +++ b/skills/plan2code-0-pathfinder/references/web-console/public/app.js @@ -1825,8 +1825,11 @@ function renderBriefButton() { function renderViews() { const nav = $("views"); nav.replaceChildren(); + // Sent and not yet picked up: the same ring as Ask, until Plan2Code moves on + // or goes quiet (a turning ring would pass a dead session for a slow one). + const sentBusy = pendingResult && !gone && !agentAdrift(); const tabs = [ - { id: "questions", label: isDashboard() ? "Dashboard" : "Questions", count: myTurn().length }, + { id: "questions", label: isDashboard() ? "Dashboard" : "Questions", count: myTurn().length, busy: sentBusy }, ]; // Built in rather than posted: present exactly while the spec in view has // an overview.md. A tab that vanishes under the person sends them home. @@ -1835,11 +1838,21 @@ function renderViews() { else if (view === "overview") view = "questions"; for (const d of docs()) tabs.push({ id: "doc:" + d.id, label: d.title || "Document", count: 0 }); // Always last, on every workflow and after a finish: the Quick question chat. - tabs.push({ id: "ask", label: "Ask", count: 0, dot: chatDot }); + // The ring left of "Ask" shows exactly when the conversation's own ring does: + // a question the agent picked up and has not answered yet. + const ask = askState(); + const askBusy = ask.view.rows.some((r) => r.working) && ask.send.state !== "offline" && !agentAdrift(); + tabs.push({ id: "ask", label: "Ask", count: 0, dot: chatDot, busy: askBusy }); for (const t of tabs) { const b = el("button", "view-tab", t.label); b.type = "button"; + if (t.busy) { + const spin = el("span", "spinner tiny tab-spin"); + spin.setAttribute("aria-hidden", "true"); + b.prepend(spin); + b.title = t.id === "ask" ? "Plan2Code is working on an answer" : "Sent. Waiting for Plan2Code"; + } b.setAttribute("aria-current", String(view === t.id || (t.id === "questions" && view === "end"))); if (t.count) { const c = el("span", "tab-count", String(t.count)); diff --git a/skills/plan2code-0-pathfinder/references/web-console/public/index.html b/skills/plan2code-0-pathfinder/references/web-console/public/index.html index dedc0f8..66f2f0e 100644 --- a/skills/plan2code-0-pathfinder/references/web-console/public/index.html +++ b/skills/plan2code-0-pathfinder/references/web-console/public/index.html @@ -405,7 +405,7 @@ + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. --> + flag, confetti drifting down. -->