mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-29 13:21:18 -08:00
Add the Review Loop: unattended review-and-fix rounds in the desktop app and in loop phases
AI Assisted
This commit is contained in:
1 parent
d6a28b5dc8
commit
57567d7a0b
71 files changed
+11331
-443
No files matched your search
@@ -68,6 +68,7 @@ import {
|
||||
import { sound } from "../sound.js";
|
||||
import { renderConfirm, renderDashboard } from "./dashboard.js";
|
||||
import { renderLoopSetup } from "./loop-setup.js";
|
||||
import { renderReviewLoopSetup } from "./review-loop-setup.js";
|
||||
import { renderLaunching, renderWaiting } from "./starting.js";
|
||||
import { attachFiles, findSetAside, heldNotes, noteImages, pendingNotes, purgeImages } from "../uploads.js";
|
||||
import { closeMentions } from "../mention-box.js";
|
||||
@@ -82,6 +83,7 @@ import { framed, linkLeavesPage, onAppMessage, shortcutIdFor, startNewSession, t
|
||||
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 { forgetReviewEnd } from "../review-loop-end.js";
|
||||
import { renderHandoff, renderLoopEnd, renderHomeButton, renderStopButton, renderStopControls, renderStopping, renderFooterDashboard, stopInProgress, stopWarning } from "./ending.js";
|
||||
import { renderNotepadButton } from "./notepad.js";
|
||||
import { renderActivities } from "./activities.js";
|
||||
@@ -107,6 +109,7 @@ export { wireEnding } from "./ending.js";
|
||||
export { wireNotepad } from "./notepad.js";
|
||||
export { wireActivities } from "./activities.js";
|
||||
export { openLoopSetup, wireLoopSetup } from "./loop-setup.js";
|
||||
export { openReviewLoopSetup } from "./review-loop-setup.js";
|
||||
|
||||
const $ = (id) => document.getElementById(id);
|
||||
|
||||
@@ -450,6 +453,7 @@ export function adopt(body) {
|
||||
if (!isDashboard() || finish()) {
|
||||
page.dashPick = null;
|
||||
page.loopSetup = null;
|
||||
page.reviewLoopSetup = null;
|
||||
}
|
||||
// A launch (or an ending) mid wake-up: cut it short rather than play on
|
||||
// over a page that is no longer the menu.
|
||||
@@ -1419,6 +1423,9 @@ export function renderStatus() {
|
||||
// still has presses on offer the move is theirs; with none, it is done.
|
||||
if (page.S.loopEnd) {
|
||||
const end = page.S.loopEnd;
|
||||
if (end.kind === "review") {
|
||||
return end.signedOff ? say("point", "Signed off. Pick what happens next.") : say("point", "The Review Loop ended. Sign off when you are ready.");
|
||||
}
|
||||
const moves = Array.isArray(end.can) ? end.can.length : 0;
|
||||
if (!moves) return say("done", "The loop is done.");
|
||||
return say(
|
||||
@@ -1805,6 +1812,7 @@ function paintMain(main) {
|
||||
if (isDashboard() && !finish()) {
|
||||
if (page.local.launching) renderLaunching(main);
|
||||
else if (page.loopSetup) renderLoopSetup(main);
|
||||
else if (page.reviewLoopSetup) renderReviewLoopSetup(main);
|
||||
else if (page.dashPick) {
|
||||
// A spec-switch under an open confirm can gray the pick out. Rather
|
||||
// than offer START on a card that cannot launch, drop back to the
|
||||
@@ -1816,7 +1824,7 @@ function paintMain(main) {
|
||||
}
|
||||
} else renderDashboard(main);
|
||||
// Review from the Learning banner: the lessons card, over the menu.
|
||||
renderLessonsDialog(!page.local.launching && !page.loopSetup && !page.dashPick);
|
||||
renderLessonsDialog(!page.local.launching && !page.loopSetup && !page.reviewLoopSetup && !page.dashPick);
|
||||
return;
|
||||
}
|
||||
renderLessonsDialog(false);
|
||||
@@ -1849,6 +1857,7 @@ function paintMain(main) {
|
||||
|
||||
// How the Implementation Loop ended, from the app's `loopEnd`: its own
|
||||
// screen, ahead of any card the last phase left behind.
|
||||
if (!page.S.loopEnd) forgetReviewEnd();
|
||||
if (page.S.loopEnd && !finish()) {
|
||||
const card = renderLoopEnd(page.S.loopEnd);
|
||||
card.classList.add("is-primary");
|
||||
@@ -2601,9 +2610,10 @@ export function wireChrome() {
|
||||
// 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.
|
||||
if (e.key === "Escape" && (page.dashPick || page.loopSetup) && isDashboard() && !finish() && !document.querySelector("dialog[open]")) {
|
||||
if (e.key === "Escape" && (page.dashPick || page.loopSetup || page.reviewLoopSetup) && isDashboard() && !finish() && !document.querySelector("dialog[open]")) {
|
||||
page.dashPick = null;
|
||||
page.loopSetup = null;
|
||||
page.reviewLoopSetup = null;
|
||||
redraw();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user