From a89f45ce9154a6d1c02b0635a14ee3a3e25000f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 06:10:42 +0000 Subject: [PATCH] fix(#300): update stale comments that described old buggy behavior Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com> --- package-lock.json | 16 ++++++++++++++++ packages/pi-coding-agent/package.json | 3 ++- src/resources/extensions/gsd/auto.ts | 4 ++-- src/resources/extensions/gsd/worktree.ts | 4 +++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65b2d5e21..882b933e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4086,6 +4086,7 @@ "@gsd/pi-tui": "*", "@mariozechner/jiti": "^2.6.2", "@silvia-odwyer/photon-node": "^0.3.4", + "@types/node": "^25.5.0", "better-sqlite3": "^11.7.0", "chalk": "^5.5.0", "diff": "^8.0.2", @@ -4108,6 +4109,21 @@ "@types/proper-lockfile": "^4.1.4" } }, + "packages/pi-coding-agent/node_modules/@types/node": { + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "packages/pi-coding-agent/node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "license": "MIT" + }, "packages/pi-tui": { "name": "@gsd/pi-tui", "version": "0.57.1", diff --git a/packages/pi-coding-agent/package.json b/packages/pi-coding-agent/package.json index 61010b64f..9b301249c 100644 --- a/packages/pi-coding-agent/package.json +++ b/packages/pi-coding-agent/package.json @@ -30,6 +30,8 @@ "@gsd/pi-tui": "*", "@mariozechner/jiti": "^2.6.2", "@silvia-odwyer/photon-node": "^0.3.4", + "@types/node": "^25.5.0", + "better-sqlite3": "^11.7.0", "chalk": "^5.5.0", "diff": "^8.0.2", "extract-zip": "^2.0.1", @@ -42,7 +44,6 @@ "proper-lockfile": "^4.1.2", "strip-ansi": "^7.1.0", "undici": "^7.19.1", - "better-sqlite3": "^11.7.0", "yaml": "^2.8.2" }, "devDependencies": { diff --git a/src/resources/extensions/gsd/auto.ts b/src/resources/extensions/gsd/auto.ts index 325f69286..aadb740d5 100644 --- a/src/resources/extensions/gsd/auto.ts +++ b/src/resources/extensions/gsd/auto.ts @@ -475,8 +475,8 @@ export async function startAuto( // Capture the integration branch — records the branch the user was on when // auto-mode started. Slice branches will merge back to this branch instead - // of the repo's default (main/master). Idempotent: only writes if not - // already recorded, so restarts/resumes don't overwrite. + // of the repo's default (main/master). Idempotent when the branch is the + // same; updates the record when started from a different branch (#300). if (currentMilestoneId) { captureIntegrationBranch(base, currentMilestoneId); setActiveMilestoneId(base, currentMilestoneId); diff --git a/src/resources/extensions/gsd/worktree.ts b/src/resources/extensions/gsd/worktree.ts index ecbfdfffe..4a2c84516 100644 --- a/src/resources/extensions/gsd/worktree.ts +++ b/src/resources/extensions/gsd/worktree.ts @@ -55,7 +55,9 @@ export function setActiveMilestoneId(basePath: string, milestoneId: string | nul /** * Record the current branch as the integration branch for a milestone. * Called once when auto-mode starts — captures where slice branches should - * merge back to. No-op if already recorded or if on a GSD slice branch. + * merge back to. No-op if the same branch is already recorded. Updates the + * record when the user starts from a different branch (#300). Always a no-op + * if on a GSD slice branch. */ export function captureIntegrationBranch(basePath: string, milestoneId: string): void { const svc = getService(basePath);