docs(stockholm): reflect v3/v4 patches and dynamic scanning

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) <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-17 15:05:39 +02:00
co-authored by Claude Opus 4.7
parent 1f61a81841
commit 6a8ad57e23
+18 -3
View File
@@ -76,7 +76,10 @@ Look for `stockholm/index.html`. If absent:
### 3b. Versioned patch application
Patch files are named `stockholm-changes_v<N>.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<N>.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).