From afec339e967f7ae499fc1ed9f05aa57393df784a Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 2 Jun 2026 19:42:59 -0500 Subject: [PATCH] docs(desktop): sync marker schema comment + default dock note arg Address Copilot review: document the `adopted` flag and nullable `pinnedCommit` in the marker schema comment, and default `done(note = {})` so the dock-pinned marker write is unambiguous (object spread of undefined was already a no-op, but explicit is clearer). --- apps/desktop/electron/main.cjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/desktop/electron/main.cjs b/apps/desktop/electron/main.cjs index 71aded3fd..7ee3ce64a 100644 --- a/apps/desktop/electron/main.cjs +++ b/apps/desktop/electron/main.cjs @@ -1510,8 +1510,12 @@ function readJson(filePath) { // Marker schema (version 1): // { // schemaVersion: 1, -// pinnedCommit: "<40-char SHA>", // what install.ps1 was driven against +// pinnedCommit: "<40-char SHA>" | null, // what install.ps1 was driven against; +// // may be null for adopted installs // pinnedBranch: "" | null, +// adopted: , // true when we adopted a pre-existing +// // install rather than bootstrapping it; +// // treated as authoritative even sans commit // completedAt: "", // desktopVersion: "" // for forensics // } @@ -4052,7 +4056,7 @@ function maybePinToDock() { // tile is silently dropped when the Dock rewrites persistent-apps on restart. const url = pathToFileURL(bundle.endsWith('/') ? bundle : `${bundle}/`).href - const done = note => { + const done = (note = {}) => { try { fs.writeFileSync(marker, JSON.stringify({ bundle, pinnedAt: new Date().toISOString(), ...note }) + '\n') } catch {