|
5 | 5 | - **S4d-225 (implementation, accepted; commit `875b105 Add Desktop locale-aware template seed`, 5 modified + 1 new file):** the Desktop templates Room DB now selects its seed by JVM locale, matching Android: `Locale.getDefault().language.contains("zh")` selects the Chinese Android seed DB (`ewm-db-ch.db`), otherwise the English seed DB (`ewm-db-eng.db`). The Chinese seed is packaged as a `:shared` desktopMain resource (`shared/src/desktopMain/resources/seed/ewm-db-ch.db`, byte-identical to `app/src/main/assets/ewm-db-ch.db`). Extended `TemplateDatabaseSeeds` with `defaultTemplateSeedLanguage()` and `unpackTemplateSeed(output, language)`; `unpackDefaultTemplateSeed(output)` now delegates to the locale-based selection. Empty-store `buildTemplateDatabase(dir)` and existing-DB no-reseed protection remain unchanged. Wired through `DesktopWindow.kt` and `Main.kt` unchanged except for comment/temp-filename updates. |
6 | 6 | - **Verification:** `:shared:desktopTest` (`TemplateDatabaseSeedingTest` now 5/5, including Chinese seed, English seed, existing-DB protection, and locale-rule tests) + `:desktopApp:compileKotlin` + `:desktopApp:run --args='--headless'` green (`--max-workers=8`, daemon stopped). The headless witness loaded the Chinese seed on the host's `zh` JVM locale. `git diff --check` clean. |
7 | 7 | - **Boundary (no overclaim):** release-grade Desktop template seeding correctness, **not** Android v2.10.0 1:1 UI/UX parity; template edit-in-place remains a separate gate. PR #358 stays Draft. |
8 | | -- **S4d-225b (this entry):** docs-only closeout — record S4d-225 in durable docs and remove stale "locale-aware seeding deferred" language. |
| 8 | +- **S4d-225b (this entry):** docs-only closeout — record S4d-225 in durable docs and remove stale seed-pending language. |
9 | 9 |
|
10 | 10 | ## 2026-06-29 — S4d-224 Desktop template default seeding (+S4d-224b docs) |
11 | 11 |
|
12 | 12 | - **S4d-224 (implementation, accepted; commit `c7959d0 Seed Desktop template database`, 3 modified + 3 new files):** the interactive Desktop window's templates Room DB now seeds from the existing English Android seed DB on first creation. The seed asset is packaged as a `:shared` desktopMain resource (`shared/src/desktopMain/resources/seed/ewm-db-eng.db`, byte-identical to `app/src/main/assets/ewm-db-eng.db`) so `:shared` does not depend on `:desktopApp` resources. Added `shared/desktopMain` `TemplateDatabaseSeeds.unpackDefaultTemplateSeed(output): File` to extract the resource to a writable file, and an overload `buildTemplateDatabase(dir, seedFile)` that copies the seed to the final DB path before Room opens it; the existing empty-store `buildTemplateDatabase(dir)` path is preserved for tests and callers that want an empty DB. Because Room KMP off-Android does not expose `createFromFile`/`createFromAsset`, seeding is done by direct file copy; Room validates the `room_master_table` identity hash (`72366f557b971b39675d0f26cbc46e0a`, already proven matching in S4d-143b). Wired both `DesktopWindow.kt` (real app DB under `~/.easywatermark`) and `Main.kt` (repo-local headless witness). Existing user DBs are **not** reseeded — the copy only happens when the target DB file does not exist. Headless witness is repeatable by deleting/recreating only its disposable `build/s4d143a-desktop-templates` directory before each run. |
13 | 13 | - **Verification:** `:shared:desktopTest` (including new `TemplateDatabaseSeedingTest`) + `:desktopApp:compileKotlin` + `:desktopApp:run --args='--headless'` green on two consecutive runs without manual pre-clean (`--max-workers=8`, daemon stopped). `git diff --check` clean. |
14 | | -- **Boundary (no overclaim):** release-grade Desktop template default seeding, **not** Android v2.10.0 1:1 UI/UX parity; locale-aware seed choice (`ewm-db-ch.db` for Chinese locales, English otherwise) remains deferred; template edit-in-place remains a separate gate. PR #358 stays Draft. |
| 14 | +- **Boundary (no overclaim):** release-grade Desktop template default seeding, **not** Android v2.10.0 1:1 UI/UX parity; locale-aware seed choice landed in S4d-225; template edit-in-place remains a separate gate. PR #358 stays Draft. |
15 | 15 | - **S4d-224b (this entry):** docs-only closeout — recorded the above in `progress.md`, `task_plan.md`, `docs/CONTEXT.md`, and `AGENTS.md` and removed stale "default-template seeding deferred" language. |
16 | 16 |
|
17 | 17 | ## 2026-06-29 — S4d-222 Desktop save output filename collision avoidance (+S4d-222b docs) |
|
144 | 144 | - **S4d-143a (implementation, accepted; commit `07ac7b6`):** added the `:desktopApp --headless` templates witness. The app builds a Desktop DB under `build/s4d143a-desktop-templates`, constructs `TemplateRepository` + `TemplateEditor`, proves empty count, add/list/delete, and closes the DB. `desktopApp` now declares the existing `room.runtime` dependency because it directly consumes the public `RoomDatabase` supertype exposed by `AppDatabase`; Android remains `sqlite-bundled`/native-sqlite clean. |
145 | 145 | - **S4d-143b (read-only seed decision, accepted):** proved Desktop seed parity is viable but still optional. Both Android seed DB assets (`ewm-db-eng.db`, `ewm-db-ch.db`) contain one template row and `room_master_table` identity hash `72366f557b971b39675d0f26cbc46e0a`, matching generated Room `AppDatabase_Impl` for Android, Desktop, and both iOS targets. The worker-created SQLite WAL/SHM sidecars under `app/src/main/assets` were generated artifacts and were explicitly removed before acceptance. |
146 | 146 | - **Decision (S4d-143b, superseded by S4d-224):** do not implement Desktop seed packaging yet. The empty-store builder and app witness were enough for the initial Desktop release-code migration lane; `createFromFile` seed packaging was deferred to a separate slice (now implemented as S4d-224 via direct seed-file copy, because Room KMP off-Android does not expose `createFromFile`/`createFromAsset`). |
147 | | -- **Next (S4d-143b-era, now partly done):** S4d-224 implemented the Desktop default English seed. Locale-aware seed choice and template edit-in-place remain separate gates; Android v2.10.0 screenshot/recording 1:1 parity remains deferred until release-grade code migration completes. |
| 147 | +- **Next (S4d-143b-era, now mostly done):** S4d-224 implemented the Desktop default English seed and S4d-225 made it locale-aware. Template edit-in-place remains a separate gate; Android v2.10.0 screenshot/recording 1:1 parity remains deferred until release-grade code migration completes. |
148 | 148 |
|
149 | 149 | ## 2026-06-28 — S4d-140 Desktop Save-As destination accepted |
150 | 150 |
|
|
0 commit comments