Show a spinner on a note that is sent and waiting for Plan2Code

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-08 07:56:54 -08:00
1 parent 275f1cb320
commit 9f4ee75c0b
4 files changed
+21 -2

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ All notable changes to Plan2Code will be documented in this file.
- **desktop app**: the agent setup page's **Back** button now sits in the app's top bar instead of floating over the page, where it covered the settings and help icons.
- **web console**: the agent setup page's middle pane now scrolls, so the agent options below the fold (the rest of the list and the templates) can be reached. The list used to be cut off with no scrollbar.
- **web console**: the **Install page** link on the agent setup page now opens in your default browser inside the desktop app. It did nothing there, because the page was not told it was running in the app.
- **web console**: a note you have sent now shows a small spinner in front of "Sent, waiting for Plan2Code" in the Notes panel, so it is clear Plan2Code is still working on it. The spinner hides when the agent has gone quiet, so a dead session is not mistaken for a slow one.
## v3.0.3
+1
View File
@@ -433,6 +433,7 @@ test("a request for suggestions shows tagged and waiting, and the chip comes bac
const mine = s.page.locator("#aside .msg.you.pending");
await mine.locator(".suggest-tag", { hasText: "Asked for suggestions" }).waitFor();
assert.match(await textOf(mine), /Sent, waiting for Plan2Code/i);
assert.equal(await mine.locator(".msg-who .sent-wait .spinner").count(), 1, "a pending note shows the ring");
await s.page.waitForFunction(() => document.getElementById("suggest-c1")?.disabled);
s.post({ items: [{ id: "c1", thread: [{ who: "agent", text: "I would pick JSON: your scripts read it directly." }] }], agent: { status: "waiting" } });
+17 -2
View File
@@ -678,7 +678,7 @@ export function renderAside() {
const box = el("div", "msg" + (mine ? " you" : "") + (pending ? " pending" : ""));
const who = el("div", "msg-who");
who.appendChild(el("span", null, mine ? "You" : "Plan2Code"));
if (pending) who.appendChild(el("span", null, "Sent, waiting for Plan2Code"));
if (pending) who.appendChild(sentWaitingTag());
else if (m.at) who.appendChild(el("span", null, shortTime(m.at)));
box.appendChild(who);
if (m.suggest === true) box.appendChild(suggestTag());
@@ -693,7 +693,7 @@ export function renderAside() {
const box = el("div", "msg you pending");
const who = el("div", "msg-who");
who.appendChild(el("span", null, "You"));
who.appendChild(el("span", null, "Sent, waiting for Plan2Code"));
who.appendChild(sentWaitingTag());
box.appendChild(who);
if (waiting.suggest === true) box.appendChild(suggestTag());
if (waiting.text) box.appendChild(md(waiting.text, "md"));
@@ -771,6 +771,21 @@ function suggestChip(item) {
return chip;
}
// The label on a note that is sent and not yet picked up, with the page's small
// ring in front so it is plain Plan2Code is still on it. Like the Ask reply
// line, no ring once the agent has gone quiet: a turning ring would pass a
// dead session for a slow one.
function sentWaitingTag() {
const tag = el("span", "sent-wait");
if (askState().send.state !== "offline" && !agentAdrift()) {
const spin = el("span", "spinner tiny");
spin.setAttribute("aria-hidden", "true");
tag.appendChild(spin);
}
tag.appendChild(el("span", null, "Sent, waiting for Plan2Code"));
return tag;
}
function suggestTag() {
return el("span", "pill suggest-tag", "Asked for suggestions");
}
+2
View File
@@ -414,6 +414,8 @@ h1 {
color: var(--ink-3); 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.