Compare commits

..
7 Commits
31 changed files with 348 additions and 74 deletions

No files matched your search

+2 -1
View File
@@ -90,6 +90,7 @@ The same areas as one-command rows live in the [Test map](./AGENTS-test-map.md),
| What changed | Run | | What changed | Run |
|---|---| |---|---|
| An Activities game (`public/activities/*`), `public/tones.js` or `public/music.js` | `node --test scripts/test-web-console-tones.mjs scripts/test-web-console-activities.mjs`, plus the game's own `scripts/test-web-console-activities-<game>*.mjs` when it has one; add `test-web-console-page-activities.mjs` when the Activities window or its switches changed | | An Activities game (`public/activities/*`), `public/tones.js` or `public/music.js` | `node --test scripts/test-web-console-tones.mjs scripts/test-web-console-activities.mjs`, plus the game's own `scripts/test-web-console-activities-<game>*.mjs` when it has one; add `test-web-console-page-activities.mjs` when the Activities window or its switches changed |
| Page styles (`public/styles/*.css`) or `public/index.html` | `npm run test:page -- scripts/test-web-console-page-layout.mjs`, plus the page file of a screen whose own look changed (`test:page` unsets the app variables, takes `--test-name-pattern`, and is the way to run any page file) |
| A music prototype (`prototypes/music/<game>/`) | `node prototypes/music/check.cjs <game>` (nothing in `npm test` reads `prototypes/`) | | A music prototype (`prototypes/music/<game>/`) | `node prototypes/music/check.cjs <game>` (nothing in `npm test` reads `prototypes/`) |
| One web console area (server routes, chat, git board, workspace, notepad, Implementation Loop...) | that area's `scripts/test-web-console-<area>.mjs` (the loop's is `test-web-console-loop.mjs`), and its `test-web-console-page-<area>.mjs` when the page changed; `node scripts/parse-check.mjs` after editing any browser module under `public/` | | One web console area (server routes, chat, git board, workspace, notepad, Implementation Loop...) | that area's `scripts/test-web-console-<area>.mjs` (the loop's is `test-web-console-loop.mjs`), and its `test-web-console-page-<area>.mjs` when the page changed; `node scripts/parse-check.mjs` after editing any browser module under `public/` |
| The launcher (`src/launcher/`) | `node --test scripts/test-launcher.mjs` | | The launcher (`src/launcher/`) | `node --test scripts/test-launcher.mjs` |
@@ -148,7 +149,7 @@ The root `npm test` does not run the metrics or bot vitest suites; run them in t
|------|--------| |------|--------|
| `--build-skills` | Regenerate `skills/` from `src/`, pruning stale skills and reference files | | `--build-skills` | Regenerate `skills/` from `src/`, pruning stale skills and reference files |
| `--verify-skills` | Diff local `skills/` against `src/`; exits 1 on drift. Diagnostic only, the installer rebuilds anyway | | `--verify-skills` | Diff local `skills/` against `src/`; exits 1 on drift. Diagnostic only, the installer rebuilds anyway |
| `--update [--force]` | No menu: reinstall what `~/.plan2code/install.json` lists (skills, launcher, app, statusline; metrics and bot only when run from a git checkout, since they run from the install folder, which npx's cache is not), never uninstalling; with no record, the skills and the `plan2code` command. Compact output: `Updating <old> -> <new>` from the record's version (or `Already on <new>`, which stops unless `--force`), each piece's own output held back (`captureOutput()`) and shown only for a warning or a failure, one summary with human piece names (`PIECE_LABELS`), the release notes link and the restart hint; a failed update also prints `plan2code update --tag v<old>`. A failed update, or one whose desktop app was kept because the release has no app file yet, puts the old version back on `install.json`, so the next update (the app's Update and restart included) runs instead of stopping at Already on. `plan2code update` runs it through npx, pinned to the newest `vX.Y.Z` tag the launcher finds with update-check.mjs's `git ls-remote` pick (`--main` takes the tip of `main`, `--tag <ref>` any ref, `--force` is passed on; `PLAN2CODE_LS_REMOTE_FILE` replaces the git call in tests) | | `--update [--force]` | No menu: reinstall what `~/.plan2code/install.json` lists (skills, launcher, app, statusline; metrics and bot only when run from a git checkout, since they run from the install folder, which npx's cache is not), never uninstalling; with no record, the skills and the `plan2code` command. Compact output: `Updating <old> -> <new>` from the record's version (or `Already on <new>`, which stops unless `--force`, and only when the installed command's `bin/version.json` agrees with the record, so an update stopped after its skills step installs again), each piece's own output held back (`captureOutput()`) and shown only for a warning or a failure, one summary with human piece names (`PIECE_LABELS`), the release notes link and the restart hint; a failed update also prints `plan2code update --tag v<old>`. While an update runs, record writes keep the old version (`recordVersionHold`) and the new one is stamped only when every piece is in; a failed update, or one whose desktop app was kept because the release has no app file yet, leaves the old version on `install.json`, so the next update (the app's Update and restart included) runs instead of stopping at Already on. `plan2code update` runs it through npx, pinned to the newest `vX.Y.Z` tag the launcher finds with update-check.mjs's `git ls-remote` pick (`--main` takes the tip of `main`, `--tag <ref>` any ref, `--force` is passed on; `PLAN2CODE_LS_REMOTE_FILE` replaces the git call in tests) |
| `--uninstall [--yes] [--purge]` | No menu: confirm y/N (`--yes` skips it), run `uninstallAll()`, then ask whether to also delete `~/.plan2code` (`purgeData()`; `--purge` says yes without asking, `--yes` alone keeps the data). `uninstallAll()` is driven by the pieces `install.json` records plus a quiet probe for strays (`UNINSTALL_STEPS`, `UNINSTALL_PROBES`), prints one line per piece actually removed, falls back to deleting the `plan2code*` folders under `~/.agents/skills` when the skills CLI is unreachable, and removes the versioned console folders and `console-dir` (`removeConsoleFolders()`, stopping a running console first). What stays in `~/.plan2code` is listed by name with its size (`listKeptData()`), and the run always ends with the Removed / Could not remove / To finish block (`printUninstallReport()`). Deleting the data also removes the app's webview data outside `~/.plan2code` (`appWebviewDirs()`, `purgeAppWebview()`), and a running app is named before anything is removed (`appRunning()`). `plan2code uninstall [--yes] [--purge]` runs it through npx | | `--uninstall [--yes] [--purge]` | No menu: confirm y/N (`--yes` skips it), run `uninstallAll()`, then ask whether to also delete `~/.plan2code` (`purgeData()`; `--purge` says yes without asking, `--yes` alone keeps the data). `uninstallAll()` is driven by the pieces `install.json` records plus a quiet probe for strays (`UNINSTALL_STEPS`, `UNINSTALL_PROBES`), prints one line per piece actually removed, falls back to deleting the `plan2code*` folders under `~/.agents/skills` when the skills CLI is unreachable, and removes the versioned console folders and `console-dir` (`removeConsoleFolders()`, stopping a running console first). What stays in `~/.plan2code` is listed by name with its size (`listKeptData()`), and the run always ends with the Removed / Could not remove / To finish block (`printUninstallReport()`). Deleting the data also removes the app's webview data outside `~/.plan2code` (`appWebviewDirs()`, `purgeAppWebview()`), and a running app is named before anything is removed (`appRunning()`). `plan2code uninstall [--yes] [--purge]` runs it through npx |
## How the Installer Works ## How the Installer Works
+2
View File
@@ -7,6 +7,7 @@ Which checks cover which files, read by PR Prep and Test (`test-map.mjs read` ch
|---|---|---|---| |---|---|---|---|
| Activities games | `src/web-console/public/activities/**`, `src/web-console/public/tones.js`, `src/web-console/public/music.js` | `node --test scripts/test-web-console-tones.mjs scripts/test-web-console-activities.mjs` | no | | Activities games | `src/web-console/public/activities/**`, `src/web-console/public/tones.js`, `src/web-console/public/music.js` | `node --test scripts/test-web-console-tones.mjs scripts/test-web-console-activities.mjs` | no |
| Launcher | `src/launcher/**` | `node --test scripts/test-launcher.mjs` | no | | Launcher | `src/launcher/**` | `node --test scripts/test-launcher.mjs` | no |
| Installer update | `scripts/test-install-update.mjs` | `node --test scripts/test-install-update.mjs` | no |
| Dead Code script | `src/plan2code-dead-code-scripts/**`, `scripts/fixtures/dead-code/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-dead-code.mjs` | no | | Dead Code script | `src/plan2code-dead-code-scripts/**`, `scripts/fixtures/dead-code/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-dead-code.mjs` | no |
| Update Dependencies script | `src/plan2code-deps-scripts/**`, `scripts/fixtures/deps/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-deps.mjs` | no | | Update Dependencies script | `src/plan2code-deps-scripts/**`, `scripts/fixtures/deps/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-deps.mjs` | no |
| UI Prototype script and shell | `src/skill-scripts/ui-prototype*.mjs`, `src/plan2code-ui-prototype-references/**`, `scripts/fixtures/ui-prototype/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-ui-prototype.mjs scripts/test-ui-prototype-page.mjs` | no | | UI Prototype script and shell | `src/skill-scripts/ui-prototype*.mjs`, `src/plan2code-ui-prototype-references/**`, `scripts/fixtures/ui-prototype/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-ui-prototype.mjs scripts/test-ui-prototype-page.mjs` | no |
@@ -17,5 +18,6 @@ Which checks cover which files, read by PR Prep and Test (`test-map.mjs read` ch
| Desktop app | `plan2code-app/**` | `cd plan2code-app && cargo test` | no | | Desktop app | `plan2code-app/**` | `cd plan2code-app && cargo test` | no |
| Metrics | `plan2code-metrics/**` | `cd plan2code-metrics && npm test` | no | | Metrics | `plan2code-metrics/**` | `cd plan2code-metrics && npm test` | no |
| Bot | `plan2code-bot/**` | `cd plan2code-bot && npm test` | no | | Bot | `plan2code-bot/**` | `cd plan2code-bot && npm test` | no |
| Web console page shell and styles | `src/web-console/public/styles/**`, `src/web-console/public/index.html` | `npm run test:page -- scripts/test-web-console-page-layout.mjs` | no |
| Shared code | `install.js`, `src/web-console/public/skills.js`, `src/web-console/console.mjs`, `src/web-console/routes.mjs`, `src/web-console/static.mjs`, `scripts/*-helpers.mjs` | `npm test` | yes | | Shared code | `install.js`, `src/web-console/public/skills.js`, `src/web-console/console.mjs`, `src/web-console/routes.mjs`, `src/web-console/static.mjs`, `scripts/*-helpers.mjs` | `npm test` | yes |
| Docs only | `**/*.md` | `node --test scripts/test-us-english.mjs scripts/test-line-endings.mjs` | no | | Docs only | `**/*.md` | `node --test scripts/test-us-english.mjs scripts/test-line-endings.mjs` | no |
+1 -1
View File
@@ -1 +1 @@
U0VOQwGb1h8WT5IUMS7EBmLpuW7ijS2Ype2pBi4K17QWi4r/MNeaQoIsVg2Lsg5Omnj9d7Is40jVCvirKU+uTZDJHb50tJuRurHilHvM3M6muBLIvnmact9DUa85zeocNtFYlCitZ5nMfOIHBZLodgc0hT1a+dW/hEp0YQXUfizZ6dAxNwwkSRVx9s8BqCd+yHfrQ8KbYtG2ltUW4zXOC6Zg0DoCDFjB2rx9rzehMO+Cni/6CNGc0PYci5l4HIfrtETVey5Nk4VG0bvElj0ZrRA7eBFXrDPWDDHSIq3zyE/De0Xv8r5GlwCFUwFf295+UxX67j83XxYcafc7PgMAdCIQoqx5OSvD05I6gCFocdfReR/oad2Ha3BpzjjWv8X5qKcSzy8f+8FbWG4xkZJgj3perkz8Ia+anaeCxsO8Nx5MWUpQND/1yjLPRHFj2DuAo0LZoPaa9tFVnLS2qFY1b3PUBTBKjDeWxdU6yGyxg+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gTfhyEn/naO8++oiX/GxkTGyE5stbAU8Ok3pUfTlsnKbD1yL5d9e0ozR9HJNf1x2cXoaYiC3+D/jlvEpKddNCy8kL5jnxomnpOfreymVfBe2ImZUlqA6UnhrX4+1LPwvjjKBj6cUuWb0i7Me2KOy8A4DMjKeOARcHJ6qfjNi6DshnHdCi+uhm7nkzgY1OSztLoLnGl9aX+Kurh/JItI0ICZqfBMT6ugnVaTixeU/KbU81SezRBME06uv0iEapb+506XE/ZwKwAXTOCg4W52NtC78VR+TMJTS5ITRLqzEdOA4tiHW7x9Ye8WVDDF1qDiP3FLtW8aP41sY/hy9/DSvLsdZ5hTNgwxeexX9K2B6qQ38SX7eMDCp7KN9NQAOgV6Mffko1VUTqjjDEgFjXVcktL/50CgnSJ7RhndZeZe7H3aHgioij9rL8YGwudETzck9PTV2V/m2+j8tUerf5r1mcUM8LltIpDBYEHRGnrnbSjAIjoA7YK1mikVzRnP9aR74ln0Nrgavuj/cvV29z5Cbv6+fCNlC4Fk6bD0DkMsSY9E2DLNfMg0exhwqMt2GqWSoouBl41Sc0JhQA/5kNvJ/pfpYJOgf9z2LDREkkFdAFqH6H4a2/V6XQiu81dn31/SBmsi89xZUy74L746/QP2iNx6WI2JlMgl1c8ybUwrxq628nrg4Wex6tYsMcZ0pj0HQe6q7yJLK2vTGZMMezG98PPBmABj5pkUkUkUqDF0FFEF19Ls6jSihUw69nqSQ/dbuCgy5DidOuDY0Dp2ifSrA3wOwy7JxKxEhKMonUN3lzxelEy61ee+eObDGP+ditQVhOF5y6zCbheVDH8xRa5lk9E5CwLine truncated
+11
View File
@@ -81,7 +81,18 @@ jobs:
defaults: defaults:
run: run:
working-directory: plan2code-app working-directory: plan2code-app
env:
# Debug info and incremental state are most of target/'s size; the ubuntu
# runner ran out of disk building both the debug and the release app.
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
steps: steps:
- name: Free disk space on the Linux runner
if: runner.os == 'Linux'
working-directory: .
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
df -h /
- uses: actions/checkout@v7.0.1 - uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7.1.0 - uses: actions/setup-node@v7.1.0
with: with:
+5
View File
@@ -38,6 +38,11 @@
- About: install.js - About: install.js
- Noted: 2026-11-17, implement-review - Noted: 2026-11-17, implement-review
### Every heading and .md-h gets text-wrap: balance from tokens.css, so a long heading such as a lesson title splits into two even halves; set text-wrap: wrap where a heading runs longer than a line.
- Kind: how-it-works
- About: src/web-console/public/styles/tokens.css, src/web-console/public/styles/learning.css
- Noted: 2026-11-19, quick-task
### In a Markdown field (md-field.js), CodeMirror's scroller and content are only as tall as the text, not the bordered host: code that hit-tests the scroller must not assume it fills the box. ### In a Markdown field (md-field.js), CodeMirror's scroller and content are only as tall as the text, not the bordered host: code that hit-tests the scroller must not assume it fills the box.
- Kind: how-it-works - Kind: how-it-works
- About: src/web-console/public/md-field.js - About: src/web-console/public/md-field.js
+19
View File
@@ -4,6 +4,25 @@ All notable changes to Plan2Code will be documented in this file.
<!-- Format from 3.1.0 on: `## vX.Y.Z (YYYY-MM-DD)` with the date from version.json; a minor release opens with a three-bullet `### Highlights`; sections run Added, Changed, Fixed; game changes sit under one Activities line; tooling and test lines go under "For contributors". Older headings have no date and are not backfilled. --> <!-- Format from 3.1.0 on: `## vX.Y.Z (YYYY-MM-DD)` with the date from version.json; a minor release opens with a three-bullet `### Highlights`; sections run Added, Changed, Fixed; game changes sit under one Activities line; tooling and test lines go under "For contributors". Older headings have no date and are not backfilled. -->
## v3.1.5 (2026-11-23)
### 🐛 Fixed
- **desktop app**: Change project, and picking a recent folder, now starts the new project's agent and dashboard; before, the agent opened inside the old project's stopped session and never showed its page.
- **web console**: the page itself no longer scrolls (its panels do), so the blank space that could show below the footer is gone; the narrow-window layout and printing follow the same rule.
- **For contributors**: `npm run test:page -- <file>` runs page test files with the desktop app's variables unset, and a new layout page test checks that the page shell never scrolls.
## v3.1.4 (2026-11-20)
### 🔧 Changed
- **launcher**: the model menu offers Claude Fable 5.2 in place of 5.1, Gemini 4 Hydrogen and Gemini 4 Neon for Devin, and GPT-6.2 Astra and GPT-6.2 Sol for Codex; Gemini 3.8 Flash, GLM-5.3 Low and SWE-2 Flash Medium leave Devin's list, and Claude's `haiku` and `fable` labels follow the Claude Code docs.
- **launcher**: Claude Code's install options add the Windows CMD installer and install `@latest` through npm, the OpenCode starter template opens with `@plan2code`, and the Gemini CLI note also names Gemini Code Assist for GitHub.
### 🐛 Fixed
- **launcher**: `plan2code update` no longer stops at "Already on" after an earlier update stopped partway and left the `plan2code` command on the old version; the install record keeps the old version until every piece is in.
## v3.1.3 (2026-11-18) ## v3.1.3 (2026-11-18)
### 🔧 Changed ### 🔧 Changed
+1 -1
View File
@@ -13,7 +13,7 @@
Plan2Code is a spec-driven workflow for AI coding agents. You work through it on a page in your browser: the dashboard lists every step as a card, and each step's questions, progress and sign-offs arrive on that same page while your agent does the work. An approved plan becomes phase documents, and the agent builds to them one phase at a time. Plan2Code is a spec-driven workflow for AI coding agents. You work through it on a page in your browser: the dashboard lists every step as a card, and each step's questions, progress and sign-offs arrive on that same page while your agent does the work. An approved plan becomes phase documents, and the agent builds to them one phase at a time.
Version 3.1.3 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com) Version 3.1.5 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
--- ---
+45 -9
View File
@@ -2569,8 +2569,13 @@ function readInstallRecord() {
return null; return null;
} }
// While update() runs, every record write keeps the version the update started from (`{ version }`),
// so an update stopped partway (Ctrl+C, a closed window, a killed child) never leaves the record
// claiming the new version over pieces that are still old. update() stamps the new one at the end.
let recordVersionHold = null;
/** Temp file, then rename, so a crash never leaves a half-written record. A failure only skips the record. */ /** Temp file, then rename, so a crash never leaves a half-written record. A failure only skips the record. */
function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skipped || [], version = projectVersion.version) { function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skipped || [], version = recordVersionHold ? recordVersionHold.version : projectVersion.version) {
const record = { const record = {
version, version,
scope: 'global', scope: 'global',
@@ -2591,15 +2596,25 @@ function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skippe
} }
/** /**
* Put `version` back in the record (null when none was known) without touching its pieces: every * Write `version` on the record without touching its pieces: update() uses it to stamp the new
* recordInstalled() stamps the version being installed, so an update that failed uses this to * version once every piece is in, and to keep the old one (null when none was known) after a
* stay behind, and the next `plan2code update` does not answer "Already on". * failure or a kept app, so the next `plan2code update` does not answer "Already on".
*/ */
function setRecordVersion(version) { function setRecordVersion(version) {
const record = readInstallRecord(); const record = readInstallRecord();
if (record) writeInstallRecord(record.pieces, record.skipped || [], version); if (record) writeInstallRecord(record.pieces, record.skipped || [], version);
} }
/** The version in the installed plan2code command's version.json, or null when it is missing or unreadable. */
function installedLauncherVersion() {
try {
const { version } = JSON.parse(fs.readFileSync(LAUNCHER_VERSION_DEST, 'utf8'));
return typeof version === 'string' ? version : null;
} catch {
return null;
}
}
/** Add a piece after a successful global install. */ /** Add a piece after a successful global install. */
function recordInstalled(piece) { function recordInstalled(piece) {
const record = readInstallRecord(); const record = readInstallRecord();
@@ -3725,7 +3740,8 @@ function releaseNotesUrl(version) {
/** /**
* Reinstall whatever ~/.plan2code/install.json lists, without the menu or any prompt, and print * Reinstall whatever ~/.plan2code/install.json lists, without the menu or any prompt, and print
* one compact summary: `Updating <old> -> <new>` (or `Already on <new>`, which stops early unless * one compact summary: `Updating <old> -> <new>` (or `Already on <new>`, which stops early unless
* `force`), one line per piece by its human name, then the release notes link and the restart * `force`, and only when the installed command's bin/version.json agrees with the record whenever
* the record lists `launcher`), one line per piece by its human name, then the release notes link and the restart
* hint. Each piece's own output is held back and shown only when that piece warns or fails. * hint. Each piece's own output is held back and shown only when that piece warns or fails.
* Returns the exit code: 0 when every piece updated, 1 naming the pieces that failed. * Returns the exit code: 0 when every piece updated, 1 naming the pieces that failed.
*/ */
@@ -3733,15 +3749,33 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
const record = readInstallRecord(); const record = readInstallRecord();
const version = projectVersion.version; const version = projectVersion.version;
const before = record && typeof record.version === 'string' ? record.version : null; const before = record && typeof record.version === 'string' ? record.version : null;
if (before === version && !force) { const pieces = record ? record.pieces : ['skills', 'launcher'];
// The record alone is not proof: an update stopped before its launcher step (or one run by a
// launcher too old to pass --force on) left the record new and the command old, and every later
// update stopped here. The command's own version.json says what is really in place.
const launcherVersion = pieces.includes('launcher') ? installedLauncherVersion() : version;
if (before === version && launcherVersion === version && !force) {
console.log(`${COLORS.GREEN}${MARKS.DONE}${COLORS.RESET} Already on ${version}`); console.log(`${COLORS.GREEN}${MARKS.DONE}${COLORS.RESET} Already on ${version}`);
console.log(`${COLORS.DIM}Run plan2code update --force to install it again.${COLORS.RESET}`); console.log(`${COLORS.DIM}Run plan2code update --force to install it again.${COLORS.RESET}`);
return 0; return 0;
} }
console.log(`${COLORS.BRIGHT}${before ? `Updating ${before} -> ${version}` : `Updating to ${version}`}${COLORS.RESET}`); console.log(`${COLORS.BRIGHT}${before ? `Updating ${before} -> ${version}` : `Updating to ${version}`}${COLORS.RESET}`);
const pieces = record ? record.pieces : ['skills', 'launcher']; if (before === version && launcherVersion !== version && !force) {
console.log(`${COLORS.DIM}The plan2code command is still on ${launcherVersion || 'an unknown version'}, so everything is installed again.${COLORS.RESET}`);
}
if (!record) console.log(`${COLORS.DIM}No install record found; updating the skills and the plan2code command.${COLORS.RESET}`); if (!record) console.log(`${COLORS.DIM}No install record found; updating the skills and the plan2code command.${COLORS.RESET}`);
recordVersionHold = { version: before };
try {
return await updatePieces({ steps, cleanShims, pieces, before, version });
} finally {
recordVersionHold = null;
}
}
/** update()'s body once it has decided to install: the pieces, the summary, and the version stamp. */
async function updatePieces({ steps, cleanShims, pieces, before, version }) {
await captureOutput(async () => cleanShims()); await captureOutput(async () => cleanShims());
const results = {}; const results = {};
@@ -3798,7 +3832,7 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
console.log(''); console.log('');
if (failed.length > 0) { if (failed.length > 0) {
console.log(`${COLORS.RED}${MARKS.FAIL} Update failed for: ${failed.join(', ')}${COLORS.RESET}`); console.log(`${COLORS.RED}${MARKS.FAIL} Update failed for: ${failed.join(', ')}${COLORS.RESET}`);
// The pieces that did install stamped the new version on the record: take it back, so running // Keep the old version on the record (writes during the update already held it), so running
// plan2code update again retries instead of stopping at "Already on". // plan2code update again retries instead of stopping at "Already on".
setRecordVersion(before); setRecordVersion(before);
console.log(`To try again, run: ${COLORS.CYAN}plan2code update${COLORS.RESET}`); console.log(`To try again, run: ${COLORS.CYAN}plan2code update${COLORS.RESET}`);
@@ -3809,7 +3843,9 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
// The release had no desktop app file yet, so the installed app is still the old one: keep the // The release had no desktop app file yet, so the installed app is still the old one: keep the
// old version on the record, or the next update (the app's Update and restart among them) stops // old version on the record, or the next update (the app's Update and restart among them) stops
// at "Already on" and never fetches the app once the file is attached. // at "Already on" and never fetches the app once the file is attached.
if (before && typeof results.app === 'string' && results.app.startsWith('kept')) setRecordVersion(before); // Otherwise every piece is in: only now does the record name the new version.
const appKept = typeof results.app === 'string' && results.app.startsWith('kept');
setRecordVersion(before && appKept ? before : version);
console.log(`${COLORS.GREEN}${MARKS.DONE} Plan2Code is up to date (v${version})${COLORS.RESET}`); console.log(`${COLORS.GREEN}${MARKS.DONE} Plan2Code is up to date (v${version})${COLORS.RESET}`);
console.log(`What's new: ${releaseNotesUrl(version)}`); console.log(`What's new: ${releaseNotesUrl(version)}`);
console.log('Close any open Plan2Code console or app and start `plan2code` again.'); console.log('Close any open Plan2Code console or app and start `plan2code` again.');
+3 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "plan2code", "name": "plan2code",
"version": "3.1.3", "version": "3.1.5",
"private": true, "private": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
@@ -17,7 +17,8 @@
"play": "node scripts/play.mjs", "play": "node scripts/play.mjs",
"pretest": "node scripts/fix-line-endings.mjs", "pretest": "node scripts/fix-line-endings.mjs",
"test:fast": "node scripts/test-fast.mjs", "test:fast": "node scripts/test-fast.mjs",
"test": "node scripts/check-test-lanes.mjs && node scripts/validate-char-count.js && node install.js --build-skills && node scripts/check-versions.mjs && node scripts/check-doc-size.mjs && node scripts/parse-check.mjs && node scripts/check-skill-table.mjs && node scripts/check-prompt-wording.mjs && node scripts/check-console-openings.mjs && node scripts/node-test.mjs scripts/test-line-endings.mjs scripts/test-us-english.mjs scripts/test-script-git.mjs scripts/test-git-repo.mjs scripts/test-skill-scripts.mjs scripts/test-script-test-map.mjs scripts/test-script-lessons.mjs scripts/test-script-test-match.mjs scripts/test-script-test-commands.mjs scripts/test-script-run-check.mjs scripts/test-script-pr-prep.mjs scripts/test-script-dead-code.mjs scripts/test-script-deps.mjs scripts/test-script-ui-prototype.mjs scripts/test-script-coverage.mjs scripts/test-script-changelog.mjs scripts/test-script-changes.mjs scripts/test-web-console-git.mjs scripts/test-web-console-git-board.mjs scripts/test-web-console-chat.mjs scripts/test-web-console-subagents.mjs scripts/test-web-console-pointers.mjs scripts/test-web-console-learning.mjs scripts/test-console-wire-budgets.mjs scripts/test-web-console-speed.mjs scripts/test-web-console-qa.mjs scripts/test-web-console-concurrency.mjs scripts/test-web-console-diff-parse.mjs scripts/test-web-console-workspace.mjs scripts/test-web-console-lifecycle.mjs scripts/test-web-console-chat-stress.mjs scripts/test-web-console-server.mjs scripts/test-web-console-session.mjs scripts/test-web-console-logic.mjs scripts/test-web-console-agents-doc.mjs scripts/test-web-console-prototypes.mjs scripts/test-web-console-activities.mjs scripts/test-web-console-activities-rapids.mjs scripts/test-web-console-activities-flock.mjs scripts/test-web-console-activities-bounce.mjs scripts/test-web-console-activities-bounce-game.mjs scripts/test-web-console-activities-ghoul.mjs scripts/test-web-console-activities-ghoul-graveyard.mjs scripts/test-web-console-activities-ghoul-grounds.mjs scripts/test-web-console-activities-ghoul-chapel.mjs scripts/test-web-console-activities-ghoul-sanatorium.mjs scripts/test-web-console-activities-ghoul-village.mjs scripts/test-web-console-activities-ghoul-mine.mjs scripts/test-web-console-activities-ghoul-carnival.mjs scripts/test-web-console-activities-ghoul-frozen.mjs scripts/test-web-console-activities-ghoul-bog.mjs scripts/test-web-console-activities-ghoul-lantern.mjs scripts/test-web-console-activities-ghoul-marrow.mjs scripts/test-web-console-activities-ghoul-mat.mjs scripts/test-web-console-activities-ghoul-eye.mjs scripts/test-web-console-activities-ghoul-bonestair.mjs scripts/test-web-console-activities-ghoul-heart.mjs scripts/test-web-console-activities-ghoul-ending.mjs scripts/test-web-console-activities-ghoul-ride.mjs scripts/test-web-console-activities-ghoul-cart.mjs scripts/test-web-console-activities-ghoul-sled.mjs scripts/test-web-console-activities-ghoul-banister.mjs scripts/test-web-console-activities-ghoul-gurney.mjs scripts/test-web-console-activities-ghoul-hearse.mjs scripts/test-web-console-activities-ghoul-wagon.mjs scripts/test-web-console-activities-ghoul-pew.mjs scripts/test-web-console-activities-ghoul-mower.mjs scripts/test-web-console-activities-ghoul-tray.mjs scripts/test-web-console-activities-ghoul-arms.mjs scripts/test-web-console-activities-ghoul-dice.mjs scripts/test-web-console-activities-ghoul-gameover.mjs scripts/test-web-console-activities-ghoul-intro.mjs scripts/test-web-console-activities-ghoul-bossintro.mjs scripts/test-web-console-activities-ghoul-story.mjs scripts/test-web-console-activities-ghoul-bones.mjs scripts/test-web-console-activities-ghoul-retry.mjs scripts/test-web-console-activities-bounce-cars.mjs scripts/test-web-console-activities-bounce-arcade.mjs scripts/test-web-console-tones.mjs scripts/test-web-console-skills.mjs scripts/test-web-console-spec-states.mjs scripts/test-web-console-card-rows.mjs scripts/test-spec-carry.mjs scripts/test-spec-carry-page.mjs scripts/test-web-console-state.mjs scripts/test-web-console-send-state.mjs scripts/test-web-console-strengths.mjs scripts/test-web-console-shape.mjs scripts/test-script-pathfinder.mjs scripts/test-skill-test-runs.mjs scripts/test-launcher.mjs scripts/test-agents-file.mjs scripts/test-agent-lookup.mjs scripts/test-web-console-source.mjs scripts/test-web-console-hardening.mjs scripts/test-web-console-embed.mjs scripts/test-web-console-in-app.mjs scripts/test-web-console-loop.mjs scripts/test-web-console-handoffs.mjs scripts/test-web-console-notepad.mjs scripts/test-script-xray.mjs scripts/test-script-finalize.mjs scripts/test-getting-started.mjs scripts/test-install-update.mjs scripts/test-browser-helper.mjs scripts/test-web-console-page-cards.mjs scripts/test-web-console-page-changes.mjs scripts/test-web-console-page-dashboard.mjs scripts/test-web-console-page-learning.mjs scripts/test-web-console-page-session.mjs scripts/test-web-console-page-ask.mjs scripts/test-Line truncated "test:page": "node scripts/run-page-tests.mjs",
"test": "node scripts/check-test-lanes.mjs && node scripts/validate-char-count.js && node install.js --build-skills && node scripts/check-versions.mjs && node scripts/check-doc-size.mjs && node scripts/parse-check.mjs && node scripts/check-skill-table.mjs && node scripts/check-prompt-wording.mjs && node scripts/check-console-openings.mjs && node scripts/node-test.mjs scripts/test-line-endings.mjs scripts/test-us-english.mjs scripts/test-script-git.mjs scripts/test-git-repo.mjs scripts/test-skill-scripts.mjs scripts/test-script-test-map.mjs scripts/test-script-lessons.mjs scripts/test-script-test-match.mjs scripts/test-script-test-commands.mjs scripts/test-script-run-check.mjs scripts/test-script-pr-prep.mjs scripts/test-script-dead-code.mjs scripts/test-script-deps.mjs scripts/test-script-ui-prototype.mjs scripts/test-script-coverage.mjs scripts/test-script-changelog.mjs scripts/test-script-changes.mjs scripts/test-web-console-git.mjs scripts/test-web-console-git-board.mjs scripts/test-web-console-chat.mjs scripts/test-web-console-subagents.mjs scripts/test-web-console-pointers.mjs scripts/test-web-console-learning.mjs scripts/test-console-wire-budgets.mjs scripts/test-web-console-speed.mjs scripts/test-web-console-qa.mjs scripts/test-web-console-concurrency.mjs scripts/test-web-console-diff-parse.mjs scripts/test-web-console-workspace.mjs scripts/test-web-console-lifecycle.mjs scripts/test-web-console-chat-stress.mjs scripts/test-web-console-server.mjs scripts/test-web-console-session.mjs scripts/test-web-console-logic.mjs scripts/test-web-console-agents-doc.mjs scripts/test-web-console-prototypes.mjs scripts/test-web-console-activities.mjs scripts/test-web-console-activities-rapids.mjs scripts/test-web-console-activities-flock.mjs scripts/test-web-console-activities-bounce.mjs scripts/test-web-console-activities-bounce-game.mjs scripts/test-web-console-activities-ghoul.mjs scripts/test-web-console-activities-ghoul-graveyard.mjs scripts/test-web-console-activities-ghoul-grounds.mjs scripts/test-web-console-activities-ghoul-chapel.mjs scripts/test-web-console-activities-ghoul-sanatorium.mjs scripts/test-web-console-activities-ghoul-village.mjs scripts/test-web-console-activities-ghoul-mine.mjs scripts/test-web-console-activities-ghoul-carnival.mjs scripts/test-web-console-activities-ghoul-frozen.mjs scripts/test-web-console-activities-ghoul-bog.mjs scripts/test-web-console-activities-ghoul-lantern.mjs scripts/test-web-console-activities-ghoul-marrow.mjs scripts/test-web-console-activities-ghoul-mat.mjs scripts/test-web-console-activities-ghoul-eye.mjs scripts/test-web-console-activities-ghoul-bonestair.mjs scripts/test-web-console-activities-ghoul-heart.mjs scripts/test-web-console-activities-ghoul-ending.mjs scripts/test-web-console-activities-ghoul-ride.mjs scripts/test-web-console-activities-ghoul-cart.mjs scripts/test-web-console-activities-ghoul-sled.mjs scripts/test-web-console-activities-ghoul-banister.mjs scripts/test-web-console-activities-ghoul-gurney.mjs scripts/test-web-console-activities-ghoul-hearse.mjs scripts/test-web-console-activities-ghoul-wagon.mjs scripts/test-web-console-activities-ghoul-pew.mjs scripts/test-web-console-activities-ghoul-mower.mjs scripts/test-web-console-activities-ghoul-tray.mjs scripts/test-web-console-activities-ghoul-arms.mjs scripts/test-web-console-activities-ghoul-dice.mjs scripts/test-web-console-activities-ghoul-gameover.mjs scripts/test-web-console-activities-ghoul-intro.mjs scripts/test-web-console-activities-ghoul-bossintro.mjs scripts/test-web-console-activities-ghoul-story.mjs scripts/test-web-console-activities-ghoul-bones.mjs scripts/test-web-console-activities-ghoul-retry.mjs scripts/test-web-console-activities-bounce-cars.mjs scripts/test-web-console-activities-bounce-arcade.mjs scripts/test-web-console-tones.mjs scripts/test-web-console-skills.mjs scripts/test-web-console-spec-states.mjs scripts/test-web-console-card-rows.mjs scripts/test-spec-carry.mjs scripts/test-spec-carry-page.mjs scripts/test-web-console-state.mjs scripts/test-web-console-send-state.mjs scripts/test-web-console-strengths.mjs scripts/test-web-console-shape.mjs scripts/test-script-pathfinder.mjs scripts/test-skill-test-runs.mjs scripts/test-launcher.mjs scripts/test-agents-file.mjs scripts/test-agent-lookup.mjs scripts/test-web-console-source.mjs scripts/test-web-console-hardening.mjs scripts/test-web-console-embed.mjs scripts/test-web-console-in-app.mjs scripts/test-web-console-loop.mjs scripts/test-web-console-handoffs.mjs scripts/test-web-console-notepad.mjs scripts/test-script-xray.mjs scripts/test-script-finalize.mjs scripts/test-getting-started.mjs scripts/test-install-update.mjs scripts/test-browser-helper.mjs scripts/test-web-console-page-cards.mjs scripts/test-web-console-page-changes.mjs scripts/test-web-console-page-dashboard.mjs scripts/test-web-console-page-layout.mjs scripts/test-web-console-page-learning.mjs scripts/test-web-console-page-session.mjs scripts/teLine truncated
}, },
"devDependencies": { "devDependencies": {
"gpt-tokenizer": "2.9.0", "gpt-tokenizer": "2.9.0",
+2 -2
View File
@@ -957,7 +957,7 @@ dependencies = [
[[package]] [[package]]
name = "fake-agent" name = "fake-agent"
version = "3.1.3" version = "3.1.5"
dependencies = [ dependencies = [
"serde_json", "serde_json",
"terminal_size", "terminal_size",
@@ -2647,7 +2647,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]] [[package]]
name = "plan2code-app" name = "plan2code-app"
version = "3.1.3" version = "3.1.5"
dependencies = [ dependencies = [
"chrono", "chrono",
"libc", "libc",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "fake-agent" name = "fake-agent"
version = "3.1.3" version = "3.1.5"
description = "A stand-in agent program for the Plan2Code app's tests" description = "A stand-in agent program for the Plan2Code app's tests"
edition = "2021" edition = "2021"
publish = false publish = false
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "plan2code-app", "name": "plan2code-app",
"version": "3.1.3", "version": "3.1.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "plan2code-app", "name": "plan2code-app",
"version": "3.1.3", "version": "3.1.5",
"dependencies": { "dependencies": {
"@tauri-apps/api": "2.12.4", "@tauri-apps/api": "2.12.4",
"@xterm/addon-fit": "0.11.0", "@xterm/addon-fit": "0.11.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "plan2code-app", "name": "plan2code-app",
"version": "3.1.3", "version": "3.1.5",
"private": true, "private": true,
"description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.", "description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.",
"scripts": { "scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "plan2code-app" name = "plan2code-app"
version = "3.1.3" version = "3.1.5"
description = "Plan2Code desktop app" description = "Plan2Code desktop app"
edition = "2021" edition = "2021"
publish = false publish = false
+32 -3
View File
@@ -1139,6 +1139,14 @@ fn teardown_project(state: &AppState) -> Result<(), String> {
let _ = sup.stop(); let _ = sup.stop();
} }
} }
// The new project's agent asks the window which session is current and
// joins it; left at the old project's (its console just stopped), its
// `open` joined a dead page and the dashboard never showed.
if let Ok(guard) = state.announce.lock() {
if let Some(server) = guard.as_ref() {
server.forget_current();
}
}
Ok(()) Ok(())
} }
@@ -2011,8 +2019,22 @@ mod tests {
} }
#[test] #[test]
fn new_session_forgets_the_windows_session_so_the_fresh_agent_starts_its_own() { fn changing_project_forgets_the_old_projects_session_so_the_new_agent_starts_its_own() {
// The new agent's `open` asks the window which session is current; left
// at the old project's (its console torn down) it joined a dead page
// and never showed its dashboard.
let state = state_for("project-a"); let state = state_for("project-a");
announce_page(&state, "s1");
teardown_project(&state).unwrap();
assert_eq!(
state.announce.lock().unwrap().as_ref().unwrap().current(),
None,
"the new project's agent must not join the old project's s1"
);
}
/// Starts the announce server on `state` and announces page `sid` to it.
fn announce_page(state: &AppState, sid: &str) {
let server = AnnounceServer::start(Arc::new(|_| true)).unwrap(); let server = AnnounceServer::start(Arc::new(|_| true)).unwrap();
let port: u16 = server let port: u16 = server
.url() .url()
@@ -2023,7 +2045,8 @@ mod tests {
.parse() .parse()
.unwrap(); .unwrap();
*state.announce.lock().unwrap() = Some(server); *state.announce.lock().unwrap() = Some(server);
let body = r#"{"url":"http://127.0.0.1:5000/s/abc/","sid":"s1","workflow":"plan"}"#; let body =
format!(r#"{{"url":"http://127.0.0.1:5000/s/abc/","sid":"{sid}","workflow":"plan"}}"#);
let mut stream = std::net::TcpStream::connect(("127.0.0.1", port)).unwrap(); let mut stream = std::net::TcpStream::connect(("127.0.0.1", port)).unwrap();
let token = state let token = state
.announce .announce
@@ -2055,8 +2078,14 @@ mod tests {
.unwrap() .unwrap()
.current() .current()
.map(|n| n.sid), .map(|n| n.sid),
Some("s1".to_string()) Some(sid.to_string())
); );
}
#[test]
fn new_session_forgets_the_windows_session_so_the_fresh_agent_starts_its_own() {
let state = state_for("project-a");
announce_page(&state, "s1");
// No console supervised here, so no brief to write: only the forgetting. // No console supervised here, so no brief to write: only the forgetting.
assert_eq!(before_fresh_hook(&state)(), None); assert_eq!(before_fresh_hook(&state)(), None);
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Plan2Code", "productName": "Plan2Code",
"version": "3.1.3", "version": "3.1.5",
"identifier": "com.plan2code.desktop", "identifier": "com.plan2code.desktop",
"build": { "build": {
"frontendDist": "../ui", "frontendDist": "../ui",
+22
View File
@@ -0,0 +1,22 @@
// Runs page test files the way CI does: the PLAN2CODE_* app variables are
// unset first, because inherited from the desktop app (or an agent running
// inside it) they fail about a dozen unrelated tests. Files run through
// node-test.mjs, so its cap of one file per spare core applies. Extra
// arguments (such as --test-name-pattern "<name>") pass straight through.
// Usage: npm run test:page -- scripts/test-web-console-page-layout.mjs
import { spawnSync } from "node:child_process";
import path from "node:path";
import { fileURLToPath } from "node:url";
const env = { ...process.env };
for (const name of Object.keys(env)) if (name.startsWith("PLAN2CODE_") && /^PLAN2CODE_(IN_APP|APP_|EMBED_ORIGIN|CONSOLE_SID|LOOP_STRENGTH)/.test(name)) delete env[name];
const args = process.argv.slice(2);
if (!args.length) {
console.error("Usage: npm run test:page -- <scripts/test-web-console-page-*.mjs ...> [--test-name-pattern <name>]");
process.exit(2);
}
const runner = path.join(path.dirname(fileURLToPath(import.meta.url)), "node-test.mjs");
const r = spawnSync(process.execPath, [runner, ...args], { env, stdio: "inherit" });
process.exit(r.status ?? 1);
+55
View File
@@ -175,9 +175,18 @@ test("update: prints the version change, one line per piece by name, the release
assert.doesNotMatch(out, /Happy coding|PARAMETERS|To go back to a release/); assert.doesNotMatch(out, /Happy coding|PARAMETERS|To go back to a release/);
}); });
const LAUNCHER_VERSION = path.join(HOME, ".plan2code", "bin", "version.json");
/** The installed plan2code command's version.json, as installLauncher() writes it. */
function writeLauncherVersion(version) {
fs.mkdirSync(path.dirname(LAUNCHER_VERSION), { recursive: true });
fs.writeFileSync(LAUNCHER_VERSION, JSON.stringify({ name: "Plan2Code", version }));
}
test("update: already on the new version it says so and stops, until --force", async () => { test("update: already on the new version it says so and stops, until --force", async () => {
fs.mkdirSync(path.dirname(RECORD), { recursive: true }); fs.mkdirSync(path.dirname(RECORD), { recursive: true });
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["skills", "launcher"] })); fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["skills", "launcher"] }));
writeLauncherVersion(VERSION);
const idle = fakeSteps(); const idle = fakeSteps();
const stopped = await runUpdate(idle.steps); const stopped = await runUpdate(idle.steps);
assert.equal(stopped.code, 0, stopped.out); assert.equal(stopped.code, 0, stopped.out);
@@ -202,6 +211,52 @@ test("update: already on the new version it says so and stops, until --force", a
assert.match(out, new RegExp(`Updating ${VERSION.replace(/\./g, "\\.")} -> ${VERSION.replace(/\./g, "\\.")}`)); assert.match(out, new RegExp(`Updating ${VERSION.replace(/\./g, "\\.")} -> ${VERSION.replace(/\./g, "\\.")}`));
}); });
test("update: a record on the new version over an older plan2code command installs again, without --force", async () => {
// An update stopped after the skills step: the record says new, the command is still old.
fs.mkdirSync(path.dirname(RECORD), { recursive: true });
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["skills", "launcher"] }));
for (const launcher of ["1.0.0", null]) {
if (launcher) writeLauncherVersion(launcher);
else fs.rmSync(LAUNCHER_VERSION, { force: true });
const fake = fakeSteps();
const { code, out } = await runUpdate(fake.steps);
assert.equal(code, 0, out);
assert.doesNotMatch(out, /Already on/);
assert.match(out, new RegExp(`The plan2code command is still on ${launcher ? "1\\.0\\.0" : "an unknown version"}`));
assert.deepEqual(fake.ran(), ["skills"]);
assert.match(out, /plan2code command: updated/);
}
// A record without the command does not look at its version.json.
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["statusline"] }));
const idle = fakeSteps();
assert.match((await runUpdate(idle.steps)).out, /Already on/);
assert.deepEqual(idle.ran(), []);
});
test("update: the record keeps the old version until every piece is in, so a stopped update retries", async () => {
writeRecord(["skills", "launcher", "app"]);
const seen = [];
const fake = fakeSteps();
// As the real steps: each records its piece as it finishes.
for (const piece of ["skills", "app"]) {
const step = fake.steps[piece];
fake.steps[piece] = async (options) => {
const code = await step(options);
installer.recordInstalled(piece);
seen.push(installer.readInstallRecord().version);
return code;
};
}
const { code, out } = await runUpdate(fake.steps);
assert.equal(code, 0, out);
assert.deepEqual(seen, ["1.0.0", "1.0.0"], "mid-update writes keep the old version");
assert.equal(installer.readInstallRecord().version, VERSION, "stamped once the update finished");
assert.deepEqual(installer.readInstallRecord().pieces, ["app", "launcher", "skills"]);
// Outside an update, a record write stamps the version being installed again.
installer.recordInstalled("statusline");
assert.equal(installer.readInstallRecord().version, VERSION);
});
test("update: a step's own output stays out of the summary, except its warnings and its failures", async () => { test("update: a step's own output stays out of the summary, except its warnings and its failures", async () => {
writeRecord(["skills", "statusline", "bot"]); writeRecord(["skills", "statusline", "bot"]);
const fake = fakeSteps(); const fake = fakeSteps();
+1
View File
@@ -115,6 +115,7 @@
"test-web-console-page-cards.mjs", "test-web-console-page-cards.mjs",
"test-web-console-page-changes.mjs", "test-web-console-page-changes.mjs",
"test-web-console-page-dashboard.mjs", "test-web-console-page-dashboard.mjs",
"test-web-console-page-layout.mjs",
"test-web-console-page-git.mjs", "test-web-console-page-git.mjs",
"test-web-console-page-help.mjs", "test-web-console-page-help.mjs",
"test-web-console-page-learning.mjs", "test-web-console-page-learning.mjs",
+15 -4
View File
@@ -27,6 +27,17 @@ const FIXTURES = path.join(ROOT, "scripts", "fixtures", "deps");
const MANIFESTS = path.join(FIXTURES, "manifests"); const MANIFESTS = path.join(FIXTURES, "manifests");
const readJson = (...p) => JSON.parse(fs.readFileSync(path.join(FIXTURES, ...p), "utf8")); const readJson = (...p) => JSON.parse(fs.readFileSync(path.join(FIXTURES, ...p), "utf8"));
// Recorded npm projects keep their lockfile as package-lock.fixture.json, so
// dependency scanners never read the old versions the recordings pin as the
// repository's own. A copy gets the real name back.
const FIXTURE_LOCK = "package-lock.fixture.json";
function copyFixture(src, dir) {
fs.cpSync(src, dir, { recursive: true });
for (const rel of fs.readdirSync(dir, { recursive: true })) {
if (path.basename(rel) === FIXTURE_LOCK) fs.renameSync(path.join(dir, rel), path.join(dir, path.dirname(rel), "package-lock.json"));
}
}
const runDeps = (args, opts) => runScript("plan2code-deps", "deps.mjs", args, opts); const runDeps = (args, opts) => runScript("plan2code-deps", "deps.mjs", args, opts);
const made = []; const made = [];
@@ -849,7 +860,7 @@ function runStubbed(args, pathDir) {
/** The recorded project copied into a temp folder (extra files on top), so a run never touches the fixture. */ /** The recorded project copied into a temp folder (extra files on top), so a run never touches the fixture. */
function project(extra = {}) { function project(extra = {}) {
const dir = tmp("deps-project"); const dir = tmp("deps-project");
fs.cpSync(path.join(NPM, "project"), dir, { recursive: true }); copyFixture(path.join(NPM, "project"), dir);
for (const [rel, content] of Object.entries(extra)) write(dir, rel, typeof content === "string" ? content : JSON.stringify(content, null, 2) + "\n"); for (const [rel, content] of Object.entries(extra)) write(dir, rel, typeof content === "string" ? content : JSON.stringify(content, null, 2) + "\n");
return dir; return dir;
} }
@@ -1206,7 +1217,7 @@ test("apply refuses a batch with no backup (exit 5) and reports a pick that neve
test("backup then restore --verify puts an untracked CRLF lockfile and a tracked one back byte for byte", () => { test("backup then restore --verify puts an untracked CRLF lockfile and a tracked one back byte for byte", () => {
const root = project({ const root = project({
"web/package.json": fs.readFileSync(path.join(NPM, "project", "package.json"), "utf8"), "web/package.json": fs.readFileSync(path.join(NPM, "project", "package.json"), "utf8"),
"web/package-lock.json": fs.readFileSync(path.join(NPM, "project", "package-lock.json"), "utf8"), "web/package-lock.json": fs.readFileSync(path.join(NPM, "project", FIXTURE_LOCK), "utf8"),
}); });
// The root lockfile is untracked and written with CRLF, as some Windows tools leave one: put back exactly as found. // The root lockfile is untracked and written with CRLF, as some Windows tools leave one: put back exactly as found.
const lockPath = path.join(root, "package-lock.json"); const lockPath = path.join(root, "package-lock.json");
@@ -1534,7 +1545,7 @@ const UV = fx("uv-0.13.7");
/** A recorded project folder copied into a temp folder, extra files on top. */ /** A recorded project folder copied into a temp folder, extra files on top. */
function copyFrom(src, extra = {}) { function copyFrom(src, extra = {}) {
const dir = tmp("deps-eco"); const dir = tmp("deps-eco");
fs.cpSync(src, dir, { recursive: true }); copyFixture(src, dir);
for (const [rel, content] of Object.entries(extra)) write(dir, rel, content); for (const [rel, content] of Object.entries(extra)) write(dir, rel, content);
return dir; return dir;
} }
@@ -2564,7 +2575,7 @@ const PINS = fx("pins", "project");
/** The pins fixture project copied into a temp folder, with extra files on top. */ /** The pins fixture project copied into a temp folder, with extra files on top. */
function pinsProject(extra = {}) { function pinsProject(extra = {}) {
const dir = tmp("deps-pins"); const dir = tmp("deps-pins");
fs.cpSync(PINS, dir, { recursive: true }); copyFixture(PINS, dir);
for (const [rel, content] of Object.entries(extra)) write(dir, rel, content); for (const [rel, content] of Object.entries(extra)) write(dir, rel, content);
return dir; return dir;
} }
+53
View File
@@ -0,0 +1,53 @@
// Page tests for the page shell: what keeps the console page itself from
// scrolling (only its panels scroll), checked at wide and narrow window sizes.
// A change to src/web-console/public/styles/ or index.html needs only this
// file, not the whole page suites. Run with:
// npm run test:page -- scripts/test-web-console-page-layout.mjs
//
// Each test drives the real console in a real Chrome or Edge through
// scripts/page-test-helpers.mjs: one browser for the file, a fresh console
// session per test.
import test from "node:test";
import assert from "node:assert/strict";
import { pageSuite, openSession } from "./page-test-helpers.mjs";
const suite = pageSuite(test);
// A plan session on the person's turn: one text question and the agent listening.
const PLAN_QUESTION = {
items: [{ id: "q1", kind: "text", title: "What to call it", body: "A short name for the export." }],
agent: { status: "waiting" },
};
test("the page itself never scrolls: oversized content stays inside its own panel", async (t) => {
const s = await openSession(await suite.browser(), { t, workflow: "plan", payload: PLAN_QUESTION });
await s.page.locator("#main [data-item=\"q1\"]").first().waitFor();
const page = await s.page.evaluate(() => {
const big = document.createElement("div");
big.style.cssText = "height: 5000px";
document.querySelector(".main").append(big);
const root = document.documentElement;
const before = { scrollHeight: root.scrollHeight, innerHeight: innerHeight };
scrollTo(0, 400);
return {
...before,
scrolled: scrollY,
rootOverflow: getComputedStyle(root).overflowY,
bodyOverflow: getComputedStyle(document.body).overflowY,
bodyHeight: Math.round(document.body.getBoundingClientRect().height),
};
});
assert.equal(page.rootOverflow, "hidden", "the page root never scrolls");
assert.equal(page.bodyOverflow, "hidden", "the body never scrolls");
assert.equal(page.bodyHeight, page.innerHeight, "the body is exactly the window tall");
assert.ok(page.scrollHeight <= page.innerHeight, "the page is never taller than the window (an absolutely placed bit in a panel stretched it)");
assert.equal(page.scrolled, 0, "the page does not move when asked to scroll");
});
test("the one-column layout (900px and narrower) keeps its page scroll", async (t) => {
const s = await openSession(await suite.browser(), { t, workflow: "plan", payload: PLAN_QUESTION });
await s.page.setViewportSize({ width: 600, height: 700 });
const narrow = await s.page.evaluate(() => getComputedStyle(document.documentElement).overflowY);
assert.equal(narrow, "visible", "its content sits under the first screen, so the lock must not apply");
});
+3
View File
@@ -973,6 +973,9 @@ test("the Subagents dialog looks as it did before Preferences moved to tabs", as
second: await stylesOf(modal.locator("fieldset.modal-ranges").nth(1), ["margin-top"]), second: await stylesOf(modal.locator("fieldset.modal-ranges").nth(1), ["margin-top"]),
actions: await stylesOf(modal.locator(".modal-actions"), ["display", "justify-content"]), actions: await stylesOf(modal.locator(".modal-actions"), ["display", "justify-content"]),
}; };
// Chrome 158 reads `justify-content: flex-end` back as "flow-end"; older Chrome and Edge
// say "flex-end". The stylesheet is the same either way, so count them as one.
if (got.actions["justify-content"] === "flow-end") got.actions["justify-content"] = "flex-end";
if (process.env.P2C_PRINT_SUBAGENTS) console.log("SUBAGENTS " + JSON.stringify(got)); if (process.env.P2C_PRINT_SUBAGENTS) console.log("SUBAGENTS " + JSON.stringify(got));
assert.deepEqual(got, SUBAGENTS_BEFORE); assert.deepEqual(got, SUBAGENTS_BEFORE);
}); });
+6 -5
View File
@@ -14,15 +14,16 @@
"install": { "install": {
"win": [ "win": [
{ "label": "PowerShell", "run": "irm https://claude.ai/install.ps1 | iex" }, { "label": "PowerShell", "run": "irm https://claude.ai/install.ps1 | iex" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code", "note": "Needs Node.js 22 or later" } { "label": "CMD", "run": "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code@latest", "note": "Needs Node.js 22 or later" }
], ],
"mac": [ "mac": [
{ "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" }, { "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code", "note": "Needs Node.js 22 or later" } { "label": "npm", "run": "npm install -g @anthropic-ai/claude-code@latest", "note": "Needs Node.js 22 or later" }
], ],
"linux": [ "linux": [
{ "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" }, { "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code", "note": "Needs Node.js 22 or later" } { "label": "npm", "run": "npm install -g @anthropic-ai/claude-code@latest", "note": "Needs Node.js 22 or later" }
] ]
}, },
"installDirs": { "installDirs": {
@@ -103,7 +104,7 @@
"name": "OpenCode", "name": "OpenCode",
"kind": "template", "kind": "template",
"command": "opencode", "command": "opencode",
"prompt": "Use the plan2code skill", "prompt": "@plan2code",
"args": ["{model}", "--prompt", "{prompt}"], "args": ["{model}", "--prompt", "{prompt}"],
"bypassArgs": ["--auto"], "bypassArgs": ["--auto"],
"modelArgs": ["--model", "{model}"] "modelArgs": ["--model", "{model}"]
@@ -117,7 +118,7 @@
"args": ["{model}", "{prompt}"], "args": ["{model}", "{prompt}"],
"bypassArgs": ["--approval-mode=yolo"], "bypassArgs": ["--approval-mode=yolo"],
"modelArgs": ["--model", "{model}"], "modelArgs": ["--model", "{model}"],
"note": "For Google AI Pro and Ultra accounts and free Gemini Code Assist for individuals, Gemini CLI was replaced by Antigravity CLI on June 18, 2026; Standard and Enterprise licenses and paid API keys are unaffected." "note": "For Google AI Pro and Ultra accounts, free Gemini Code Assist for individuals and Gemini Code Assist for GitHub, Gemini CLI was replaced by Antigravity CLI on June 18, 2026; Standard and Enterprise licenses and paid API keys are unaffected."
}, },
{ {
"id": "pi", "id": "pi",
+46 -34
View File
@@ -15,7 +15,7 @@
}, },
{ {
"id": "haiku", "id": "haiku",
"label": "latest Haiku" "label": "fast and efficient Haiku"
}, },
{ {
"id": "opusplan", "id": "opusplan",
@@ -23,7 +23,7 @@
}, },
{ {
"id": "fable", "id": "fable",
"label": "latest Fable" "label": "Fable for your hardest tasks"
}, },
{ {
"id": "best", "id": "best",
@@ -79,22 +79,6 @@
"id": "gpt-6-luna-high", "id": "gpt-6-luna-high",
"label": "GPT-6 Luna High Thinking" "label": "GPT-6 Luna High Thinking"
}, },
{
"id": "gemini-3-8-flash-low",
"label": "Gemini 3.8 Flash Low"
},
{
"id": "gemini-3-8-flash-medium",
"label": "Gemini 3.8 Flash Medium"
},
{
"id": "gemini-3-8-flash-high",
"label": "Gemini 3.8 Flash High"
},
{
"id": "glm-5-3-low",
"label": "GLM-5.3 Low"
},
{ {
"id": "glm-5-3-high", "id": "glm-5-3-high",
"label": "GLM-5.3 High" "label": "GLM-5.3 High"
@@ -115,18 +99,6 @@
"id": "claude-haiku-5-5-high", "id": "claude-haiku-5-5-high",
"label": "Claude Haiku 5.5 High" "label": "Claude Haiku 5.5 High"
}, },
{
"id": "claude-fable-5-1-low",
"label": "Claude Fable 5.1 Low"
},
{
"id": "claude-fable-5-1-medium",
"label": "Claude Fable 5.1 Medium"
},
{
"id": "claude-fable-5-1-high",
"label": "Claude Fable 5.1 High"
},
{ {
"id": "gpt-6-astra-low", "id": "gpt-6-astra-low",
"label": "GPT-6 Astra Low Thinking" "label": "GPT-6 Astra Low Thinking"
@@ -139,13 +111,45 @@
"id": "gpt-6-astra-high", "id": "gpt-6-astra-high",
"label": "GPT-6 Astra High Thinking" "label": "GPT-6 Astra High Thinking"
}, },
{
"id": "swe-2-flash-medium",
"label": "SWE-2 Flash Medium"
},
{ {
"id": "swe-2-flash-high", "id": "swe-2-flash-high",
"label": "SWE-2 Flash High" "label": "SWE-2 Flash High"
},
{
"id": "claude-fable-5-2-low",
"label": "Claude Fable 5.2 Low"
},
{
"id": "claude-fable-5-2-medium",
"label": "Claude Fable 5.2 Medium"
},
{
"id": "claude-fable-5-2-high",
"label": "Claude Fable 5.2 High"
},
{
"id": "gemini-4-hydrogen-low",
"label": "Gemini 4 Hydrogen Low"
},
{
"id": "gemini-4-hydrogen-medium",
"label": "Gemini 4 Hydrogen Medium"
},
{
"id": "gemini-4-hydrogen-high",
"label": "Gemini 4 Hydrogen High"
},
{
"id": "gemini-4-neon-low",
"label": "Gemini 4 Neon Low"
},
{
"id": "gemini-4-neon-medium",
"label": "Gemini 4 Neon Medium"
},
{
"id": "gemini-4-neon-high",
"label": "Gemini 4 Neon High"
} }
], ],
"codex": [ "codex": [
@@ -164,6 +168,14 @@
{ {
"id": "gpt-6-luna", "id": "gpt-6-luna",
"label": "GPT-6 Luna" "label": "GPT-6 Luna"
},
{
"id": "gpt-6.2-astra",
"label": "GPT-6.2 Astra"
},
{
"id": "gpt-6.2-sol",
"label": "GPT-6.2 Sol"
} }
], ],
"strengths": { "strengths": {
@@ -116,6 +116,10 @@
/* Open the lessons: each file under its own name. */ /* 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-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: var(--fs-sm); color: var(--ink-3); } .learn-lessons-name { margin: 0 0 6px; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-3); }
/* Each file's own .md block would keep the page-wide 68ch cap; let it fill the dialog.
A lesson's title is a long heading: balanced wrapping (tokens.css) halves it, so fill each line. */
.learn-lessons-file .md { max-width: none; }
.learn-lessons-file .md-h { text-wrap: wrap; }
/* The lessons card (cards.js buildLessons): one block per item, none chosen at first. */ /* 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-opening { margin: 14px 0 0; font-size: var(--fs-md); color: var(--ink-3); }
+4 -2
View File
@@ -5,7 +5,7 @@
/* Print only the document; session furniture stays off paper. */ /* Print only the document; session furniture stays off paper. */
@media print { @media print {
.topbar, .rail, .aside, .footer, .banner, .skip, .doc-tools, .pager, .modal, .arrival, .review-offer { display: none !important; } .topbar, .rail, .aside, .footer, .banner, .skip, .doc-tools, .pager, .modal, .arrival, .review-offer { display: none !important; }
html, body { height: auto; background: #fff; color: #000; } html, body { height: auto; overflow: visible; background: #fff; color: #000; }
body { display: block; } body { display: block; }
.layout { display: block; overflow: visible; } .layout { display: block; overflow: visible; }
.main { overflow: visible; padding: 0; max-width: none; } .main { overflow: visible; padding: 0; max-width: none; }
@@ -32,7 +32,9 @@
rail becomes a strip above the page (Planny beside the list) and the notes rail becomes a strip above the page (Planny beside the list) and the notes
follow the card, as on a phone. */ follow the card, as on a phone. */
@media (max-width: 900px) { @media (max-width: 900px) {
body { display: block; } /* One column: here the page scrolls as a whole (the sticky footer rides it). */
html, body { overflow: visible; }
body { display: block; min-height: 100vh; }
.layout, .layout:has(> .aside:empty), .layout:has(.git-board) { display: block; } .layout, .layout:has(> .aside:empty), .layout:has(.git-board) { display: block; }
.rail { border-right: 0; border-bottom: 1px solid var(--rule); } .rail { border-right: 0; border-bottom: 1px solid var(--rule); }
.sidebar, .aside { border: 0; border-bottom: 1px solid var(--rule); max-height: 30vh; } .sidebar, .aside { border: 0; border-bottom: 1px solid var(--rule); max-height: 30vh; }
+4
View File
@@ -217,6 +217,10 @@ h1 {
grid-template-columns: 250px minmax(0, 1fr) 320px; grid-template-columns: 250px minmax(0, 1fr) 320px;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
/* The containing block for the absolutely placed bits inside (the rail items'
screen-reader text): without one they sit against the page, and the ones
below a scrolled panel stretched the page itself past the footer. */
position: relative;
} }
/* A side column with nothing to show is not drawn: an empty aside gives its /* A side column with nothing to show is not drawn: an empty aside gives its
+4 -2
View File
@@ -194,7 +194,9 @@ h1, h2, h3, .md-h, .dash-title, .git-branch, .git-step-title { font-variant-nume
.md-p, .card .prompt { text-wrap: pretty; } .md-p, .card .prompt { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); } ::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
html, body { height: 100%; } /* The page itself never scrolls (the desktop app frames it, and a scrolling
page showed blank space under the footer): panels scroll, the shell does not. */
html, body { height: 100%; overflow: hidden; }
body { body {
margin: 0; margin: 0;
@@ -203,7 +205,7 @@ body {
font: var(--fs-base)/var(--lh-body) var(--sans); font: var(--fs-base)/var(--lh-body) var(--sans);
display: grid; display: grid;
grid-template-rows: auto 1fr auto; grid-template-rows: auto 1fr auto;
min-height: 100vh; min-height: 0;
} }
:focus-visible { :focus-visible {
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "Plan2Code", "name": "Plan2Code",
"version": "3.1.3", "version": "3.1.5",
"description": "A structured workflow of six steps (Pathfinder, Plan, Document, Implement, Review, Finalize) for AI-assisted software development", "description": "A structured workflow of six steps (Pathfinder, Plan, Document, Implement, Review, Finalize) for AI-assisted software development",
"keywords": [ "keywords": [
"ai", "ai",
@@ -17,6 +17,6 @@
"url": "https://github.com/jparkerweb/plan2code" "url": "https://github.com/jparkerweb/plan2code"
}, },
"homepage": "https://github.com/jparkerweb/plan2code", "homepage": "https://github.com/jparkerweb/plan2code",
"releaseDate": "2026-11-18", "releaseDate": "2026-11-23",
"mode": "utility" "mode": "utility"
} }