Sync upstream v3.2.6: Loop checkboxes, Notes drag handle, US English replies, app update fetch (v3.2.6)

- Implement's and Review's confirm panes carry a Loop checkbox in place of
  the dashboard's loop cards; loop end-screen buttons show a spinner.
- The stacked Notes panel gets a drag handle.
- Every skill prompt and the console contracts say to reply in US English.
- The desktop app offers Update to latest when the skills are newer, and
  plan2code update refetches an app that install.json does not record.
- Devin Balanced maps to Sonnet 5.5 Medium.
This commit is contained in:
jparkerweb committed 2026-12-04 22:35:28 -08:00
1 parent 9629961f36
commit 658c813428
70 files changed
+818 -242

No files matched your search

+52 -46
View File
@@ -30,9 +30,8 @@ import {
CATALOG_GROUPS,
SKILL_CATALOG,
catalogEntry,
LOOP_ENTRY,
APP_ONLY_ENTRIES,
OUTSIDE_APP_LINE,
loopFor,
loopBoxState,
launchVariant,
SPEC_STATE_LABELS,
chipDetail,
@@ -298,17 +297,12 @@ export function renderDashboard(main) {
let shown = 0;
for (const g of CATALOG_GROUPS) {
const entries = SKILL_CATALOG.filter((e) => e.group === g.id && (!hide || available(e)));
// The desktop app's Implementation Loop and Review Loop cards close their
// group. Outside the app they are always drawn, grayed, so the features can
// be found.
const loopCards = APP_ONLY_ENTRIES.filter((e) => e.group === g.id && (!page.inApp || !hide || available(e)));
if (!entries.length && !loopCards.length) continue;
shown += entries.length + loopCards.length;
if (!entries.length) continue;
shown += entries.length;
const section = el("section", "dash-group");
section.appendChild(el("h3", "dash-group-title", g.title));
const grid = el("div", "dash-grid");
for (const e of entries) grid.appendChild(dashCard(e, menu));
for (const e of loopCards) grid.appendChild(dashCard(e, menu));
section.appendChild(grid);
wrap.appendChild(section);
}
@@ -755,10 +749,8 @@ async function readHandoff(h) {
}
}
const REVIEW_LOOP_SKILL = "plan2code-review-loop";
function dashCard(entry, menu) {
const presentation = entry.appOnly ? loopPresentation(entry, menu) : cardPresentation(entry, scan(), selSpec(), menu);
const presentation = cardPresentation(entry, scan(), selSpec(), menu);
// The agent's `recommend` and detail describe the initially selected spec.
// Other picker choices derive both from the scan, so stale context never
// follows a person to a different spec or to "start from scratch". A grayed
@@ -789,7 +781,7 @@ function dashCard(entry, menu) {
title.appendChild(document.createTextNode(entry.title));
b.appendChild(title);
b.appendChild(el("span", "dash-card-blurb", entry.blurb));
// A line only the desktop app shows (the Review card's pointer to the Review Loop).
// A line only the desktop app shows (a card's `appNote`).
if (entry.appNote && page.inApp) b.appendChild(el("span", "dash-card-detail", entry.appNote));
if (presentation.detail) b.appendChild(el("span", "dash-card-detail", presentation.detail));
if (!presentation.on && presentation.reason) b.appendChild(el("span", "dash-card-off", presentation.reason));
@@ -800,43 +792,13 @@ function dashCard(entry, menu) {
b.appendChild(foot);
b.addEventListener("click", () => {
// A loop card opens its own setup screen instead of a confirm pane.
if (entry.appOnly) return entry.skill === REVIEW_LOOP_SKILL ? hooks.openReviewLoopSetup(selSpec()) : hooks.openLoopSetup(selSpec());
page.dashPick = entry;
page.dashLoop = false;
redraw();
});
// "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(entry));
return wrap;
}
return b;
}
// The loop card is lit only inside the desktop app and, there, by the same
// rule as Implement (a documented or building spec). Never recommended or
// pre-selected: a person opts into running unattended.
function loopPresentation(entry, menu) {
if (!page.inApp) return { on: false, reason: OUTSIDE_APP_LINE, recommended: false, detail: "" };
if (entry.skill === REVIEW_LOOP_SKILL && loopDriving()) {
return { on: false, reason: "A loop is running. Stop it from the banner at the top of the window first.", recommended: false, detail: "" };
}
return { ...cardPresentation(entry, scan(), selSpec(), menu), recommended: false };
}
// "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(entry) {
const review = entry && entry.skill === REVIEW_LOOP_SKILL;
const a = el("button", "dash-card-link", review ? "How the Review Loop works" : "How the loop works");
a.type = "button";
a.addEventListener("click", () => hooks.openHelpOn(review ? "review-loop" : "loop"));
return a;
}
// "Start with a note from your Notebook": the switch a lit card's confirm
// pane offers when noteSwitchShows() says so. The pane is rebuilt on every
// state frame, so what the person did lives here, keyed to the card and the
@@ -1066,6 +1028,12 @@ function notePreview(picked, state, again) {
return pane;
}
// The Loop box's words on each confirm pane, before the loop's name.
const LOOP_BOX_TEXT = {
"plan2code-loop": "Build every phase unattended",
"plan2code-review-loop": "Review and fix in rounds",
};
// The confirm pane. A card or rail click lands here rather than launching
// straight away: picking a skill is the one irreversible-feeling click on the
// dashboard, and it deserves a beat: what it is, what it will do, and a
@@ -1134,6 +1102,29 @@ export function renderConfirm(main, entry) {
pane.appendChild(label);
}
// Implement's and Review's cards: the Loop box opens the desktop app's
// matching loop setup screen in place of a launch. Outside the app, or while
// a loop runs, it shows grayed with the reason, so the feature can be found.
let loop = null;
const loopEntry = entry.loop ? loopFor(entry) : null;
if (loopEntry) {
const box = loopBoxState(entry, scan(), selSpec(), { inApp: page.inApp, driving: loopDriving() });
if (!review) pane.appendChild(el("hr", "confirm-rule"));
const label = el("label", "confirm-review confirm-loop" + (box.on ? "" : " is-off"));
loop = el("input");
loop.type = "checkbox";
loop.disabled = !box.on;
loop.checked = box.on && page.dashLoop === true;
loop.addEventListener("change", () => {
page.dashLoop = loop.checked;
showLoop();
});
label.append(loop, el("span", null, `${LOOP_BOX_TEXT[loopEntry.skill] || "Run unattended"} (${loopEntry.name})`));
pane.appendChild(label);
if (!box.on && box.reason) pane.appendChild(el("p", "confirm-loop-off", box.reason));
}
const looping = () => Boolean(loop) && !loop.disabled && loop.checked;
// The Notebook switch, on the cards and specs noteSwitchShows() names.
const cmdNote = el("span", "confirm-cmd-note");
cmdNote.hidden = true;
@@ -1163,17 +1154,31 @@ export function renderConfirm(main, entry) {
const start = el("button", "btn primary", "Start " + entry.title);
start.type = "button";
start.disabled = page.gone || page.pendingResult;
start.addEventListener("click", () => launchSkill(launchVariant(entry, Boolean(review) && review.checked)));
start.addEventListener("click", () => {
if (!looping()) return launchSkill(launchVariant(entry, Boolean(review) && review.checked));
if (entry.loop === "plan2code-loop") hooks.openLoopSetup(selSpec());
else hooks.openReviewLoopSetup(selSpec());
});
const back = el("button", "btn ghost", "Back");
back.type = "button";
back.addEventListener("click", () => {
page.dashPick = null;
page.dashLoop = false;
redraw();
});
actions.appendChild(back);
actions.appendChild(start);
tail.appendChild(actions);
pane.appendChild(tail);
// A ticked Loop box hands Start to the loop's setup screen: the Review box
// grays (the loop setup has its own review choice) and the command and
// Start name the loop. Run once here so a re-render keeps the tick's look.
function showLoop() {
if (review) review.disabled = looping();
cmdCode.textContent = looping() ? "Desktop app only" : launchVariant(entry, !review || review.checked).command;
start.textContent = looping() ? "Set up " + loopEntry.name : "Start " + entry.title;
}
if (loopEntry) showLoop();
main.appendChild(pane);
// Focus lands on START after a pick (the clicked control was rebuilt away,
@@ -1200,6 +1205,7 @@ export async function launchSkill(entry) {
return;
}
page.dashPick = null;
page.dashLoop = false;
const action = {
i: "__launch",
type: "launch",