From 6a8ad57e233153000183da85a5f858b60ab0123e Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 17 May 2026 12:16:12 +0200 Subject: [PATCH] docs(stockholm): reflect v3/v4 patches and dynamic scanning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The port guide was written when only v1 and v2 existed; today the upstream krahl/soundcork-stockholm-app ships v1..v4. The Go code path already scans dynamically (no hardcoded version list), so future versions get picked up without code changes — only the documentation was stale. Update three spots: - The patch-application section now notes the dynamic scan and lists the four current versions with one-line summaries. - The shell instructions for a plain-process install use a for-loop over stockholm-changes_v*.patch instead of hardcoding v1 and v2. - The "Patches summary" appendix gains v3 (now_play.js guard) and v4 (app_comm.js clientId polish). Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/stockholm-port-guide.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/stockholm-port-guide.md b/docs/stockholm-port-guide.md index d8acbf8..6150e17 100644 --- a/docs/stockholm-port-guide.md +++ b/docs/stockholm-port-guide.md @@ -76,7 +76,10 @@ Look for `stockholm/index.html`. If absent: ### 3b. Versioned patch application Patch files are named `stockholm-changes_v.patch` and applied in ascending -order. The current patches are v1 (1 153 lines) and v2 (1 475 lines). +order. The set is scanned dynamically at preparation time; today the upstream +project ships v1 (1 153 lines), v2 (1 475 lines), v3 (44 lines, `now_play.js` +fix), and v4 (68 lines, `app_comm.js` clientId polish). New versions added +upstream are picked up automatically — our code does not hardcode a list. A marker file `stockholm/.soundcork-stockholm-app.json` tracks the last applied version: @@ -580,8 +583,12 @@ process, do these steps once before running the binary: # Requires: unzip, patch, npm/prettier@3.8.3 unzip stockholm_zip/stockholm.zip -d stockholm npx prettier@3.8.3 --ignore-path /dev/null --write "stockholm/**/*.js" -patch -p1 --batch < stockholm-changes_v1.patch -patch -p1 --batch < stockholm-changes_v2.patch +# Apply every stockholm-changes_v.patch that exists, in ascending order. +# Today the upstream ships v1..v4; new ones get picked up automatically when +# the upstream repo is re-cloned via `make build-stockholm-image`. +for patch in stockholm-changes_v*.patch; do + patch -p1 --batch < "$patch" +done ``` Or run the Docker container once and copy the `stockholm/` directory out. @@ -645,3 +652,11 @@ or one level up. Run from the project root. - `stockholm/js/presets.js` — minor fix - `stockholm/js/sources.js` — minor fix - `stockholm/setup/js/app_comm.js` — same fixes as main app_comm.js + +**v3** (44 lines): + +- `stockholm/js/now_play.js` — small playback-state guard. + +**v4** (68 lines): + +- `stockholm/js/app_comm.js` — further `clientId` handling polish (localStorage persistence).