Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7cd7dda0c0 | |||
| 9b8eb7036d | |||
| 21d3cd1119 | |||
| 3a6f2ad6ee | |||
| 0d37f91763 | |||
| 185625e7fe | |||
| d5f37b3149 | |||
| 2eea9d67f5 | |||
| 229cced136 | |||
| e262b8f295 | |||
| 3c4463dbdd | |||
| 0b72ae05a2 | |||
| d1b7ae4376 | |||
| 0979a6c894 | |||
| f0cb6750c4 | |||
| 3a2ebbd9dc | |||
| 2c3a71c12d | |||
| 1ff00b0e3f | |||
| 52d8c0bfd1 | |||
| 5576af4fac | |||
| 08c188ccee | |||
| b2b50efd90 | |||
| 9eef8a3bf7 | |||
| f0767bfed7 | |||
| 9e3d389f82 | |||
| 938f6ccdeb | |||
| 0b64c43d4a | |||
| 132ba05fe9 | |||
| 0c4f5bb556 | |||
| e0a3b66dc8 | |||
| 103283daaa | |||
| 96ac78d079 | |||
| c2320a4517 | |||
| a93ef09956 | |||
| 3f95a1b37d | |||
| 22f55dc9fa | |||
| 96c0a2b00e | |||
| d968998f23 | |||
| 5f2a5f3cfc | |||
| e415d1ed29 | |||
| 8c19459bb6 | |||
| b67fa3603d | |||
| 102ac44675 | |||
| 0861125472 | |||
| 87375c72d4 | |||
| 1070017d2c | |||
| ae1169ed6a | |||
| 03d41aa893 | |||
| 838830e0ef | |||
| 781a2407b9 | |||
| 1e647985ea | |||
| 03dc69702a | |||
| 5934523e45 | |||
| cdbaf56195 | |||
| 636c0bcbc0 | |||
| ad41c58730 | |||
| 9c7f67a1f0 | |||
| 12fc4bd249 | |||
| 8e286b2bf6 | |||
| 7a6cf4c6d1 | |||
| a99dfe535d |
@@ -5,13 +5,23 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in
|
||||
|
||||
| Feature | Phase | Status | Analysis | Review |
|
||||
|:--|:--|:--|:--|:--|
|
||||
| Released through Fabrica: `.fabrica/` (app, release and e2e pipelines, tests, Aula pictures), the Aula page's words, the version check, the APK signed in Custos, `domi-rosea://open` from the installer, the showcase pictures on demo data, the phone target | Platform track | Merged to `main` (9b8eb70). Not published: the first release waits for the author (G-F1, G6.1) | [fabrica-release.md](features/fabrica-release.md) | [feature-fabrica-release.md](reviews/feature-fabrica-release.md) |
|
||||
| The APK for a release, tested on the Wave 10 through the phone queue: `reset: uninstall`, `maxMinutes`, the e2e pipeline's `phone` step, the release APK built and verified | Platform track | On `feature/android-release-apk`. Blocked: the phone is not paired in Fabrica (G-F5); `rosea-android` does not exist (G-F7) | [android-release-apk.md](features/android-release-apk.md) | [feature-android-release-apk.md](reviews/feature-android-release-apk.md) |
|
||||
| Keep her safe in the apps: true words, Android's own save screen, the page kept between the system bars | Platform track | Merged to `main` 2026-11-17; built on this machine, not distributed. Closes G-T4 and, on Android, G-T5 | [keep-her-safe-apps.md](features/keep-her-safe-apps.md) | [feature-keep-her-safe-apps.md](reviews/feature-keep-her-safe-apps.md) |
|
||||
| Four versions, one garden: the Tauri 2 shell (`apps/rosea-tauri`) for Android, iOS and desktop beside the PWA; a Windows build and an Android debug APK run on the tablet | Platform track | Merged to `main` 2026-11-17; built on this machine, not distributed. iOS needs a Mac (G-T1); *Keep her safe* in the apps is a release blocker (G-T4) | [tauri-platforms.md](features/tauri-platforms.md) | [feature-tauri-platforms.md](reviews/feature-tauri-platforms.md) |
|
||||
| Workspace, contracts, gates, PWA shell | 0 | Merged to `main` 2026-11-01 (`d11d242`); built, not deployed. Phase 0 gate still open | [phase0-workspace.md](features/phase0-workspace.md) | [feature-phase0-workspace.md](reviews/feature-phase0-workspace.md) |
|
||||
| Roadmap and gameplay docs, read against the code | 0 | Merged 2026-11-01; Q1–Q7 answered by the author | — | [docs-roadmap-gameplay.md](reviews/docs-roadmap-gameplay.md) |
|
||||
| The Letter slot: page at `#letter`, empty `docs/LETTER.md` | 0 | Merged to `main`; built, not deployed. Invisible until the author writes | [letter-slot.md](features/letter-slot.md) | [feature-letter-slot.md](reviews/feature-letter-slot.md) |
|
||||
| The sunrise: the line names the real sunrise from sunset until it comes | 1 | Merged to `main`; built, not deployed | [sunrise.md](features/sunrise.md) | [feature-sunrise.md](reviews/feature-sunrise.md) |
|
||||
| Two tabs, one garden: what one tab writes, the others see | 1 | Merged to `main`; built, not deployed | [two-tabs.md](features/two-tabs.md) | [fix-two-tabs.md](reviews/fix-two-tabs.md) |
|
||||
| Thorns: touch her; a rush of taps, and she says she has thorns | 1 | Merged to `main`; built, not deployed | [thorns.md](features/thorns.md) | [feature-thorns.md](reviews/feature-thorns.md) |
|
||||
| The day's sentence: her folded petal, one a day, never lost, best at sunset; candidates and `library:verify` | 1 | Merged to `main`; built, not deployed. Invisible until the author verifies sentences | [day-sentence.md](features/day-sentence.md) | [feature-day-sentence.md](reviews/feature-day-sentence.md) |
|
||||
| The in-game sunset: move the chair, half a minute of silence, then the real sunset's time | 1 | Merged to `main`; built, not deployed | [chair-sunset.md](features/chair-sunset.md) | [feature-chair-sunset.md](reviews/feature-chair-sunset.md) |
|
||||
| A calm refresh: a waiting new version is offered in one line, never swapped in by itself | 0 | Merged to `main`; built, not deployed | [calm-refresh.md](features/calm-refresh.md) | [feature-calm-refresh.md](reviews/feature-calm-refresh.md) |
|
||||
| The CPU guard: full runs wait for, then refuse, a busy machine | 0 | Merged to `main` | — | [fix-cpu-guard.md](reviews/fix-cpu-guard.md) |
|
||||
| Keep her safe: the browser's promise, save her to a file, bring her back | 0–1 | Merged to `main`; built, not deployed | [keep-her-safe.md](features/keep-her-safe.md) | [feature-keep-her-safe.md](reviews/feature-keep-her-safe.md) |
|
||||
| The rose: care by feel, growth from days of care, drift, moods, her numbers; the care log and the identity | 1 | Merged to `main`; built, not deployed. Tuning is the author's | [rose.md](features/rose.md) | [feature-rose-care.md](reviews/feature-rose-care.md) |
|
||||
| Where the sunset is: choose a town (or skip to a guess from the device's zone), kept on the device; tonight's sunset in the garden | 1 | Merged to `main`; built, not deployed | [sunset-place.md](features/sunset-place.md) | [feature-sunset-place.md](reviews/feature-sunset-place.md) |
|
||||
| The sun: real sunrise, sunset and solar noon on the device; polar day and night | 1 | Merged to `main`; engine only, the app does not show it yet | [sun.md](features/sun.md) | [feature-sun.md](reviews/feature-sun.md) |
|
||||
| The art pipeline and the art board: STYLE.md (S1–S5 and the fox's F1–F4 approved), the manifest (Phase 1–3, 53 pictures), stand-ins, `tools/art-prep`, the published board | 0 | Merged to `main`; board published (private). The app is unchanged. Gate waits on the first real picture | [art-pipeline.md](features/art-pipeline.md) | [feature-art-board.md](reviews/feature-art-board.md), [art-phase2-3-pictures.md](reviews/art-phase2-3-pictures.md) |
|
||||
| Her planet and the gardener: a round tiny planet, a boy or girl chosen at the first open, the ring of care by a tap on her, care by gesture (tilt the can, swipe weeds up, sweep petals, drag the windbreak, stroke her); every gesture also a button | 1 | Merged to `main`; built, not deployed. Code stand-ins; the painted art waits on the board | [planet-garden.md](features/planet-garden.md) | [feature-planet-garden.md](reviews/feature-planet-garden.md) |
|
||||
| The art pipeline and the art board: STYLE.md (S1–S6 and the fox's F1–F4 approved), the manifest (Phases 1–5: 95 cards, 538 pictures, of them 55 gardener layer sheets), stand-ins, `tools/art-prep`, the published board | 0 | Merged to `main`; board published (private). The app is unchanged. Gate waits on the first real picture | [art-pipeline.md](features/art-pipeline.md) | [feature-art-board.md](reviews/feature-art-board.md), [art-phase2-3-pictures.md](reviews/art-phase2-3-pictures.md), [art-board-v2.md](reviews/art-board-v2.md), [art-gardener-layers.md](reviews/art-gardener-layers.md) |
|
||||
|
||||
@@ -28,19 +28,19 @@ board exist, and the first real picture is the author's to make.
|
||||
| ~~G0.9~~ | ~~No proof the app opens offline~~ | Closed for the shell 2026-11-01. `offline.spec.ts` closes the server, then reload, cold start and a deep link all render. Mutations: `clientsClaim: false` and no `navigateFallback` both fail it. |
|
||||
| ~~G0.10~~ | ~~No calm *refresh* control for a waiting service worker (CLAUDE.md §8, stale SW)~~ | Closed 2026-11-02 on `feature/calm-refresh`: the app registers the worker and shows *A new version of the garden is ready.* with *Refresh*. e2e publishes a real second version: offered, not swapped, then taken over on Refresh; 3 of 3 put-back bugs caught. |
|
||||
| ~~G0.11~~ | ~~IndexedDB eviction: no `navigator.storage.persist()`, no export-my-rose (§8)~~ | Closed 2026-11-02 on `feature/keep-her-safe`: *Keep her safe* asks the browser (and an installed app asks by itself), saves her to a file without the town or the private key, and brings her back additively on any device. e2e: saved on one browser profile, restored on a fresh one, survives a reload. Not seen in Firefox or Safari. |
|
||||
| G0.12 | The app cannot validate content in the browser | Open. Ajv compiles with `new Function`, which the CSP forbids. Needs standalone pre-compiled validators before the app reads the library. |
|
||||
| G0.12 | The app cannot validate content in the browser | Narrowed 2026-11-02 (day-sentence.md P5): the library is bundled at build time, after `validate:library` passes, so the app never validates it. Reopens only if content is ever fetched at runtime; then it needs standalone pre-compiled validators (Ajv compiles with `new Function`, which the CSP forbids). |
|
||||
| G0.13 | No GitHub remote, no Pages deploy workflow, no mirror check (§5.2) | Open. Only the Gitea remote exists. |
|
||||
| G0.14 | Author-owned docs missing: `docs/PRINCIPLES.md`, `docs/ART.md`, `art/STYLE.md`, `docs/LETTER.md` | Open, narrowed 2026-11-01: `docs/ROADMAP.md` and `docs/GAMEPLAY.md` were added on `docs/roadmap-gameplay`, as the author gave them. Agents scaffold LETTER.md; they never write its voice. |
|
||||
| G0.15 | Deferred packages: `sync`, `services/lucerna` | Open by design (D1). Each arrives with its first feature. `tools/art-prep` arrived with the art board; `storage` with the sunset place and the rose (`profile`, `events`, `keys`); `identity` with the rose (a keypair, nothing signed yet). |
|
||||
| G0.16 | The outcome-phrase heuristic has no reviewed override | Open. A real sentence that trips it (a false positive) cannot enter the library. Design: a `reviewedBy` field on the entry, set only by a person. |
|
||||
| G0.17 | Manual: install on a phone, open in airplane mode | Open. Needs a hosted build (G0.13). |
|
||||
| G0.18 | The library is empty | Open. **Phase 0 gate**: 60 sentences, each sourced and verified public domain (ROADMAP Phase 0). Release needs ≥ 365. `verifiedBy` is a person, so an agent may propose candidates but never mark one verified (D4). |
|
||||
| G0.18 | The library is empty | Open. **Phase 0 gate**: 60 sentences, each sourced and verified public domain (ROADMAP Phase 0). Release needs ≥ 365. `verifiedBy` is a person, so an agent may propose candidates but never mark one verified (D4). Since 2026-11-02 candidates wait in `content/candidates/`, each with where to read it; the author verifies with `pnpm library:verify <id…> --by <name>` (day-sentence.md P8). |
|
||||
| G0.19 | Event kinds other than `care` | Open. GAMEPLAY.md now exists; each kind arrives with the feature doc that uses it, starting in Phase 1. |
|
||||
| G0.20 | Node 22.11 on the dev machine is below what some pinned dependencies declare | Open. All gates pass on 22.11 today. Upgrade to ≥ 22.13 and unpin (D11). |
|
||||
| G0.21 | No PNG icons | Open (predicted trap). iOS ignores SVG for `apple-touch-icon`. Comes through the art pipeline. |
|
||||
| G0.22 | No CI | Open. Every gate ran on this machine only. With G0.13. |
|
||||
| G0.20 | Node 22.11 on the dev machine is below what some pinned dependencies declare | Narrowed 2026-11-17: the machine runs **Node 22.23.4** (upgraded by the author). Its newer time zone data exposed a stale town list, fixed on `fix/coyhaique` (Santiago had been on a southern zone's clock since the first build). **Still open:** unpin the dependencies pinned for 22.11 (D11), in their own commit. |
|
||||
| G0.21 | No PNG icons | Open (predicted trap). iOS ignores SVG for `apple-touch-icon`. Comes through the art pipeline. Narrowed 2026-11-17: the apps make PNG/ICO icons from `icon.svg` at build time (`tauri icon`, never committed); the PWA still has none, and the picture is still the placeholder. |
|
||||
| G0.22 | No CI | Open. Every gate ran on this machine only. With G0.13. Since 2026-11-17 the APK and the Windows installer are also built by hand here (G-T7). |
|
||||
| G0.23 | Source maps are built and would be published | Open. `sourcemap: true`; maps are not precached. Decide with G0.13 whether the repository is public. If not, use `'hidden'`. |
|
||||
| G0.24 | No art pipeline: `docs/ART.md`, `art/STYLE.md` (drafted with the author), `art/manifest.json` for Phase 1 assets, SVG placeholders, `tools/art-prep` | **Pipeline built 2026-11-01** (`feature/art-board`): docs/ART.md, the Phase 1 manifest (25 pictures), 29 generated stand-ins, `tools/art-prep` (50 tests; 5 of 5 put-back bugs caught), the art board published. STYLE.md approved by the author 2026-11-01 (S1–S5 kept as drafted; `docs/style-approved`). The board grew to 53 pictures with Phases 2–3 (`art/phase2-3-pictures`); the fox's look F1–F4 approved with a deep red-orange coat (`art/fox-coat`). **Still open:** the **Phase 0 gate**, one real picture through every step into `art/final/`. |
|
||||
| G0.24 | No art pipeline: `docs/ART.md`, `art/STYLE.md` (drafted with the author), `art/manifest.json` for Phase 1 assets, SVG placeholders, `tools/art-prep` | **Pipeline built 2026-11-01** (`feature/art-board`): docs/ART.md, the Phase 1 manifest (25 pictures), 29 generated stand-ins, `tools/art-prep` (50 tests; 5 of 5 put-back bugs caught), the art board published. STYLE.md approved by the author 2026-11-01 (S1–S5 kept as drafted; `docs/style-approved`). The board grew to 53 pictures with Phases 2–3 (`art/phase2-3-pictures`); the fox's look F1–F4 approved with a deep red-orange coat (`art/fox-coat`). 2026-11-07, `art/board-v2`: the first `rose-sheet` came out as watercolour with a smiley on a ball; STYLE.md §1 and every prompt rewritten (look first, face on the petals, no pixel numbers, the book's motifs checked in review, not named), and the board grew to 86 pictures for Phases 1–5 (board version 4). 2026-11-17, `art/gardener-layers`: the gardener the player dresses is drawn in layered parts (the author's answer): a guide and 55 layer sheets, register checked by `art:accept`, 10 of 10 put-back bugs caught; the board has 95 cards and 538 pictures. **Still open:** the **Phase 0 gate**, one real picture through every step into `art/final/`. |
|
||||
| ~~G0.25~~ | ~~No slot for *A Letter from the Gardener*~~ | Closed 2026-11-01, merged to `main`. `docs/LETTER.md` holds slots as comments only; the page opens at `#letter` once it has words. 16 ui tests, and e2e on both the empty and a temporary written letter. Mutations caught: the link while empty, any link scheme, focus not moving, *heal* in the letter. |
|
||||
| ~~G0.28~~ | ~~CLAUDE.md §5.7's CPU limit was only read, and broken three times on 2026-11-02~~ | Closed 2026-11-02 on `fix/cpu-guard`: `pnpm guard:cpu` runs before every full run, waits up to 3 min, then refuses. 13 tests; seen waiting 51 s on a busy machine, refusing, and stopping `pnpm test` before any test ran. |
|
||||
| G0.27 | The quiet door to real help has no numbers (§5.6 rule 5) | Open. The slot is in `docs/LETTER.md`. Support lines are real-world facts the author must verify, per country, so the door exists only once the letter does. |
|
||||
@@ -49,16 +49,60 @@ board exist, and the first real picture is the author's to make.
|
||||
## Phase 1 — The rose alone
|
||||
|
||||
**Started 2026-11-01** with the sun, while the Phase 0 gate waits on the author (pictures,
|
||||
sentences). Nothing in Phase 1 is visible to the player yet.
|
||||
sentences). Phase 1 is built in code, not deployed (no host yet, G0.13).
|
||||
|
||||
| Id | Gap | Status / evidence |
|
||||
|:--|:--|:--|
|
||||
| ~~G1.1~~ | ~~No module computes the sun (CLAUDE.md §7); polar and DST traps only predicted~~ | Closed 2026-11-01 on `feature/sun`. `engine/src/sun/sun.ts`: 26 published days in 6 cities within 2 min, polar day and night at Tromsø, 50 tests, 5 of 5 put-back bugs caught. Both traps measured (CLAUDE.md §8). |
|
||||
| ~~G1.2~~ | ~~The player cannot choose a city; no time-zone guess; no sunset time on screen~~ | Closed 2026-11-02 on `feature/sunset-place`. 7,342 public-domain towns searched on the device, a guess for every zone a browser reports, the town kept in IndexedDB, tonight's sunset in the garden. 299 unit, 10 e2e, offline choosing and changing a town; 6 of 6 put-back bugs caught. |
|
||||
| ~~G1.4~~ | ~~No rose~~ | Closed 2026-11-02 on `feature/rose-care`: care with a touch of skill (water by holding, shade, weeds, petals), growth from days of care, drift, moods, her numbers; the care log in IndexedDB, replayed by the engine. Tuning R2/R4/R5/R6 is the author's. 7 of 7 put-back bugs caught after two test holes were closed. |
|
||||
| G1.5 | The day's sentence and the folded petal; the in-game sunset with the chair | Open. The sentence needs the library (G0.18). |
|
||||
| ~~G1.5~~ | ~~The day's sentence and the folded petal~~ | Closed 2026-11-02 on `feature/day-sentence`, for the code: `engine/petal` (5 properties: never lost, verified-later never swaps it, one a day, no repeat until all opened), the `sentence-opened` event, the rose file v2, the petal in the garden; e2e opens one in a fixture build and reloads. 9 of 9 put-back bugs caught. **The shipped app shows no petal until the author verifies sentences (G0.18).** |
|
||||
| ~~G1.6~~ | ~~The in-game sunset: move the chair, watch it again~~ | Closed 2026-11-02 on `feature/chair-sunset`: half a minute with nothing to press, then the real sunset's time; Escape and a tap leave; the offline suite watches one with the server gone. 4 of 4 put-back bugs caught. |
|
||||
| ~~G1.7~~ | ~~Thorns were on the roadmap but undesigned~~ | Closed 2026-11-02 on `feature/thorns`, as the author chose: thorns teach gentleness. `engine/touch` (2 properties: spaced taps are never a rush; one blush a visit); a tremor is one touch; nothing recorded. 6 of 6 put-back bugs caught. |
|
||||
| ~~G1.8~~ | ~~Two tabs (CLAUDE.md §8, predicted)~~ | Closed 2026-11-07 on `fix/two-tabs`. Measured first: two e2e tests failed (an open tab saw neither care nor a town from the other). Storage announces committed writes on a `BroadcastChannel`; the rose and the garden read again, adding to what they show. No lock needed: nothing stored drifts. 7 of 7 put-back bugs caught. |
|
||||
| ~~G1.10~~ | ~~The garden named only the sunset, never the sunrise (ROADMAP Phase 1: *sunset and sunrise*)~~ | Closed 2026-11-17 on `feature/sunrise`: from sunset until it comes, the line names the real sunrise; the in-game sunset still names the sunset. engine `nextSunEvent` with a 300-run property; e2e at 05:00 in Brno; seen on a real Android tablet. 5 of 5 put-back bugs caught. |
|
||||
| ~~G1.9~~ | ~~The garden was a page of buttons, not a game (the author, 2026-11-17)~~ | Closed 2026-11-17 on `feature/planet-garden`: her round planet, a gardener the player chooses at the first open (fixed lists, kept in `profile`, never in the rose file), the ring of care by a tap on her, care by gesture with a button for each. 84 ui tests incl. 7 on the planet and 7 on gestures; e2e `planet.spec.ts` 3; 9 of 9 put-back bugs caught (2 only after tests were added); 7 of 7 by real touch on the Android tablet. **Open in it:** painted art for the planet and the gardener, and how customised looks are drawn (STYLE.md §3b, the author's). |
|
||||
| G1.11 | The app does not stack painted gardener layers | Open. Decided 2026-11-17 (STYLE.md §3b): the scene stacks body, clothes, apron, hair and hat from `art/final/`, in the look the player chose, and keeps its code drawing for any look whose layers are not all accepted. Comes with the first accepted layers; needs a size budget for 55 sheets (docs/ART.md §4: 440 cells would not all be precached). |
|
||||
| G1.3 | Towns have no Czech names (*Vídeň*) | Open. Natural Earth has none; arrives with Czech copy. |
|
||||
|
||||
## The platform track — four versions (from 2026-11-17)
|
||||
|
||||
Decided by the author 2026-11-17: the PWA, an Android APK, an iOS app and a desktop app from one
|
||||
Svelte codebase, the apps through a Tauri 2 shell. Analysis:
|
||||
[`features/tauri-platforms.md`](features/tauri-platforms.md); review:
|
||||
[`reviews/feature-tauri-platforms.md`](reviews/feature-tauri-platforms.md).
|
||||
|
||||
| Id | Gap | Status / evidence |
|
||||
|:--|:--|:--|
|
||||
| ~~G-T0~~ | ~~No shell, no app on any platform~~ | Closed 2026-11-17 on `feature/tauri-platforms`: `apps/rosea-tauri`; Windows `.exe` + NSIS installer built and checked (watered, closed, reopened, still watered); Android debug APK verified with `aapt2` (no permission, no backup) and checked on the WAVE 10C, Android 16, offline by construction. 40 shell tests; 14 of 14 drills caught. |
|
||||
| G-T1 | iOS | Open. Needs macOS + Xcode, the iOS Rust targets, an Apple developer account. `pnpm tauri:ios` refuses elsewhere. |
|
||||
| G-T2 | macOS and Linux desktop builds | Open. Each on its own system; macOS signing/notarisation. |
|
||||
| G-T3 | Release signing (Android keystore, Windows certificate); AAB; stores | Narrowed 2026-11-19 on `feature/fabrica-release`: the release pipeline signs the installer with Custos's `domi-code-signing` and the APK with `rosea-android` through `custos-sign`; no key in the repository (`fabrica-release.md` F4). **Still open:** `rosea-android` does not exist and Custos (0.22.0 here, 0.24.0 too) will not make it: it is not in Custos's `ANDROID_APPS` (`android-release-apk.md` A6, G-F7); no signature made yet (the first release waits, G-F1); AAB and stores (Phase 6). |
|
||||
| ~~G-T4~~ | ~~Keep her safe inside the apps — release blocker~~ | Closed 2026-11-17 on `feature/keep-her-safe-apps`: the apps say *She lives in this app, on this device, until the app is removed…* and ask no browser; Android saves through its own save screen by a narrow Kotlin bridge (no plugin, no IPC, no permission) and says *She is in that file now.*; Windows downloads. Seen on the tablet (2 of 2) and on Windows (3 of 3); 572 unit tests; every drill caught after one test was tightened. |
|
||||
| ~~G-T5~~ | ~~Bringing her back from a file inside the apps~~ | Closed on Android 2026-11-17: the round trip on the tablet, *Everything in that file is already here.* Windows not driven. |
|
||||
| G-T6 | WebView2's own traffic not measured for Rosea | Open. Flags from Amicitia's measurement are set; measure before a desktop release. |
|
||||
| G-T7 | No CI for the apps | Narrowed 2026-11-19 on `feature/fabrica-release`: `.fabrica/artifex/release.yaml` builds both apps from a tag on Fabrica's Windows runner after every gate; `.fabrica/artifex/e2e.yaml` runs the web suite on the e2e runner. Still Mark's PC, and no run on a push yet (no webhook reaches the hub). |
|
||||
| G-T8 | Webview storage eviction | Partly measured: `persist()` is `false` in WebView2 and Android WebView. Pressure eviction of app storage not measured. G-T4 is the answer either way. |
|
||||
| G-T9 | The app icon is the placeholder | Open. With G0.21. |
|
||||
|
||||
## Fabrica — released and updated through Fabrica (`fabrica-release.md`)
|
||||
|
||||
| Id | Gap | Status / evidence |
|
||||
|:--|:--|:--|
|
||||
| G-F1 | The first release is not published | Open, **the author's decision**: the repository is public, so a Gitea release and the Aula page are a public release, which G6.1 holds back. The pipeline, the kit and the words are ready; the tag waits. |
|
||||
| G-F2 | Canalis Part B: no capability is served | Open by decision (F6): no capability found that neither writes into her nor reads her; Canalis keys need Custos, which a player does not have. |
|
||||
| G-F3 | No showcase videos | Open: Pensum `kkpy69`, once Fabrica docs/37 is on `main`. |
|
||||
| G-F4 | `domi-rosea://` not seen working | Open: the hook is tested as text; no installer was run on this PC (it writes the real registry). |
|
||||
| G-F5 | The `phone` target has not run | Narrowed 2026-11-21 (`android-release-apk.md`): `reset: uninstall`, `maxMinutes: 20`, and the e2e pipeline's `phone` step (`device: Wave 10`) puts it in the hub's queue. **Still open:** the Wave 10 is not paired in Fabrica (`fabrica devices list`: *connected (not paired in Fabrica)*), so the step cannot get its phone; pairing is the Fabrica session's. |
|
||||
| G-F7 | No key signs the APK | Open (`android-release-apk.md` A6): `rosea-android` is not in Custos's `ANDROID_APPS`, so the release's `apk` step stops at `no_key`. Custos's change (or Mark's *Create Android key*), then the release. The unsigned release APK builds and verifies. |
|
||||
| G-F6 | PWA updates have no host | Open with G0.13: the service worker and *Refresh* are built; nothing serves the PWA. |
|
||||
|
||||
## Phase 6 — Release
|
||||
|
||||
| Id | Gap | Status / evidence |
|
||||
|:--|:--|:--|
|
||||
| G6.1 | A legal check of the look: a child on a small round planet with a rose is the book's best-known image, and its estate holds trademarks | Open, **before any public release**. The author accepted the risk on 2026-11-17 (CLAUDE.md §8); the guards are STYLE.md S2, S6, §3b and review points 10–11. |
|
||||
|
||||
## Design questions — answered
|
||||
|
||||
Raised by GAMEPLAY.md and ROADMAP.md, answered by the author 2026-11-01. Details in
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# The Android APK in a release, tested on the Wave 10 through Fabrica's phone queue
|
||||
|
||||
Branch `feature/android-release-apk`, 2026-11-21. Follows [`fabrica-release.md`](fabrica-release.md) (F1–F11), which
|
||||
made Rosea a Fabrica app with no release yet.
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
Mark asked for every Domi app to ship its APK, tested at least once on a real phone first: *install, open, the first
|
||||
screen shows, one real action*. For Rosea the real action is to water her, and the check that matters is that she is
|
||||
still watered after the app is closed and opened again. A rose that forgets her care on a phone is the cruellest bug
|
||||
this product could have (CLAUDE.md §8).
|
||||
|
||||
A player gets the APK from Rosea's Aula page once a release is published. Nothing about the game changes. This
|
||||
branch changes how the APK is built, tested and released.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph repo["Rosea (this repository)"]
|
||||
game["apps/rosea → dist-tauri/"] --> shell["apps/rosea-tauri: tauri android build"]
|
||||
shell --> debug["debug APK (WebView drivable)"]
|
||||
shell --> unsigned["release APK, unsigned<br/>android.ts verify: no permission, no backup"]
|
||||
spec["e2e/android/garden.android.ts"]
|
||||
end
|
||||
subgraph fabrica["Fabrica (Mark's PC and the hub)"]
|
||||
e2e["e2e pipeline, runner windows-e2e<br/>step phone: device Wave 10"] --> lease["hub: phone queue lease"]
|
||||
lease --> run["fabrica tests run --target phone<br/>reset uninstall, install, launch"]
|
||||
rel["release pipeline: android → approve → apk"]
|
||||
end
|
||||
debug --> e2e
|
||||
spec --> run
|
||||
run --> phone(("Wave 10"))
|
||||
unsigned --> rel
|
||||
rel --> custos["Custos: custos-sign apk, key rosea-android"]
|
||||
custos --> mini["minisign (domi-release), SHA256SUMS"]
|
||||
```
|
||||
|
||||
- **A1. Two APKs, one game.** The phone test drives the **debug** APK. Only a debug build's WebView can be reached
|
||||
over DevTools (Fabrica docs/22 part 5), and Tauri's `devtools` feature would make the *release* WebView drivable for
|
||||
anyone with a cable, so the shipped APK never gets it. The two APKs carry the same `dist-tauri/` game, the same
|
||||
manifest patch (no `INTERNET`, no backup) and the same `MainActivity`. They differ in the Rust profile and the
|
||||
signing key. What the phone test cannot prove about the release APK is listed in §5.
|
||||
- **A2. The phone only through the queue.** The `phone` step of `.fabrica/artifex/e2e.yaml` says `device: Wave 10`.
|
||||
The hub queues the run for the phone, the runner sets `ANDROID_SERIAL` and `FABRICA_PHONE_LEASED`, and the nested
|
||||
`fabrica tests run --target phone` uses that phone without a lease of its own (docs/35 part 4). The spec skips
|
||||
unless Fabrica's environment is there, so it never reaches for a phone by itself.
|
||||
- **A3. `reset: uninstall`, not the default `clear`.** The target installs the debug APK. A release build of Rosea
|
||||
on the phone has another key and would refuse the install. `clear` would wipe its data and then fail anyway;
|
||||
`uninstall` wipes the same data and installs fresh. The Wave 10 is the dedicated test phone (docs/35 part 5), and
|
||||
no player's rose lives on it.
|
||||
- **A4. `maxMinutes: 20`.** One test of about two minutes, plus install and launch. Twenty minutes frees the phone
|
||||
for the next app if the run hangs, well under the 60-minute default.
|
||||
- **A5. Caches off C:.** Both pipelines name `GRADLE_USER_HOME` on `D:\build\rosea\gradle` and the NDK
|
||||
(`NDK_HOME`, which the Tauri CLI needs and this PC does not set). A local build also puts Cargo's target folder,
|
||||
`TEMP` and `ANDROID_USER_HOME` under `D:\build\rosea`. The pipelines keep Cargo's target in the checkout, because
|
||||
the installer's artifact glob is there.
|
||||
- **A6. Signing: `rosea-android` does not exist, and Custos will not make it.** Custos creates an Android key on an
|
||||
app's first release only for the apps in its `ANDROID_APPS` table (`apps/desktop/src-tauri/src/signing.rs`). In
|
||||
0.24.0 that table holds Postea, Culina and Liber, and Mark's PC runs 0.22.0, which holds Postea only. Rosea's `apk`
|
||||
step would stop at `no_key`, as Culina's and Liber's did on 2026-11-20. Two fixes exist, and both belong to
|
||||
Custos and Mark, not to this repository: a Custos change that adds `rosea-android` (`CN=Rosea Domi`, only
|
||||
`mnovak/Rosea`, pipeline `release`) and its install on this PC, or Mark's *Create Android key* by hand.
|
||||
`fabrica-release.md` said "Custos makes the key on the first release". It was wrong, and is corrected here.
|
||||
- **A7. The certificate is forever.** Once a player installs an APK signed with `rosea-android`, every update must
|
||||
carry the same certificate (CLAUDE.md §8). The CN names the product, *Rosea Domi*, and the name is still provisional.
|
||||
The key outlives a rename: a renamed app keeps the old CN, and no player sees it.
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Where | Answer |
|
||||
| :-- | :-- | :-- |
|
||||
| A player's rose lost on the test phone | `reset: uninstall` | The Wave 10 is Fabrica's dedicated test phone (docs/35 part 5). The memory rule stands: Fabrica stops the app after the run, and the spec force-stops it in `finally` as well. |
|
||||
| The release APK phones home | the APK | `android.ts verify` reads the built APK with `aapt2` and refuses any permission or backup flag. It runs in the release pipeline's `android` step and in every local build. |
|
||||
| Someone made reachable | none | No network feature. The APK asks for no `INTERNET` permission, so the kernel refuses every socket. |
|
||||
| A tester's place on the phone | the spec | The spec chooses *Not now*, so no town is ever chosen on the phone. |
|
||||
| A release signed with a stand-in key | signing | The `apk` step names `rosea-android` only, through Custos, and refuses `CUSTOS_PIPE` (sign-apk.ts). There is no fallback to a debug or local keystore. A missing key stops the release. |
|
||||
| An untested APK published | the release | The phone test is a pipeline of its own: phones are leased per run, and the release must not hold the phone for two hours. Until the e2e pipeline's `phone` step has passed on a commit, that commit is not tagged (process, §5). |
|
||||
|
||||
## 4. Gap analysis and the designed solution
|
||||
|
||||
| Gap | Solution here | Left open |
|
||||
| :-- | :-- | :-- |
|
||||
| The phone target did not say `reset` or `maxMinutes` (the old CLI refused them) | The installed CLI reads both now: a planted `reset: wipe-everything` is refused by `fabrica artifex check`. Written: `reset: uninstall`, `maxMinutes: 20`. | none |
|
||||
| No pipeline put the phone run in the queue | `e2e.yaml` gains `apk` (`pnpm tauri:android`) and `phone` (`device: Wave 10`). | It has not run: the Wave 10 is not paired in Fabrica (below). |
|
||||
| The release pipeline's Android step lacked the NDK and put Gradle on C: | `NDK_HOME` and `GRADLE_USER_HOME` in `release.yaml`'s env. | none |
|
||||
| The release APK was never built | Built here with caches on D:, then checked by `android.ts verify` (§5). | Not signed (A6). |
|
||||
| `rosea-android` | Named as Custos's change (A6). | **Custos's and Mark's.** |
|
||||
| The Wave 10 is not paired in Fabrica | `fabrica devices list` shows `WAVE 10C connected (not paired in Fabrica)`. `pass::resolve` then finds no phone named *Wave 10*, and the step fails before it runs. | **The Fabrica session's** (Pipelines → Workshop → Devices → Pair a phone). |
|
||||
| Publication | G6.1: the repository is public, so a release is public, and a legal check of the look comes first. | **Mark's** (`fabrica-release.md` F1). |
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | How | Status |
|
||||
| :-- | :-- | :-- | :-- |
|
||||
| The release APK builds with every cache off C: | build | `pnpm tauri:android-release` | done 2026-11-21: 27 min from cold (Gradle 9.6.1 downloaded to D:), 5.60 MiB, arm64-v8a, versionCode 1000, sha256 4d52e9eca4cd2e56… (unsigned) |
|
||||
| The release APK asks for no permission and allows no backup | build check | `android.ts verify <unsigned apk>` (aapt2) | done: verified; `aapt2 dump badging` shows no `debuggable` and only androidx's own `DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` (the app's own signature permission, not a capability) |
|
||||
| `reset` and `maxMinutes` are read, and a wrong `reset` is refused | config | `fabrica artifex check` with a planted value | done: refused with `targets[1].reset: clear, uninstall or keep` |
|
||||
| The pipelines are valid | config | `fabrica artifex check` | done: 0 problems |
|
||||
| Install, open, first screen, water, close, reopen, still watered | e2e, real phone | the e2e pipeline's `phone` step | **not run**: the phone is not paired in Fabrica |
|
||||
| The spec never reaches for a phone outside the queue | e2e | `test.skip` without `FABRICA_TESTS_PACKAGE` and `ANDROID_SERIAL` | by construction |
|
||||
| The signed APK verifies with `rosea-android`'s certificate | release | the `apk` step (custos-sign verifies with apksig) | **not run**: no key |
|
||||
| What the debug test cannot prove about the release APK | manual | install the signed release APK on the Wave 10 once, water, close, reopen | after the key exists |
|
||||
@@ -0,0 +1,53 @@
|
||||
# The in-game sunset — move the chair, watch it again
|
||||
|
||||
Status: built on `feature/chair-sunset`. ROADMAP Phase 1: *the in-game sunset — move the chair, watch
|
||||
it again — as comfort and rehearsal; it tells the player when the real one is tonight.* CLAUDE.md §1,
|
||||
§7 (*silence is a feature: sunset … has moments with no buttons at all*). Review:
|
||||
[`feature-chair-sunset.md`](../reviews/feature-chair-sunset.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
Under tonight's sunset line there is **Move the chair**. The garden turns into a quiet scene: the chair
|
||||
on the hillside, the sky going from day to amber to coral to dusk, the sun sinking behind the western
|
||||
horizon. **Half a minute, and nothing to press.** Then one line says when the real one is tonight, and
|
||||
two quiet choices: *Watch it again*, *Back to the rose*.
|
||||
|
||||
It is a rehearsal, never a replacement: it counts for nothing, logs nothing, and its last words point
|
||||
at the real sky.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
shell["Shell.svelte<br/>Move the chair"] --> scene["ChairSunset.svelte<br/>dialog: sky + sun in CSS,<br/>garden-sunset and chair stand-ins"]
|
||||
scene -->|"after 30 s"| line["SunsetLine<br/>tonight's real sunset"]
|
||||
line --> engine["engine nextInvitation"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| C1 | The sky and the sun are **drawn in code** (CSS gradients and one disc) behind the garden layer, which is transparent above its horizon. | STYLE.md S5: the sky is never painted, so the same layer serves the real-time sky later. |
|
||||
| C2 | **No visible button for 30 s.** Escape, or a tap anywhere, comes back early; a screen-reader-only line says so. | Silence (CLAUDE.md §7) without a trap: a keyboard or screen-reader user is never stuck. |
|
||||
| C3 | It is a modal dialog; focus goes into it and returns to *Move the chair*. | Accessibility is not a phase. |
|
||||
| C4 | **Nothing is logged.** No event kind, no count. | Rehearsal, not achievement; the real sunset's event (`sunset`, CLAUDE.md §6.2) belongs to the real one. |
|
||||
| C5 | With reduced motion, the scene shows dusk at once, still, for the same half minute. | Global `prefers-reduced-motion` rule in `tokens.css`. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Dependence**: the screen sunset replaces the real one. | Its last line is the real sunset's time; nothing rewards watching it. |
|
||||
| **A trap**: a full-screen scene with no buttons. | C2, C3; tested by keyboard. |
|
||||
| **Motion** for people sensitive to it. | C5. |
|
||||
| Privacy, reachability | None: nothing is stored or sent. |
|
||||
|
||||
## 4. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| Move the chair opens a labelled dialog with no button in it; after 30 s, the real sunset's line, *Watch it again*, *Back to the rose* | unit | `ui/test/chair-sunset.test.ts` |
|
||||
| Escape and a tap come back early; focus returns to *Move the chair* | unit | same |
|
||||
| Watch it again starts it over | unit | same |
|
||||
| With no town and no guess, the line asks for a town | unit | same |
|
||||
| Built app: watch it with the clock driven; axe during and after | e2e | `e2e/shell.spec.ts` |
|
||||
| Offline: watch an in-game sunset with the server gone (CLAUDE.md §3) | offline | `e2e/offline.spec.ts` |
|
||||
@@ -0,0 +1,97 @@
|
||||
# The day's sentence — the rose's folded petal
|
||||
|
||||
Status: built on `feature/day-sentence`. ROADMAP Phase 1: *the day's sentence comes from the rose: she
|
||||
waits with a folded petal; sunset is the best moment to open it, but it is never lost and no streak
|
||||
exists.* GAMEPLAY.md §1: *coming back on nearby days gives a little more (e.g. an earlier sentence
|
||||
remembered). A gap is never punished.* CLAUDE.md §1, §5.5 (*an unopened sentence is never lost*),
|
||||
§6.1, §6.2. Review: [`feature-day-sentence.md`](../reviews/feature-day-sentence.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
When the rose needs nothing, she says *I am keeping a folded petal for you.* A folded petal lies by
|
||||
her, and one button: **Open her petal**. It opens into one sentence of hope, with where it comes from in
|
||||
small print.
|
||||
|
||||
- **One a day.** Once opened, it stays open for the rest of the local day (*Today's petal*); a new
|
||||
one is folded tomorrow.
|
||||
- **Never lost.** A petal not opened today is the same petal tomorrow, and next week. There is no pile
|
||||
of missed petals and nothing says how many days passed.
|
||||
- **Sunset is the best moment.** Around the real sunset (the same moment the sunset line names; in
|
||||
polar day the lowest light, in polar night the brightest twilight) she says *The sun is low now.
|
||||
Would you open my petal?* Opened then, she adds: *Go and look at the sky. I will be here.* It can
|
||||
be opened at any other time too, with no difference in what it gives.
|
||||
- **Nearby days give a little more.** If the last petal was opened at most three days ago, she also
|
||||
remembers one opened before: *Do you remember this one?* After a longer gap she simply gives the
|
||||
day's petal. The gap is not mentioned.
|
||||
- **No library, no petal.** Until the author has verified sentences, she holds no petal and says
|
||||
nothing about one. Nothing on screen points at the absence.
|
||||
|
||||
Nothing is counted: there is no number of petals, no list of all of them, no record of when.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
lib["content/library/*.json<br/>(verified by the author)"] -->|"build: validate:library,<br/>then virtual:rosea-library"| app["apps/rosea<br/>App.svelte"]
|
||||
cand["content/candidates/*.json<br/>(proposed, unverified)"] -->|"pnpm library:verify id… --by Name<br/>(the author only)"| lib
|
||||
app --> ui["packages/ui<br/>Rose.svelte + Petal.svelte"]
|
||||
ui --> engine["packages/engine<br/>petal/petal.ts: petalAt, goodMoment"]
|
||||
engine --> schema["packages/schema<br/>sentence-opened.schema.json"]
|
||||
ui -->|"appendOpened"| storage["packages/storage<br/>events store, rose file v2"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| P1 | **The petal is the next sentence in one fixed order**, and the order moves only when a petal is opened. The order: sunset sentences never opened, by `verifiedAt` then a hash of the id; once all are opened, the one opened longest ago. | *Never lost* (CLAUDE.md §5.5) follows from the order: nothing advances by itself. Verifying new sentences adds them after the ones already verified, so it never swaps the petal she holds. With ≥ 365 sentences, none repeats within a year of daily opening. The hash mixes traditions, so the first days are not all one book. |
|
||||
| P2 | **One opening per local day.** The first `sentence-opened` event of a local day is that day's petal; a second tab's later one changes nothing. | No farming, no reason to stay. `localDay` is the one recorded in the event (CLAUDE.md §7). |
|
||||
| P3 | **Remembering** needs the previous opening ≤ `PETAL.nearDays` (3) local days before today and an earlier sentence to recall; which one is a pure, seeded choice per day. | GAMEPLAY §1. A gap is never shown: the extra line is simply absent. Tuning is the author's, in `PETAL`. |
|
||||
| P4 | **The good moment** is `PETAL.beforeMinutes` (60) before to `PETAL.afterMinutes` (60) after the sun module's `invitation`. It changes only her words. | One sun module (CLAUDE.md §7); the best moment is offered, not rewarded (*Gentle*). |
|
||||
| P5 | **The library is bundled at build time** through a Vite virtual module that reads `content/library/*.json`; the app build first runs `validate:library` and fails if it fails. The app never validates in the browser. | Sidesteps G0.12 (Ajv needs `new Function`; the CSP forbids it) without a second validator: what ships is exactly what passed the gate. `ROSEA_LIBRARY_DIR` swaps the folder for the e2e build. |
|
||||
| P6 | **A new event kind, `sentence-opened`** (`ts`, `localDay`, `from`, `messageId`, `clientVersion`), appended to the same `events` store. | CLAUDE.md §6.2: adding a kind is the only sanctioned way to make something derivable. |
|
||||
| P7 | **The rose file becomes version 2** with an `opened` list beside `events`; version 1 files are still read. | Her petals move with her to a new device, so the order continues instead of starting over. |
|
||||
| P8 | **Candidates live in `content/candidates/`**, in the library's shape without `publicDomain`, `verifiedBy`, `verifiedAt`, and with a `check` (where to read it). `validate:library` holds them to every rule but verification, so the author is never asked to verify a line that would fail. `pnpm library:verify <id…> --by <name>` moves them into the library with today's date. **Agents never run it.** | D4 of phase0-workspace: `verifiedBy` is a person. The command only saves the author hand-editing JSON. |
|
||||
| P9 | The source is shown under the sentence (work, author, translation). | Honesty about where words come from; it also tells a believer and a non-believer what kind of line it is. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Guilt**: a pile of unopened petals after an absence. | P1: there is only ever one petal. Nothing names the days between. |
|
||||
| **Streak creep**: remembering on nearby days is a streak in disguise. | P3 rewards nothing visible and counts nothing; after a gap the day's petal is exactly as full. It is a small gift, not a bar to keep up. Reviewed in `soul.md` terms in the review. |
|
||||
| **Dependence**: a reason to stay in the app. | One petal a day; at the good moment her words send the player outside. |
|
||||
| **Comfort becomes wallpaper** (CLAUDE.md §8). | No repeat until every sentence has been opened once (P1). |
|
||||
| **A hollow or harmful sentence**: a promise, a medical word, the unnamed state. | The validator's rules (§5.6), held for candidates too (P8); the author verifies every line. |
|
||||
| **Copyright**: a modern translation slips in. | The translation list in `validator.ts`; additions need a dated reason. Candidates carry `check.publicDomain`. |
|
||||
| **Privacy**: which sentences were opened. | Stays on the device; the rose file holds it, never the town. Nothing is sent. |
|
||||
| Reachability | None: nothing reaches another person. |
|
||||
| **Offline** | The library is precached in the bundle; opening appends to IndexedDB. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
- **G1.5** (the day's sentence) closes with this, except that the library is still empty: the petal
|
||||
appears in the shipped app only once the author verifies sentences (G0.18).
|
||||
- **G0.12** narrows: the app does not need to validate content in the browser while the library is
|
||||
bundled. It reopens if the library is ever fetched at runtime.
|
||||
- **Not done:** Czech text (`text.cs`) is not shown yet (Czech copy arrives as a whole, G1.3); a
|
||||
collection of past petals (an album) is not designed.
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| No sentences: nothing; first visit: the first in order is folded | unit | `engine/test/petal.test.ts` |
|
||||
| Opening today: open for the rest of the day; tomorrow: the next one folded | unit | same |
|
||||
| **Property:** with no opening, the folded petal is the same on every day | property | same |
|
||||
| **Property:** adding sentences verified later never changes the folded petal | property | same |
|
||||
| **Property:** at most one opening per local day counts; a second changes nothing | property | same |
|
||||
| **Property:** no repeat until every sentence was opened; then the least recent | property | same |
|
||||
| Remembering: at 1–3 days a recalled earlier one; at 4+ none; never today's own | unit | same |
|
||||
| Good moment: inside ±60 min of the invitation; polar day and polar night | unit | same |
|
||||
| Events from other roses' keys are ignored; past keys count | unit | same |
|
||||
| The schema accepts the event and rejects free text in `messageId` | unit | `schema/test` |
|
||||
| Storage: append and load opened; `loadCare` ignores them quietly; rose file v2 out, v1 and v2 in, additive | unit | `storage/test` |
|
||||
| Candidates: held to every rule; `library:verify` moves, stamps, refuses an unknown id or a failing line | unit | `content/test` |
|
||||
| UI: says the petal line only when she needs nothing; Open; source shown; today's petal again; remembered line; sky line at the good moment; empty library shows nothing | unit | `ui/test/petal.test.ts` |
|
||||
| Built app with a fixture library: open the petal, reload, still open; axe | e2e | `e2e/petal.spec.ts` |
|
||||
| Built app with the real (empty) library: no petal | e2e | same |
|
||||
| Offline: open the petal with the server gone | offline | — (the shipped library is empty; covered by e2e reload. Added when the first sentences are verified.) |
|
||||
@@ -0,0 +1,196 @@
|
||||
# Released through Fabrica: the release kit, the Aula page, updates, `domi-rosea://`, the showcase, the test targets
|
||||
|
||||
*Platform track.* Mark asked on 2026-11-19 that every Domi app be released and updated through Fabrica
|
||||
(Fabrica `docs/36_app_onboarding.md`, the checklist this doc follows). This repository's CLAUDE.md wins
|
||||
where the two disagree, and this doc says where they do.
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
Today a Rosea app reaches nobody: the Windows installer and the Android APK are build output on one
|
||||
machine (G-T7, G0.22), and nothing tells an installed copy that a newer garden exists. After this
|
||||
feature:
|
||||
|
||||
- **One release, built the same way every time.** A `vX.Y.Z` tag makes Fabrica's Windows runner run
|
||||
every gate of §5.5 on a clean checkout, build the Windows installer and the Android APK, take the
|
||||
pictures, and stop at Mark's Custos card. Only then is anything signed or published.
|
||||
- **A page that shows her honestly.** The release carries what Aula needs for Rosea's page: a few
|
||||
sentences, pictures of the built game on invented demo data (a rose tended for two weeks in an
|
||||
invented garden), and the release notes. Nothing of Mark's own rose is ever in a picture.
|
||||
- **Her next version arrives without a network feature in the game.** The apps still make no network
|
||||
call of their own (§2, §8). The installed copy on Mark's PC moves to each release through Fabrica's
|
||||
*Update all*; a player installs the next installer or APK over the old one, and her rose stays.
|
||||
- **Other Domi apps can open the garden.** `domi-rosea://open` opens Rosea on Windows (Canalis
|
||||
Part A). Nothing can reach into her: no other app can write into her care, read it, or send words.
|
||||
|
||||
**What this is not.** Not a public launch. Rosea's repository on Gitea is public, so a published
|
||||
release and an Aula page are public too, and CLAUDE.md §8 and G6.1 say a legal check of the look
|
||||
comes before any public release. This feature builds the release and the page; **publishing them is
|
||||
Mark's decision** (F1).
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
tag["tag vX.Y.Z<br/>(Fabrica Deploy)"] --> hub["Fabrica hub"]
|
||||
hub --> runner["Windows runner<br/>(Mark's PC)"]
|
||||
subgraph repo["this repository at the tag"]
|
||||
gates["pnpm lint · typecheck · test<br/>validate:library · lint:copy"]
|
||||
build["turbo build: schema → engine/content/ui → @rosea/app"]
|
||||
e2e["e2e + offline<br/>(built app, /Rosea/)"]
|
||||
shots["pnpm aula:shots<br/>e2e/aula.spec.ts → e2e/aula/*.png"]
|
||||
desktop["@rosea/tauri build:desktop<br/>NSIS installer + domi-rosea hook"]
|
||||
android["@rosea/tauri build:android-release<br/>unsigned release APK, aapt2 verify"]
|
||||
end
|
||||
runner --> gates --> build --> e2e --> shots
|
||||
build --> desktop
|
||||
build --> android
|
||||
shots --> kit["fabrica notes · aula shots · aula page"]
|
||||
desktop --> approve{"Custos card<br/>(Mark)"}
|
||||
android --> approve
|
||||
kit --> approve
|
||||
approve --> sign["Authenticode (domi-code-signing)<br/>APK (rosea-android, custos-sign)<br/>minisign (domi-release)"]
|
||||
sign --> publish["Gitea release + signed SHA256SUMS"]
|
||||
publish -. "only once Mark decides (F1)" .-> aula["Aula page /rosea/"]
|
||||
publish --> update["Fabrica Update all<br/>(Mark's PC)"]
|
||||
```
|
||||
|
||||
Packages and files:
|
||||
|
||||
| Piece | Where | Reads |
|
||||
| :-- | :-- | :-- |
|
||||
| The Fabrica app | `.fabrica/app.yaml` | — |
|
||||
| The release pipeline | `.fabrica/artifex/release.yaml` | the repo at the tag |
|
||||
| The e2e pipeline | `.fabrica/artifex/e2e.yaml` (`runner: windows-e2e`) | `.fabrica/tests.yaml` |
|
||||
| The test targets | `.fabrica/tests.yaml`, `e2e/playwright.fabrica.config.ts`, `e2e/android/` | the built bundle; the debug APK |
|
||||
| The pictures | `e2e/aula.spec.ts`, `e2e/playwright.aula.config.ts`, `.fabrica/aula.yaml` | the built bundle (PWA, `/Rosea/`) |
|
||||
| The page's words | `AULA.md`, `.fabrica/aula/brief.md`, `.fabrica/notes/<version>.md` | — (checked by `lint:copy`) |
|
||||
| The version check | `scripts/check-version.mjs` | the four version files |
|
||||
| The scheme (Part A) | `apps/rosea-tauri/src-tauri/windows/hooks.nsh`, `tauri.windows.conf.json` | the installer only |
|
||||
| The release APK | `apps/rosea-tauri/package.json` `build:android-release`, `scripts/android.ts` | the generated project |
|
||||
|
||||
The dependency direction of §2 is unchanged: no package gains an import, the game gains no code, the
|
||||
shell gains no Rust, no crate and no plugin. Fabrica reads this repository; this repository imports
|
||||
nothing of Fabrica's.
|
||||
|
||||
### Decisions
|
||||
|
||||
- **F1 — Built and signed, published only when Mark says.** The pipeline is complete: on the hub it
|
||||
builds, signs after the card and publishes. Because the repository is public, the first `publish`
|
||||
is a public release (G6.1). The tag is therefore made only after Mark answers. Until then the run is
|
||||
made locally (`fabrica run release --step page`, which signs as a dry run). The Aula entry for the
|
||||
server's `modules/aula.nix` is written down in the handover, not added.
|
||||
- **F2 — One part, `desktop`; no `server` part.** The release pipeline makes both apps (Windows and
|
||||
Android). The PWA's host is still the author's open question (G0.13: GitHub Pages under `/Rosea/`),
|
||||
and a server part would be a NixOS module on the server, which is not this repository's to change.
|
||||
When the PWA gets a host, a `server` part (or a Pages job) is added then.
|
||||
- **F3 — Updates, the app's own way, with no network in the game.**
|
||||
|
||||
| Version | How an installed copy reaches the next release | Why not the other way |
|
||||
| :-- | :-- | :-- |
|
||||
| Windows | Fabrica *Update all* on Mark's PC (Fabrica docs/16): the signed `SHA256SUMS` checked against `domi-release`, the installer run with `/S /UPDATE` in place. A player runs the next installer over the old one (`installMode: currentUser`, same identifier): the WebView2 data folder, and so her rose, stays. | `tauri-plugin-updater` is a network feature and a plugin in the shell; §2 allows neither until one is reviewed for what it sends. An update check would tell a server, daily, that this person plays. No `latest.json` is published, so nothing waits for an updater that does not exist. |
|
||||
| Android | The next APK, signed with the same `rosea-android` key and a higher `versionCode` (Tauri derives it from the version), installs over the old one and keeps her. A player gets it from the Aula page; the test phone gets each debug build from its `android` target. | An in-app check needs the `INTERNET` permission, which the APK must not ask for while Rosea has no network feature (§2; `android.ts verify` refuses any permission). |
|
||||
| PWA | The service worker: a new bundle is a new worker, offered with *A new version of the garden is ready.* and *Refresh* (calm-refresh.md, G0.10). | Nothing to add here until it has a host (F2). |
|
||||
| iOS | Not built (G-T1: needs a Mac). | — |
|
||||
|
||||
- **F4 — Signing through Custos only.** Authenticode with `domi-code-signing` for the installer;
|
||||
the APK with `rosea-android` through `custos-sign apk` (corrected 2026-11-21, `android-release-apk.md` A6:
|
||||
Custos does NOT make this key; it must be added to Custos's `ANDROID_APPS` or made by hand; a `run` step that names it in `keys:` so preflight checks it);
|
||||
`domi-release` signs each file's minisign signature and `SHA256SUMS`. No key, password or token is
|
||||
in the repository, a pipeline file or a log (G-T3). Each key's scope must name `mnovak/Rosea` exactly:
|
||||
Mark's step in Custos, which `fabrica preflight rosea` names when it is missing.
|
||||
- **F5 — `domi-rosea://open` from the installer (Canalis Part A).** The NSIS installer writes
|
||||
`HKCU\Software\Classes\domi-rosea` (`URL Protocol`, `shell\open\command` = `"<exe>" "%1"`) after
|
||||
install, and the uninstaller removes the key. **The installer, not every start**, because the shell is
|
||||
a window and nothing else (§2): registering at start needs Rust code (a registry crate) in it. An
|
||||
*Update all* or a reinstall runs the installer again in the install folder, so the command follows
|
||||
the exe. The game ignores the URL: an open of `domi-rosea://…` opens the garden. If Rosea is already
|
||||
open, a second window opens on the same data (no single-instance plugin, §2); two-tabs.md keeps both
|
||||
windows true to the log. The app id is `rosea`, the identifier `cz.mareknovak.domi.rosea` is unchanged.
|
||||
- **F6 — Canalis Part B is not done, and no capability is served.** Three reasons, each enough alone:
|
||||
(1) a capability lets another program act on the player's garden, and §1 says *contributions only
|
||||
add* and the care log holds only the player's own acts: a `rosea.care.*` capability would make a
|
||||
number on screen that the player did not earn; (2) Canalis keys come from Custos (`custos_local`),
|
||||
which a Rosea player does not have and must never need: Rosea's identity is its own anonymous
|
||||
keypair (§1); (3) it would add Fundamentum crates, a server thread and IPC to a shell that has none.
|
||||
So there is nothing to pin: Rosea has no Fundamentum crate, and `canalis-v1.1.0` does not apply.
|
||||
Reopen with a capability that only *reads nothing and adds nothing* to her, if one is ever found.
|
||||
- **F7 — The pictures come from the app's own Playwright run, on demo data the app itself made.**
|
||||
`pnpm aula:shots` serves the built PWA, fixes the clock (Europe/Prague, 08:00 on fourteen
|
||||
invented days in March 2026), answers the first open with the gardener's first look and the town
|
||||
*Prague* (a public place, chosen from the bundled list; never a real player's town), waters her once
|
||||
a day by the button as a player does, and photographs: the garden, the ring of care, her numbers,
|
||||
the in-game sunset, *Keep her safe*, the first open, and the same garden on a phone's screen.
|
||||
`.fabrica/aula.yaml` lists them as `file:` shots; `fabrica aula shots` checks and publishes them.
|
||||
The PWA is built under `/Rosea/`, so Fabrica's own `web:` server (which serves at `/`) is not used.
|
||||
**No iPhone pictures:** there is no iOS app yet (G-T1), and the PWA has no host to add to a Home
|
||||
Screen (G0.13); a picture of an iPhone would show a version nobody can install.
|
||||
- **F8 — Videos wait for Fabrica docs/37.** Until a `videos:` key is on Fabrica `main`, it fails
|
||||
`fabrica aula shots`; the Pensum ticket `kkpy69` (*Showcase videos of the main flows for the Aula page*) holds the work.
|
||||
- **F9 — Two test targets.** `.fabrica/tests.yaml`: `web` (the built PWA in a headless Chromium, the
|
||||
`web` project of `e2e/playwright.fabrica.config.ts`, the same specs as `pnpm test:e2e`) and `phone`
|
||||
(`kind: android`, `device: Wave 10`, the debug APK; the queue clears the app's data first, its default
|
||||
`reset: clear`). `reset: uninstall` would let a debug build replace a release build, but the installed
|
||||
Fabrica CLI (0.14.0) does not know `reset` or `maxMinutes` yet, so neither is written. The `android` project reaches the app's WebView with Playwright's
|
||||
`_android` and waters her by the button. It runs **only through Fabrica's phone queue**
|
||||
(`fabrica tests run --target phone`); `pnpm test:android` drives Chrome on a USB tablet and stays the
|
||||
developer's own check of the PWA. `.fabrica/artifex/e2e.yaml` runs the `web` target on the e2e runner.
|
||||
- **F10 — The version is in four files.** `package.json`, `apps/rosea/package.json` (which
|
||||
`tauri.conf.json` reads), `apps/rosea-tauri/package.json` and `apps/rosea-tauri/src-tauri/Cargo.toml`.
|
||||
`scripts/check-version.mjs <version>` prints each that differs in Fabrica's contract
|
||||
(`<file> says <old>, the tag says <new>`), so *Deploy* bumps exactly those. The first release is
|
||||
`v0.1.0`, the version every file has today.
|
||||
- **F11 — The page's words are copy.** `AULA.md`, `.fabrica/aula/brief.md` and `.fabrica/notes/*.md`
|
||||
are what a stranger reads about Rosea, like a store listing (§8). `lint:copy` scans them, so the
|
||||
page never says *lonely*, never names the book, and makes no claim to heal anything. The release
|
||||
notes `fabrica notes` writes from commit subjects are copy too: the release's `notes-copy` step runs
|
||||
`lint:copy` over `target/notes/release-notes.md` before the page is made.
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
Here risk means *a lonely person feeling worse*, *someone's location*, or *someone being reachable who
|
||||
did not ask to be* (§5.1).
|
||||
|
||||
| Risk | Where | Answer |
|
||||
| :-- | :-- | :-- |
|
||||
| The page names the person it is for: *for lonely people* | `AULA.md`, the brief, the notes | They speak of the rose, the fox and the time we give to people, never of the reader's state. `lint:copy` scans all three (F11); a test of the script proves they are in its list. |
|
||||
| The page promises comfort, or a cure | the same | No outcome is promised; the medical words are refused by `lint:copy`. |
|
||||
| The book's look on a public page | the pictures (gardener, round planet, rose) | G6.1: not published until Mark decides (F1). The pictures are the code stand-ins, said plainly in the brief. |
|
||||
| A real person's rose or town in a picture | `e2e/aula.spec.ts` | The demo rose is made by the test in a fresh browser profile; the town is a capital from the bundled list; the clock is invented. No file, no IndexedDB of a real profile is read. |
|
||||
| An update check that tells a server who plays | the apps | None exists (F3). The apps still ask for no `INTERNET` permission and the shell links no plugin; `android.ts verify` and the shell's tests keep it so. |
|
||||
| Auto Backup or a release build that carries debug flags | the release APK | `android.ts verify` runs on the release APK too (no permission, no backup); `custos-sign` refuses a debuggable APK. |
|
||||
| Another program reaches into her | `domi-rosea://` | The URL only opens the window; its text is not read (F5). No capability is served (F6). |
|
||||
| A web page opens Rosea | `domi-rosea://` | The browser asks first, as for any app link; the garden opens and does nothing else. |
|
||||
| A signing key in the repository | the pipelines | Keys are Custos ids only; `custos-sign` holds no key material either (F4). |
|
||||
| A release over a player's rose loses her | Windows, Android | Same identifier, same origin (`useHttpsScheme`, pinned by the shell's test), install over, never uninstall. On Android the same key; a debug and a release build cannot replace each other, so the test phone keeps debug builds only. |
|
||||
| The phone is used outside the queue | the `phone` target | Only `fabrica tests run --target phone` runs the `android` project. The `android` project skips, saying why, without `FABRICA_TESTS_PACKAGE` and `ANDROID_SERIAL` (set by Fabrica). |
|
||||
|
||||
## 4. Gap analysis and the designed solution
|
||||
|
||||
| Gap | Before | After |
|
||||
| :-- | :-- | :-- |
|
||||
| G-T7 / G0.22: no CI for the apps | built by hand on this machine | built by Fabrica's runner from the tag; still on Mark's PC, but from a clean checkout and the same steps every time |
|
||||
| G-T3: release signing keys | none | Custos only (F4) |
|
||||
| No release, no page | — | the pipeline, the kit and the words; publishing is F1 |
|
||||
| Installed copies never learn of a new version | — | F3 |
|
||||
| No `domi-rosea://` | — | F5, Windows only |
|
||||
| Nothing to show a stranger | — | F7, eight pictures |
|
||||
| G0.23 (source maps) | maps in the PWA build | unchanged and still open: the installer embeds `dist-tauri/`, maps included; the source is public on Gitea already, so nothing new is exposed |
|
||||
|
||||
Not closed here: G6.1 (Mark's legal check), G0.13 (the PWA's host), G-T1 (iOS), Canalis Part B (F6),
|
||||
the videos (F8).
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Unit | Integration | E2E / device | Manual |
|
||||
| :-- | :-- | :-- | :-- | :-- |
|
||||
| `check-version` passes with all four files equal, names each file that differs in the contract's words | `scripts/check-version.test.ts` | — | — | `node scripts/check-version.mjs 0.1.0` |
|
||||
| `lint:copy` reads `AULA.md`, the brief and the notes; a forbidden word in any of them fails | `scripts/lint-copy.test.ts` | `pnpm lint:copy` | — | — |
|
||||
| The pipelines and `tests.yaml` are valid | — | `fabrica artifex check` | — | `fabrica preflight rosea` |
|
||||
| The NSIS hook registers and removes exactly `HKCU\Software\Classes\domi-rosea` with `"%1"` | `apps/rosea-tauri/test` (the hook's text and the config that names it) | `pnpm tauri:build` makes the installer | — | not run: installing writes Mark's real registry |
|
||||
| The release APK has no permission and no backup | `android-privacy` tests (unchanged) | `build:android-release` ends with `android.ts verify` on it | — | — |
|
||||
| The pictures: eight PNGs within Aula's limits, on demo data, the same on every run | — | `pnpm aula:shots`, then `fabrica aula shots` | `e2e/aula.spec.ts` | open them and look |
|
||||
| The page | — | `fabrica aula brief`, `fabrica aula page` | — | read `aula-page.html` |
|
||||
| The `web` target | — | `fabrica tests run --target web` | the e2e specs | — |
|
||||
| The `phone` target: the WebView found, watered by the button, still watered after a restart | — | — | `e2e/android/garden.android.ts`, only through the phone queue | — |
|
||||
| Bad weather: no `FABRICA_TESTS_PACKAGE` | — | — | the `android` project skips, saying why, before touching adb | — |
|
||||
| A full release | — | `fabrica run release --step page` locally (signing dry-run) | — | the hub run, after F1 |
|
||||
@@ -0,0 +1,81 @@
|
||||
# Keep her safe, inside the apps (G-T4)
|
||||
|
||||
Status: built on `feature/keep-her-safe-apps`, 2026-11-17. Closes the release blocker found in
|
||||
[`tauri-platforms.md`](tauri-platforms.md) G-T4 and, if a round trip is seen, G-T5. Builds on
|
||||
[`keep-her-safe.md`](keep-her-safe.md). Review:
|
||||
[`feature-keep-her-safe-apps.md`](../reviews/feature-keep-her-safe-apps.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
*Keep her safe* is how a player makes sure their rose cannot be lost, and how she moves to another
|
||||
device. In the browser it tells the truth about the browser. In the Android and desktop apps it
|
||||
said the same words, and they were wrong there: *This browser may clear her if the garden is not
|
||||
opened for a long time* — there is no browser, and an app's own storage is not cleared for being
|
||||
left alone. It offered *Ask the browser to keep her*, which always answers no in an app. And on
|
||||
Android, *Save her to a file* did nothing at all (measured on the tablet). A player was told she
|
||||
might be lost, and the one remedy failed without a word.
|
||||
|
||||
Now, in the apps:
|
||||
|
||||
- She says where she lives, truly and calmly: *She lives in this app, on this device, until the app
|
||||
is removed. A saved file keeps her anywhere.* No button that cannot work.
|
||||
- *Save her to a file* opens Android's own *save* screen; the player chooses where (the phone, a
|
||||
memory card, a cloud folder they already use). When the file is written, the garden says
|
||||
*She is in that file now.* If they step back, nothing is said.
|
||||
- *Bring her back from a file* opens Android's own file picker, as before.
|
||||
|
||||
The PWA is unchanged.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
ks["packages/ui<br/>KeepSafe.svelte"] -->|"wiring.saveFile(name, text)<br/>wiring.keeping.where"| app["apps/rosea<br/>App.svelte"]
|
||||
app -->|"PWA / Windows: <a download>"| browser["browser / WebView2 download"]
|
||||
app -->|"Android: window.roseaFile.save(name, text)"| bridge["apps/rosea-tauri/android/java<br/>MainActivity.kt (copied into gen/)"]
|
||||
bridge -->|"ACTION_CREATE_DOCUMENT"| saf["Android's save screen<br/>(Storage Access Framework)"]
|
||||
saf -->|"uri"| bridge
|
||||
bridge -->|"write, then event 'rosea-file-saved' (true|false)"| app
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| A1 | **The words follow where she lives**: `RoseWiring.keeping.where` is `'browser'` or `'app'`, set in `App.svelte` from `__ROSEA_SHELL__`. In an app, `KeepSafe` shows `safe.app` and never asks `persist()`. | The words state facts about the platform; the platform decides which facts are true (lessons/design.md). The package chooses among its own words; the app only says where it is. |
|
||||
| A2 | **Android saves through a small Kotlin bridge**, not a Tauri plugin: `MainActivity` adds one JavaScript interface, `roseaFile.save(name, text)`, which opens `ACTION_CREATE_DOCUMENT` through Tauri's own `launchActivityForResult` and writes the text to the chosen place. | No new dependency, no download, no IPC and no capability: the shell still grants the page nothing through Tauri. The Storage Access Framework needs **no permission** on any Android version (the APK check still demands none). A plugin (dialog + fs) would bring IPC, a capability, a CSP change and two packages for one file. iOS will need its own answer (G-T1). |
|
||||
| A3 | **The bridge takes only what a rose file is**: a name like `rose-2026-11-17.json` and text up to 8 MB; anything else is refused before the picker opens. One save at a time. | The interface is reachable by any script in the page; the page is our own and has no network, but the bridge stays as narrow as the job. |
|
||||
| A4 | **The answer comes back as a window event** (`rosea-file-saved`, `true` or `false`), dispatched by `evaluateJavascript`; `saveFile` returns a promise of it. The garden says *She is in that file now.* only on `true`. | The player sees the system screen close; without a word they cannot know whether it worked. A cancelled save is the player's choice and is not commented on. |
|
||||
| A5 | `MainActivity.kt` lives in `apps/rosea-tauri/android/java/` and is copied over the generated one by `scripts/android.ts apply`; `check` refuses an APK build without it. The bridge class carries `@Keep` so a minified release build cannot strip it. | `gen/` is never committed (D6 in tauri-platforms.md). |
|
||||
| A7 | **The page is kept between Android's system bars**, which show the garden's paper (light or dark with the system). Added after the tablet's screenshot showed the clock over the title and the navigation bar over *Bring her back from a file*. | Tauri's stock activity draws edge to edge, and the WebView does not reliably report the bars as `env(safe-area-inset-*)` (Culina measured the same). The colours are `--paper` from `tokens.css`, held equal by a test. |
|
||||
| A6 | Windows keeps `<a download>`: WebView2 saves to *Downloads* and shows its own download flyout (measured in the platform review). | It works; the browser's own feedback is the confirmation there, as in the PWA. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Fear**: words that say she may be lost. | Removed in the apps (A1). The new sentence says the one true condition (removing the app) and the remedy. |
|
||||
| **A broken promise**: a save that does nothing. | Fixed on Android (A2) and confirmed to the player (A4). |
|
||||
| **Location in the file.** | Unchanged: the file never holds the town (keep-her-safe.md K4). |
|
||||
| **Bytes leaving the device.** | Only where the player chooses in Android's save screen. If they choose a cloud folder, that app uploads it — their choice, made in the system's own screen. The game still has no `INTERNET`. |
|
||||
| **A script calling the bridge.** | Only the game's own page runs in the WebView (no network, `'self'` CSP). The bridge refuses any other name or a huge text, and it can only open a screen the player must confirm. |
|
||||
| **Reachability, guilt, counting.** | None: nothing new reaches anyone or counts anything. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
Closes G-T4 for Android and Windows, and G-T5 on Android: the round trip (save through Android's
|
||||
screen, bring her back from that file) passed on the tablet twice, 2026-11-17. Bringing her back on
|
||||
Windows was not driven. iOS stays G-T1: WKWebView will need its own save (a share sheet or a document picker).
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| In an app: the app sentence, no *Ask*, no install hint, `persisted()` and `persist()` never called | unit | `packages/ui/test/rose.test.ts` |
|
||||
| The app words never speak of a browser | unit | same |
|
||||
| In a browser: the browser sentences as before | unit | same (existing cases) and the e2e suite |
|
||||
| `saveFile` answering `true` → *She is in that file now.*; `false` → the word goes; a browser download → nothing said | unit | same |
|
||||
| The bridge's contract with the game: package = identifier, interface name `roseaFile`, event `rosea-file-saved` with `.detail === true`, the file-name rule accepts `rose-<day>.json` and refuses five wrong names, `@Keep` on the class and method, no permission asked | unit (reads both sources) | `apps/rosea-tauri/test/android-bridge.test.ts` |
|
||||
| The size limit (8 MB) and one-save-at-a-time | — | Kotlin only, not tested off the device |
|
||||
| `android.ts check` refuses a project with Tauri's own `MainActivity` | script | seen: exit 1, then 0 after `apply` (review) |
|
||||
| The APK still asks for no permission | artefact | `pnpm tauri:android` → aapt2 |
|
||||
| Windows: the app words; *Save her to a file* starts a download | device | `e2e/apps/check-garden.ts desktop` |
|
||||
| Android: the app words; save through Android's screen, *She is in that file now.*; bring her back from that file, *Everything in that file is already here.*; the file removed afterwards | device | `e2e/apps/check-garden.ts android` (uiautomator presses the system screens) |
|
||||
@@ -0,0 +1,121 @@
|
||||
# The planet garden — a gardener, gestures, and her own small world
|
||||
|
||||
Status: built on `feature/planet-garden`, merged to `main` 2026-11-17; built, not deployed. Decided by the author, Mark, on 2026-11-17, after
|
||||
seeing the garden as a page of buttons: *"It is a game: create a proper planet, a character who does
|
||||
the care, animations of how the character does it; tap the rose for actions; swipe in patterns;
|
||||
pull weeds by tapping them and swiping."* His answers the same day:
|
||||
|
||||
- **Her world:** a **round tiny planet** (reverses STYLE.md S2).
|
||||
- **The character:** a **human gardener, a boy or a girl, customised at the beginning** (reverses
|
||||
STYLE.md's *no people*).
|
||||
- **Gestures:** tap her to choose care; swipe weeds out; pour by tilting; patterns for the rest
|
||||
(sweep petals, drag the windbreak, stroke her petals). **Buttons stay** for keyboard and screen
|
||||
readers (CLAUDE.md §7: accessibility is not a phase).
|
||||
|
||||
Review: `feature-planet-garden.md`.
|
||||
|
||||
## 0. The risk the author accepted, and the guards
|
||||
|
||||
A child tending a rose on a small round planet is the most recognisable image of the book whose
|
||||
text, names and drawings CLAUDE.md §5.6 rule 3 forbids, and whose estate holds trademarks
|
||||
(GAMEPLAY.md §7). The author was told this in the choice itself and chose it. Recorded here, in
|
||||
STYLE.md and CLAUDE.md, with these guards, which become review points and avoid lines:
|
||||
|
||||
| Guard | Why |
|
||||
|:--|:--|
|
||||
| **The gardener is the player's own**: chosen and customised (boy or girl, skin tone, hair style and colour, clothes colour, a hat or not) | No two players' gardeners need look alike, and none is a fixed character from anywhere. |
|
||||
| **Never**: a scarf, a long coat or cape, a green suit with epaulettes, a crown, a sword; no outfit option recreates one | The book's boy is drawn with these. |
|
||||
| **The planet is a cultivated garden world**: meadow, the dry-stone wall, the garden bed, the chair, the wild berry bush; **no volcanoes, no baobab-like trees, no single lamp post** | The book's planet is bare with volcanoes and baobabs. |
|
||||
| **The look is our gouache** (STYLE.md §1), never pen-and-wash | The book's drawings are pen and watercolour. |
|
||||
| **No glass dome over her, ever; the windbreak is woven willow** | Unchanged (§4). |
|
||||
| **A legal check of the look before any public release** (store listings, Pages made public) | New gap; the author's risk, made visible. |
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
**The first open.** Before the garden, one quiet question: *Who tends her?* The player chooses a
|
||||
boy or a girl, then skin tone, hair, clothes colour, a hat. A small preview of their gardener turns
|
||||
as they choose. *This is me* finishes it. It can be changed later, from the garden.
|
||||
|
||||
**The garden is a small round world.** Her planet fills the lower half of the screen, the real sky
|
||||
above it (code, as now). On its top: the garden bed with the rose, the wall behind, the chair, the
|
||||
watering can by the bed; the gardener stands beside her.
|
||||
|
||||
**Tap the rose** and the care she needs right now opens around her as a small ring of choices (only
|
||||
what she needs; *Touch her* is always there). Choose one and the gardener walks over and does it,
|
||||
with the player's own hand in the gesture:
|
||||
|
||||
| Care | The gesture | The gardener |
|
||||
|:--|:--|:--|
|
||||
| **Water** | **Press the can and tilt**: drag sideways from it; the further the tilt, the faster the pour. Let go when her leaves lift (the same *by feel* as now). | Holds the can, tilting it as the player tilts; water falls. |
|
||||
| **Weeds** | Weeds show in the bed. **Tap a weed, then swipe up** from it: it stretches, then pops out with its roots. | Bends, tugs, the weed comes free, the gardener bumps down on the grass and gets up. |
|
||||
| **Fallen petals** | **Sweep**: one swipe sideways across the petals gathers them. | Sweeps them into a little pile and pockets them. |
|
||||
| **Wind** | **Drag the windbreak** from the side of the bed into the wind, on her windward side. | Carries it and sets it in the ground. |
|
||||
| **Touch her** | **Stroke** slowly across her petals: a fond answer. Quick, rushed taps: *Gently. I have thorns.* (thorns.md) | Reaches out and touches a petal. |
|
||||
|
||||
Every act is the same event as today (rose.md, thorns.md): nothing about growth, drift, the petal or
|
||||
her numbers changes. The gestures are how the player's hand meets the same rules.
|
||||
|
||||
**Keyboard and screen readers.** The ring's choices are buttons; each one also works without its
|
||||
gesture: *Water* still pours while Space or Enter is held; *Pull the weeds* pulls them all, one by
|
||||
one, while the gardener does it; *Gather the petals*, *Shade her*, *Touch her* likewise. The scene
|
||||
says what happens in one polite line.
|
||||
|
||||
**Reduced motion.** The gardener does not walk or bend: the scene shows the result at once.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
app["apps/rosea<br/>App.svelte"] --> shell["packages/ui<br/>Shell: first-open choice, then the scene"]
|
||||
shell --> scene["packages/ui/scene<br/>Planet.svelte (SVG): planet, bed, rose, can,<br/>weeds, petals, windbreak, gardener"]
|
||||
scene --> gestures["packages/ui/scene/gestures.ts<br/>pure: tilt, swipe up, sweep, drag, stroke"]
|
||||
scene --> engine["packages/engine<br/>rose (care, pour), touch (thorns),<br/>scene/ weedsToday, petalsToday (seeded counts)"]
|
||||
shell --> storage["packages/storage<br/>profile: gardener (shape-checked)"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| G1 | **One SVG scene** (`Planet.svelte`), every part its own group with a stand-in drawn in code until art is accepted; the sky stays code (S5). | One coordinate system for gestures, animation and layout; no canvas, so every part can carry an accessible name. |
|
||||
| G2 | **Gesture recognisers are pure functions** of pointer samples (`gestures.ts`): `tiltOf`, `isSwipeUp`, `isSweep`, `dropTarget`, `strokeOf`. Unit- and property-tested. | Input interpretation is not game logic, but it must be testable without a browser. The rules stay in the engine. |
|
||||
| G3 | **How many weeds and petals** a day shows is the engine's: `weedsToday(seed, day)` (2–4 when `weedsOn`), `petalsToday(seed, day)` (3–5 when `petalsOn`). One `weed` / `petals` care event when the **last** one is pulled or gathered. | A count on screen is the engine's (CLAUDE.md §6.2). Half-pulled weeds are not care yet: nothing is written until the job is done, and leaving half-way loses nothing earned. |
|
||||
| G4 | **Pour by tilt** maps tilt to the same pour rate the hold uses (`ROSE.fullPour` over `FULL_CAN_MS`), scaled 0–1.5× by tilt; the event's `amount` is unchanged in meaning. | Watering by feel (rose.md R1) stays one rule. |
|
||||
| G5 | **The gardener** is a separate component with poses (`stand`, `walk`, `pour`, `bend`, `pull`, `sweep`, `carry`, `reach`, `sit`) and a look from the player's choice. Poses are SVG stand-ins now. Painted art comes as **layered parts** (decided by the author 2026-11-17, STYLE.md §3b): body, clothes, apron and boots, hair, hat, each painted over one guide in register and stacked in the scene (G1.11). | Art and animation can arrive later without touching gestures or rules. |
|
||||
| G6 | **The gardener's look is stored in `profile`** as `{ presentation: 'boy' \| 'girl', skin, hair, hairColour, clothes, hat }`, each from a fixed list; shape-checked like every stored value. Never sent anywhere. | No free text; nothing identifying; local only (CLAUDE.md §4). |
|
||||
| G7 | **The ring** opens on a tap of the rose; it holds only her current needs plus *Touch her*; Escape or a tap outside closes it; focus moves into it and back. | Silence and calm: no permanent row of buttons over her. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Likeness to the book** (the author's accepted risk) | §0's guards, as avoid lines in every prompt, review points, and a legal check before release. |
|
||||
| **Soul: a child avatar for adult players** | The author chose boy or girl. Recorded as a question for his two-week play: does an adult player see themselves in a child gardener? A grown-up option is one list entry away. |
|
||||
| **Soul: fiddly gestures that make care feel like failing** | Generous thresholds; every gesture has a button; a missed gesture does nothing and says nothing; nothing is lost. |
|
||||
| **Motion** | `prefers-reduced-motion`: no walking or bending; results at once. |
|
||||
| **Accessibility** | Buttons for every act (G7); one polite line says what the gardener did; keyboard focus never trapped. |
|
||||
| Privacy | The gardener's look stays in `profile`, on the device; it is not in the rose file (keep-her-safe.md K4 is unchanged). |
|
||||
| Offline | Everything is code and bundled stand-ins. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
- New: **G1.9** the planet garden (this); **G6.x** a legal check of the look before any public release.
|
||||
- STYLE.md: S2 (where she lives) and *no people* are reversed by the author; §3b *the gardener* is
|
||||
new; §4 and §7 gain the guards; the manifest gains the planet, the gardener's sheet and pose
|
||||
sheets, and the customisation parts.
|
||||
- Not in this feature: the gardener on the journey's other planets (Phase 2), the fox on her planet.
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| `tiltOf`: sideways drag → 0–1 tilt; `isSwipeUp` needs upward distance and direction; `isSweep` needs sideways distance across the petals; `strokeOf` tells a slow stroke from a tap | unit + property | `ui/test/gestures.test.ts` |
|
||||
| `weedsToday` / `petalsToday`: 0 on a day without, 2–4 / 3–5 with, the same on every replay | unit + property | `engine/test/scene.test.ts` |
|
||||
| Gardener look: every option list is fixed; storage refuses anything else; it never enters the rose file | unit | `storage/test` |
|
||||
| First open asks *Who tends her?*; the choice is kept; *Change gardener* reopens it | unit | `ui/test/gardener.test.ts` |
|
||||
| Tap the rose: the ring shows only her needs plus *Touch her*; Escape closes it and focus returns | unit | `ui/test/planet.test.ts` |
|
||||
| Pulling every weed writes one `weed` event; leaving half-way writes none | unit | same |
|
||||
| A sweep across the petals writes one `petals` event; dragging the windbreak onto the windward side writes `shade` | unit | same |
|
||||
| Pour by tilt writes one `water` event whose amount follows the tilt and time | unit | same |
|
||||
| Buttons do every act without a gesture | unit | same |
|
||||
| Reduced motion: no animation classes | unit | same |
|
||||
| Built app: first-open choice, tap the rose, pull weeds by swiping, axe | e2e | `e2e/planet.spec.ts` |
|
||||
| The real tablet: the same by real touch | device | `scripts/android-smoke.ts` (made permanent here) |
|
||||
@@ -0,0 +1,61 @@
|
||||
# The sunrise in the garden
|
||||
|
||||
Status: built on `feature/sunrise`. ROADMAP Phase 1: *the sun: real local sunset **and sunrise**, on
|
||||
device; polar day/night handled.* CLAUDE.md §1, *points beyond the screen: the real sunset, the real
|
||||
sunrise*. The sun module (`sun.md`) has computed sunrise since Phase 1 began; the garden never showed
|
||||
it. Review: [`feature-sunrise.md`](../reviews/feature-sunrise.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
The line under the garden names the next real thing to look up for:
|
||||
|
||||
| When | The line |
|
||||
|:--|:--|
|
||||
| From midnight until sunrise | *The sun rises at 06:41 in Brno.* |
|
||||
| From sunrise until tonight's sunset | *Tonight the sun sets at 16:12 in Brno.* (as before) |
|
||||
| From sunset until midnight | *Tomorrow the sun rises at 06:43 in Brno.* |
|
||||
| Polar day, polar night | As before: the lowest light; the brightest twilight. |
|
||||
|
||||
Someone awake at three in the morning is told, quietly, when the light comes back; nothing invites
|
||||
them anywhere. The sunset stays the game's invitation (the petal's good moment, the in-game sunset):
|
||||
**the in-game sunset's closing words keep naming the real sunset**, because that is what they are for.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
shell["packages/ui<br/>Shell: SunsetLine (next)"] --> engine["packages/engine<br/>sun.ts: nextSunEvent"]
|
||||
chair["packages/ui<br/>ChairSunset: SunsetLine (sunset)"] --> engine2["packages/engine<br/>sun.ts: nextInvitation"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| R1 | **`nextSunEvent(now, place)`** in `engine/sun`: the next invitation's day; if that day's sunrise is still ahead, the sunrise; else the invitation. Pure, instants only (sun.md D3). | One module computes the sun (CLAUDE.md §7); the UI reads, never decides. |
|
||||
| R2 | Built on `nextInvitation`, so Reykjavík's after-midnight midsummer sunset (sun.md D2) still shows as tonight's sunset, not as a sunrise. | The only subtle case; tested. |
|
||||
| R3 | *Tomorrow* only when the sunrise belongs to a later local day than now, as the sunset line already does. | Same reading of the clock in both. |
|
||||
| R4 | `SunsetLine` gains `of: 'next' \| 'sunset'`; the garden asks for the next event, the in-game sunset for the sunset. | The chair scene tells the player when the real sunset is (chair-sunset.md). |
|
||||
| R5 | Polar day and night are unchanged: no sunrise exists to name. | sun.md D4. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Dependence / a nudge at night**: a line that pulls an awake player to the screen. | It is the same quiet line, changed only in what it names; no new notice, no invitation, nothing counted. |
|
||||
| **Guilt**: *you missed the sunrise*. | Nothing ever refers to a missed sunrise; after sunrise the line simply names the sunset. |
|
||||
| Privacy, reachability, offline | Unchanged: computed on the device from the chosen town. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
Closes the last Phase 1 roadmap item that the screen did not show. Sunrise *mechanics* (sunrise-only
|
||||
visitors, Phase 2; ROADMAP §6 open question) are not designed here.
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| Before sunrise: today's sunrise; after sunrise: tonight's sunset; after sunset: tomorrow's sunrise | unit | `engine/test/sun.test.ts` |
|
||||
| Reykjavík midsummer after midnight, before the late sunset: the sunset, not a sunrise | unit | same |
|
||||
| Polar day and night: unchanged | unit | same |
|
||||
| **Property:** the event is never in the past, and nothing (sunrise or sunset) comes between now and it | property | same |
|
||||
| The garden's line at 05:00, 12:00, 22:00; the in-game sunset's words still name the sunset at 22:00 | unit | `ui/test/sunset.test.ts`, `ui/test/chair-sunset.test.ts` |
|
||||
| Built app at 05:00 in Brno: the sunrise line | e2e | `e2e/shell.spec.ts` |
|
||||
@@ -0,0 +1,125 @@
|
||||
# Four versions, one garden — the Tauri 2 shell
|
||||
|
||||
Status: built on `feature/tauri-platforms`, 2026-11-17. Decided by the author the same day: *"I need
|
||||
also android apk version, desktop version, ios version and pwa version … based on the tauri2
|
||||
framework."* CLAUDE.md §2 (*Four versions, one garden*), §3, §4, §8; ROADMAP *The platform track*.
|
||||
Review: [`feature-tauri-platforms.md`](../reviews/feature-tauri-platforms.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
Until now Rosea Domi was a page you open from a link and may add to the home screen. Now the same
|
||||
garden also comes as an **app**: an Android app to install from a file (later from a store), a
|
||||
desktop app for Windows (macOS and Linux once built on those systems), and an iOS app once there is
|
||||
a Mac to build it on. The PWA stays as it is.
|
||||
|
||||
What the player meets is the same in all four: the same rose, the same words, the same sunset, the
|
||||
same *Keep her safe*. Nothing asks for an account, nothing goes online. Differences they may notice:
|
||||
|
||||
- The app opens straight into the garden, with its own icon, without a browser around it.
|
||||
- In the app there is never *A new version of the garden is ready*: a new version comes as a new app.
|
||||
- A rose in the PWA and a rose in the app on the same phone are **two roses**. To carry one across,
|
||||
*Keep her safe* saves her to a file and brings her back (on Android, see G-T4).
|
||||
|
||||
Why now and not in Phase 6: the shell needs no new feature, and an APK puts the Phase 1 spike on the
|
||||
author's phone without any hosting (G0.13 is still open).
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph game["one Svelte 5 codebase"]
|
||||
schema["packages/schema"] --- engine["packages/engine"]
|
||||
engine --- ui["packages/ui"]
|
||||
storage["packages/storage<br/>(IndexedDB)"] --- engine
|
||||
content["packages/content"] --- schema
|
||||
identity["packages/identity"] --- schema
|
||||
app["apps/rosea<br/>App.svelte wiring"]
|
||||
ui --> app
|
||||
storage --> app
|
||||
content --> app
|
||||
identity --> app
|
||||
end
|
||||
app -->|"vite build<br/>(default mode)"| dist["apps/rosea/dist/<br/>base /Rosea/, service worker,<br/>manifest, <meta> CSP"]
|
||||
app -->|"vite build --mode tauri"| distt["apps/rosea/dist-tauri/<br/>base /, no worker, no manifest,<br/>no <meta> CSP"]
|
||||
dist --> pwa["PWA<br/>GitHub Pages"]
|
||||
distt --> shell["apps/rosea-tauri/src-tauri<br/>tauri.conf.json (CSP, name, version)<br/>lib.rs: a window, nothing else"]
|
||||
shell --> win["Windows<br/>WebView2 · NSIS"]
|
||||
shell --> android["Android<br/>System WebView · APK<br/>(privacy patch on gen/)"]
|
||||
shell --> ios["iOS<br/>WKWebView<br/>(macOS + Xcode only)"]
|
||||
shell --> mac["macOS / Linux<br/>WKWebView / WebKitGTK"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| D1 | **`apps/rosea-tauri/` with `src-tauri/` inside**, a workspace package `@rosea/tauri` holding the Tauri CLI and the scripts. Not Tauri's default `apps/rosea/src-tauri/`. | The Tauri 2 CLI finds `src-tauri/tauri.conf.json` below the folder it runs in, so this is its expected layout one level down. The PWA's package stays free of Rust and of the CLI; the shell is deletable; its only input is a built folder, the same seam the e2e suites test. |
|
||||
| D2 | **Two builds of one game.** `vite build --mode tauri` (`build:shell`) → `apps/rosea/dist-tauri/`: base `/`; `vite-plugin-pwa` disabled (no worker, no manifest; `registerSW` becomes its no-op); no `<meta>` CSP; no source maps. One build-time constant, `__ROSEA_SHELL__`, read in `App.svelte` only. | Tauri serves the files at the root of its own origin; the files are already on the device, so a worker would only cache a second copy and could serve a stale game after an update; see D4 for the CSP. A separate folder means a shell build can never overwrite the PWA's and be deployed by mistake. Source maps would ship inside every installer. |
|
||||
| D3 | **Name, identifier, version.** `productName` and the window title `Rosea Domi` (a test holds them equal to `PRODUCT_NAME`); identifier **`cz.mareknovak.domi.rosea`**, like Culina's `cz.mareknovak.domi.culina`; `version` read from `apps/rosea/package.json` (Tauri accepts a path to a `package.json`). | The name may change in one commit (CLAUDE.md preamble). The identifier may not, once an app has reached a player: Android and iOS treat a new identifier as a different app, which would leave the rose behind in the old one. One version for the game and the apps; Android refuses a lower version as a downgrade. |
|
||||
| D4 | **The CSP comes from Tauri**, the same string as the PWA's `<meta>` (`apps/rosea/csp.ts`), held equal by the shell's test. | A page with both a `<meta>` policy and a header obeys both; Tauri adds hashes for what it injects only to its own header, so a `<meta>` copy would block that. One string in source, two delivery routes. |
|
||||
| D5 | **The Rust side opens a window and does nothing else.** No command, no plugin, no `@tauri-apps/api` in the game, and no `capabilities/` folder, so the page is granted no IPC. | The game already works fully in a webview. Every plugin is a new path for bytes to leave the device; each is reviewed before it is added (notifications, Phase 6). |
|
||||
| D6 | **Android privacy, applied to the generated project before every build** (`src/android-privacy.ts`, `scripts/android.ts`, run from `tauri.android.conf.json`'s `beforeBuildCommand`): no `INTERNET` permission; `allowBackup="false"` and rules excluding every domain from cloud backup and device transfer; WebView metrics opt-out and Safe Browsing off. **Verified on the built APK** with `aapt2`. | `gen/android` is regenerated by `tauri android init` and never committed. Amicitia measured on 2026-11-08 that Android System WebView sends an Autofill query to Google the moment a field takes focus, and that manifest switches do not stop it; only the missing permission does. Rosea has a field (*Where do you want your sunset?*). Auto Backup would copy the care log, the keys and the town to the player's cloud without their choosing. |
|
||||
| D7 | **Windows: WebView2's own traffic switched off** with `additionalBrowserArgs` — Amicitia's measured list (DNS-over-HTTPS upgrade, SmartScreen, experimentation, Autofill server, background networking, component updates, sync, pings, phishing detection, DNS prefetch). | Amicitia measured WebView2 reaching Google, Cloudflare and Microsoft within seconds of opening with no request of its own. The flags are undocumented feature names; a runtime update can break them, so the measurement is repeated per release (G-T6). |
|
||||
| D8 | **Icons are made at build time** from `apps/rosea/public/icon.svg` with `tauri icon` and never committed. | No raster images in git except art in `art/final/` (CLAUDE.md §5.2). The SVG is a placeholder until the art pipeline makes the real icon (G0.21). |
|
||||
| D9 | **In the apps, the game counts as installed**: it asks `navigator.storage.persist()` after the first care, as an installed PWA does, and never shows the iOS hint to add the page to the home screen. | WKWebView's user agent says *iPhone*; without this, the iOS app would tell the player to install the app they are in. |
|
||||
| D10 | **`useHttpsScheme: true`**: the game's origin is `https://tauri.localhost` on Windows and Android. | IndexedDB is per origin. Tauri warns that changing this value between releases moves the database and the app can no longer see the old one: it must be chosen before the first release and never changed. `https` is a secure context without relying on the `*.localhost` exception (WebCrypto makes the player's key). |
|
||||
| D11 | **Per-platform bundle targets** in `tauri.{windows,macos,linux}.conf.json`: NSIS (current user) on Windows; `.app` and `.dmg` on macOS; `.deb` and AppImage on Linux. | One config would try to make targets the machine cannot (MSI needs WiX, a download). |
|
||||
| D12 | **Commands**: `pnpm tauri:dev`, `tauri:build`, `tauri:android` (a debug APK for arm64, then `verify`), `tauri:ios` (refuses off macOS with the reason). No Android dev command yet. | An Android dev build needs `INTERNET` to reach the dev server and `adb reverse` to keep it on 127.0.0.1 (CLAUDE.md §5.7); not needed to test what exists. |
|
||||
|
||||
What did **not** change: every package; the PWA's base path, worker, manifest and `<meta>` policy,
|
||||
held by the existing e2e and offline suites. (The PWA's bundle is not byte-identical: `__ROSEA_SHELL__`
|
||||
is folded to `'web'` there.)
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
Risk here means *a lonely person feeling worse*, *someone's location*, or *someone being reachable who
|
||||
did not ask to be* (CLAUDE.md §5.1).
|
||||
|
||||
| Risk | Platform | Answer |
|
||||
|:--|:--|:--|
|
||||
| **The rose is lost** when the app is uninstalled, the phone is replaced, or the app's data is cleared. | all apps | Uninstalling an app deletes its data; Android Auto Backup is deliberately off (D6). *Keep her safe* is the way to move or keep her, and on Android saving a file is unproven (G-T4). Said plainly in this doc and in the review; the Letter may say it to the player later. |
|
||||
| **The rose is lost to an origin change** (`useHttpsScheme`, identifier, scheme). | Windows, Android | D3, D10: both fixed before the first release, with a test each. CLAUDE.md §8 records both as *forever*. |
|
||||
| **Two roses** for one player (PWA and app). | all | Expected and stated (§1). Nothing in the game counts or compares them. |
|
||||
| **The webview phones home** — bytes leave without the player. | Android | No `INTERNET`: the kernel refuses any socket (D6). Proof: `aapt2` on the APK, `dumpsys package` on the tablet. |
|
||||
| | Windows | `additionalBrowserArgs` (D7). Not measured for Rosea on this machine (G-T6). WebView2 itself is updated by Windows Update, outside the app. |
|
||||
| | iOS / macOS | WKWebView has no telemetry switch to set; not measured (G-T1). |
|
||||
| **Location leaves the device.** | all | The town stays in IndexedDB. No backup (Android), no network (Android), no plugin (all). |
|
||||
| **An SDK that counts.** | all | No analytics, crash-reporting or ads library: `Cargo.toml` has `tauri` alone and a test keeps it so; the game has no new dependency. Tauri itself sends nothing. |
|
||||
| **The Windows installer fetches WebView2** if it is missing (Tauri's default `downloadBootstrapper`). | Windows | A one-time download from Microsoft during installation, on a machine without WebView2 (Windows 10 and 11 ship it). Noted, not changed: an offline installer would embed ~150 MB. |
|
||||
| **Reachability.** | all | Nothing new: no free text, no network, no IPC. |
|
||||
| **A stale game after an update.** | apps | No service worker (D2): the game is the one inside the installed package. |
|
||||
| **Guilt or dependence.** | all | The app adds no notification, badge or reminder. Notifications are Phase 6, with their own Soul review. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
| Id | Gap | Designed solution / state |
|
||||
|:--|:--|:--|
|
||||
| G-T1 | **iOS** cannot be built on Windows. | Needs macOS with Xcode (and its command-line tools, CocoaPods not required by Tauri 2), the Rust targets `aarch64-apple-ios` and `aarch64-apple-ios-sim`, and an **Apple developer account**: a free Apple ID can sign for one's own device for 7 days; TestFlight and the App Store need the paid programme. Then `pnpm tauri:ios`. Unknown until measured there: where WKWebView keeps IndexedDB, whether iOS purges it for an unused app, and whether `<a download>` saves her file. **Open.** |
|
||||
| G-T2 | **macOS and Linux desktop builds** are not built. | Each on its own system: `pnpm tauri:build` (`.app`/`.dmg`; `.deb`/AppImage). macOS outside the App Store also needs signing and notarisation with a paid account, or Gatekeeper warns. **Open.** |
|
||||
| G-T3 | **Release signing** for Android (a keystore) and Windows (a code-signing certificate). | Debug builds only today. The keystore and its passwords never enter the repository (CLAUDE.md §5.2). Phase 6. **Open.** |
|
||||
| G-T4 | **Keep her safe inside the apps — a release blocker.** The game saves through `<a download>` on a blob URL, and its words speak of *this browser*. | **Measured 2026-11-17.** Windows: the save starts a download (`rose-2026-11-17.json`). Android (WAVE 10C, WebView 140): **nothing happens**. And in both apps `persist()` answers `false`, so *Keep her safe* says *This browser may clear her if the garden is not opened for a long time. A saved file keeps her for sure.* and offers *Ask the browser to keep her*: wrong words in an app, a worry that is not true of an app's own storage, and on Android a remedy that does nothing. Design for its own feature: app words for *Keep her safe* in `packages/ui/src/copy/` chosen by the shell constant; saving through `tauri-plugin-dialog` + a write (the first plugin, reviewed for network access) or the Android share sheet. **No APK or installer goes to any player before this is closed.** |
|
||||
| G-T5 | **Bringing her back from a file** (`<input type="file">`) inside the apps. | **Measured 2026-11-17 on Android:** the system file picker opens (`com.android.documentsui` `PickActivity`). Reading a chosen file back was not tried (no saved rose on the tablet, see G-T4). Windows: not tried. **Open** until a round trip is seen. |
|
||||
| G-T6 | **WebView2's traffic not measured for Rosea.** | Amicitia's `watch-desktop-network.ps1` approach: run the built exe, list its connections. Before the first desktop release. **Open.** |
|
||||
| G-T7 | **No CI** builds the apps (G0.22). | Builds by hand on this machine; never committed. |
|
||||
| G-T8 | **Storage eviction in WebView2 and Android WebView.** | **Measured 2026-11-17:** `persist()` and `persisted()` answer `false` in both (Android: quota 70 GB, 3 KB used). An app's webview data lives in the app's own storage and goes with an uninstall or *Clear storage*; whether Chromium's pressure eviction can reach it there was not measured. G-T4 is the answer either way. |
|
||||
| G-T9 | **The icon is the PWA's placeholder.** | G0.21; the art pipeline. Android adaptive icons need a foreground layer then. |
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| Name and window title equal `PRODUCT_NAME`; identifier is `cz.mareknovak.domi.rosea`; version read from `apps/rosea/package.json`, which exists | unit | `apps/rosea-tauri/test/config.test.ts` |
|
||||
| Tauri's CSP equals `apps/rosea/csp.ts`; the shell's dev server and build point at `dev:shell` / `build:shell` and `dist-tauri`, dev on 127.0.0.1 | unit | same |
|
||||
| `useHttpsScheme` is `true` (the origin is forever) | unit | same |
|
||||
| WebView2's privacy flags are all in `additionalBrowserArgs` | unit | same |
|
||||
| `Cargo.toml` depends on `tauri` alone; no `capabilities/` folder | unit | same |
|
||||
| The Android build runs the privacy patch before the game's build | unit | same |
|
||||
| Patch on Tauri's stock manifest: `INTERNET` gone, three attributes set, both meta-data present; a second run changes nothing; CRLF kept; an unexpected shape throws | unit | `apps/rosea-tauri/test/android-privacy.test.ts` |
|
||||
| `manifestProblems` names each missing piece on the stock manifest and none on the patched one | unit | same |
|
||||
| The committed rule files exclude every domain everywhere; a file missing one, or including something, is caught | unit | same |
|
||||
| `apkProblems` on real `aapt2` output: the patched APK passes; a stock one (INTERNET, backup on) fails with names | unit | same |
|
||||
| `vite build --mode tauri`: no worker, no `registerSW` script, no manifest, no `<meta>` CSP, assets under `/assets/`, `__ROSEA_SHELL__` replaced | integration | `apps/rosea-tauri/test/shell-build.test.ts` |
|
||||
| The PWA build is unchanged: `<meta>` CSP, worker, manifest scope `/Rosea/` | e2e | `e2e/` (existing suites) |
|
||||
| Windows: the release `.exe` opens the garden; water her; close; open again; she is still watered | manual + script | review (Playwright over WebView2's debugging port on 127.0.0.1) |
|
||||
| Android: the debug APK installs on the WAVE 10C (Android 16), opens the garden, water her, force-stop, open again: still watered; the app has no `INTERNET` (offline by construction) | device | review (`adb`, Playwright over the WebView's DevTools socket) |
|
||||
| The APK asks for no permission, sets `allowBackup=false`, metrics and Safe Browsing off | artefact | `pnpm tauri:android` → `android.ts verify` (aapt2) |
|
||||
| `pnpm tauri:ios` on Windows refuses with the reason and builds nothing | manual | review |
|
||||
| iOS, macOS, Linux | — | not possible here (G-T1, G-T2) |
|
||||
@@ -0,0 +1,63 @@
|
||||
# Thorns — touching her gently
|
||||
|
||||
Status: built on `feature/thorns`. ROADMAP Phase 1: *one rose with her face: … moods, thorns …*.
|
||||
CLAUDE.md §1: *alive and a little vain, with thorns that are part of her.* STYLE.md: *the thorns are
|
||||
part of her and never look threatening.* Decided by the author 2026-11-02: **thorns teach gentleness.**
|
||||
Review: [`feature-thorns.md`](../reviews/feature-thorns.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
The player can touch her: tap her picture (or Tab to it and press Enter).
|
||||
|
||||
- **A touch** — she answers fondly: *Oh. Hello.*, then *That tickles.* The first touch of a visit makes
|
||||
her blush (seen in full bloom, where her face shows moods).
|
||||
- **A rush of touches** — three quick taps within two seconds — she says *Gently. I have thorns.* and
|
||||
rests for a few seconds; taps meanwhile do nothing. Then she is as before.
|
||||
- **Nothing is recorded.** No event, no number, no penalty, nothing she remembers. A touch is not care:
|
||||
it does not water her, does not count as a day of care, does not move anything she has earned.
|
||||
|
||||
Why: the fox (Phase 2) is tamed by touch, and taming needs patience. The rose rehearses it first, kindly,
|
||||
in the one place where getting it wrong costs nothing.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
ui["packages/ui<br/>Rose.svelte: a Touch her button over her picture"] -->|"now, state"| engine["packages/engine<br/>touch/touch.ts: touch()"]
|
||||
engine -->|"fond | thorns | resting, next state"| ui
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| T1 | The rule lives in `engine/touch` as a pure function of the visit's recent touches and the clock. | Components decide nothing (CLAUDE.md §7); the fox reuses it. |
|
||||
| T2 | **A rush** is `TOUCH.rushCount` (3) touches within `TOUCH.rushMs` (2 s). Touches closer than `TOUCH.sameMs` (250 ms) to the one before count as one. | A tremor, a bounce or a double tap must never be told *gently*. Three separate, deliberate taps in two seconds is fussing. |
|
||||
| T3 | After the thorns line she **rests** `TOUCH.restMs` (4 s): touches change nothing, then all is as before. | A boundary, kept briefly and then let go; no grudge. |
|
||||
| T4 | **Nothing is stored**, so the blush comes on the first touch of a *visit* (the author's option said *once a day*; a day would need a record, and the option also said nothing is recorded — the second wins). | *Progress never disappears* has nothing to act on; no number can grow from touching. |
|
||||
| T5 | Her picture stays an image with its description; the touch is a separate button laid over it, labelled *Touch her*. | The picture keeps its meaning for a screen reader; the touch is keyboard-operable. |
|
||||
| T6 | Her touch words take the speech bubble for the rest time, then her usual line returns. | One line at a time. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Being scolded**: *Gently* read as a reproach, for someone already fragile. | It needs three deliberate taps (T2), is said once, never repeated while she rests, never mentioned again, never recorded. It is her voice about herself (*I have thorns*), not about the player. |
|
||||
| A player with a tremor or a motor difficulty. | T2: taps within 250 ms are one touch. Keyboard repeat (holding Enter) is ignored too. |
|
||||
| **Dependence**: touching as a fidget loop. | It gives nothing: no blush after the first, no number, no reward for more. |
|
||||
| Privacy, reachability, offline | Nothing stored or sent; works offline as everything else. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
Closes the last Phase 1 roadmap item without a design (*thorns*). Tuning in `TOUCH` is the author's.
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| One touch: fond; second: fond; first of a visit: blush | unit | `engine/test/touch.test.ts`, `ui/test/touch.test.ts` |
|
||||
| Three taps within 2 s: thorns; then resting for 4 s; then fond again | unit | same |
|
||||
| Taps within 250 ms count as one; three such bursts spaced out are not a rush | unit | engine |
|
||||
| **Property:** taps a second or more apart are never a rush (three span at least 2 s) | property | engine |
|
||||
| **Property:** the state never grows past `rushCount` touches | property | engine |
|
||||
| Keyboard: the button is reachable; held Enter (repeat) is one touch | unit | ui |
|
||||
| A touch appends no event | unit | ui |
|
||||
| Built app: touch, rush, axe | e2e | `e2e/shell.spec.ts` |
|
||||
@@ -0,0 +1,64 @@
|
||||
# Two tabs, one garden
|
||||
|
||||
Status: built on `fix/two-tabs`. CLAUDE.md §8, *Two tabs, one database (predicted): two event streams
|
||||
into one store; derived state drifts. Use a `BroadcastChannel` lock.* Review:
|
||||
[`fix-two-tabs.md`](../reviews/fix-two-tabs.md).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
A player may have the garden open twice: two browser tabs, or the installed app and a tab. Whatever
|
||||
they do in one is now seen in the other within a moment, without a reload: care given, a petal opened,
|
||||
a rose brought back from a file, a town chosen.
|
||||
|
||||
**Measured first (2026-11-07).** Two e2e tests, written before the fix, failed: a tab already open did
|
||||
not see care given in the other, nor a town chosen there. The prediction was half right:
|
||||
|
||||
- **No stored state drifts.** There is no `derived` store yet; the log is append-only and every write
|
||||
is its own IndexedDB transaction (auto-increment ids), so two writers cannot overwrite each other.
|
||||
The identity's first write already wins in a transaction (rose.md). **No lock is needed.**
|
||||
- **The views drift.** Each tab read the log once, at start. The harm: she is watered in one tab, the
|
||||
other still shows her thirsty, the player waters again, and she is too full — a mistake the game
|
||||
made, blamed on her care.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
a["tab A<br/>packages/storage: appendCare"] -->|"IndexedDB write, then post 'log'"| bc(("BroadcastChannel<br/>rosea-changes"))
|
||||
bc -->|"'log' | 'place'"| b["tab B<br/>packages/storage: onChange"]
|
||||
b --> app["apps/rosea wiring"] --> ui["packages/ui<br/>Rose / Shell reload from storage"]
|
||||
```
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| W1 | **`packages/storage` announces its own writes** on a `BroadcastChannel` named after the database, *after* the write commits: `'log'` (care, a petal, a rose brought back) or `'place'` (the town). | One module owns every write, so no write path can forget to announce. After the commit, so the other tab reads what was written. |
|
||||
| W2 | **The message is only what changed**, never the data. The other tab reads storage again. | Storage stays the truth; a message can be lost or arrive twice and nothing breaks. |
|
||||
| W3 | A tab does not hear itself (a `BroadcastChannel` never delivers to the object that posted). | No double reload. |
|
||||
| W4 | **No lock.** | §1: nothing a lock would protect exists yet. When a `derived` store arrives, its feature doc decides again. |
|
||||
| W5 | Where `BroadcastChannel` does not exist, nothing is announced and each tab is as before. | Safari has it since 15.4; an older browser loses only the live update, never data. |
|
||||
| W6 | Nothing on screen says another tab acted. The garden simply is as it is. | Calm; no "updated elsewhere" notices. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| **Blame for the game's mistake** (watered twice, too full). | The fix itself. |
|
||||
| **Privacy**: a message leaves the tab. | A `BroadcastChannel` reaches only this origin's own tabs and workers in this browser profile; it carries one word, never data. Nothing leaves the device. |
|
||||
| A message from another origin or a malformed one. | The channel is same-origin by definition; anything but `'log'` or `'place'` is ignored. |
|
||||
| Reachability, offline | Not affected; works offline. |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
Closes CLAUDE.md §8's two-tabs trap (measured, answered) and the review checklist's *two tabs open*
|
||||
for the log and the town. Not covered: a tab that is mid-pour when the other tab's care arrives keeps
|
||||
pouring against the new water level (that is the correct level).
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| Each write announces after it commits: care, petal, rose brought back → `'log'`; town → `'place'` | unit | `storage/test/changes.test.ts` |
|
||||
| A failed write announces nothing; a tab does not hear itself; a malformed message is ignored; unsubscribe stops it; `close()` closes the channel | unit | same |
|
||||
| Without `BroadcastChannel`, storage still works | unit | same |
|
||||
| The rose reloads her log on `'log'`; the shell reloads the town on `'place'` | unit | `ui/test/two-tabs.test.ts` |
|
||||
| Built app, two tabs: care in A seen in B without reload; a town chosen in A shown in B | e2e | `e2e/shell.spec.ts` (failed before the fix: the measurement) |
|
||||
@@ -8,13 +8,13 @@ and **how to apply it**.
|
||||
|:--|:--|:--|
|
||||
| `soul.md` | none yet | What comforts and what only looks like comfort. **The most important file here.** No mechanic exists yet that could teach anything. |
|
||||
| `architecture.md` | none yet | Layering, ownership, seams. |
|
||||
| `design.md` | none yet | Wording, silence, empty states. |
|
||||
| [`art.md`](art.md) | 2 | The image pipeline. |
|
||||
| [`code.md`](code.md) | 3 | TypeScript, Svelte, async ordering, Rust. |
|
||||
| [`technical.md`](technical.md) | 5 | The browser and the build as platforms. |
|
||||
| [`testing.md`](testing.md) | 9 | What makes a test worth having, and how a passing test lies. |
|
||||
| [`design.md`](design.md) | 1 | Wording, silence, empty states. |
|
||||
| [`art.md`](art.md) | 3 | The image pipeline. |
|
||||
| [`code.md`](code.md) | 4 | TypeScript, Svelte, async ordering, Rust. |
|
||||
| [`technical.md`](technical.md) | 10 | The browser and the build as platforms. |
|
||||
| [`testing.md`](testing.md) | 16 | What makes a test worth having, and how a passing test lies. |
|
||||
| `privacy.md` | none yet | What could leave the device or make a person findable. (The geocell finding is in the review, not here: it was caught before it cost anything.) |
|
||||
| [`process.md`](process.md) | 3 | Workflow, commits, credentials, honesty about what shipped. |
|
||||
| [`process.md`](process.md) | 6 | Workflow, commits, credentials, honesty about what shipped. |
|
||||
|
||||
A file is created with its first real entry. An empty lessons file only looks like
|
||||
knowledge.
|
||||
|
||||
@@ -32,3 +32,21 @@ likeness gets into the art (§8, *copyright through the back door*).
|
||||
**How to apply it.** Any text that is assembled into something sent outside, a prompt
|
||||
included, goes through the same forbidden list as player copy. Reword: *waiting with
|
||||
patience* is allowed.
|
||||
|
||||
## A style prompt loses to the generator's default unless it is stronger and comes first
|
||||
|
||||
**What happened.** On 2026-11-07 the first `rose-sheet` came back as wet, pale watercolour with a
|
||||
smiley face on a round ball inside the petals: a children's sticker sheet. STYLE.md §1 had asked for
|
||||
matte gouache with plum-brown outlines, and its own *avoid* list named watercolour. The prompt was a
|
||||
long document: the style, then pixel coordinates, cut lines and two lists of things not to draw,
|
||||
among them the book's motifs.
|
||||
|
||||
**Why it bit.** A generator has a strong default for "cute character", and it fills every gap the
|
||||
prompt leaves with that default. Prompts that bury the look under numbers it cannot use, and lists
|
||||
of things not to draw, leave the gap wide; naming a motif, even to forbid it, makes it likelier.
|
||||
|
||||
**How to apply it.** Lead with the look, said positively and concretely (medium, texture, line,
|
||||
light, audience); then the picture in plain words; then a short avoid list of generic faults. Keep
|
||||
pixel geometry out of prompts (the cutting tools hold it). Check the book's motifs in review, not in
|
||||
prompts. When a picture fails, name the exact failure in the character's own description (here:
|
||||
*no round face, ball or bare patch inside the petals*), so every prompt carries it.
|
||||
|
||||
@@ -50,3 +50,16 @@ hands out Proxies wherever state is deep.
|
||||
**How to apply it.** At every storage or messaging boundary, write a plain copy built
|
||||
field by field (in `@rosea/storage`, the same shape check used on reading). Keep lists
|
||||
that are only passed along as `$state.raw`. Test the boundary with `new Proxy(value, {})`.
|
||||
|
||||
## `svelte/motion` reads `matchMedia` when it is imported
|
||||
|
||||
**What happened.** On 2026-11-17 the gardener's walk used `Tween` from `svelte/motion`. Every UI
|
||||
test file failed at import: jsdom has no `window.matchMedia`, and the module reads it at load (for
|
||||
its reduced-motion store), not when a tween runs.
|
||||
|
||||
**Why it bit.** An import with side effects breaks every file that imports it, even transitively,
|
||||
and the error points at the module, not at the component that needed it.
|
||||
|
||||
**How to apply it.** In `packages/ui`, animate with a small `setInterval` easing inside an
|
||||
`$effect` (`packages/ui/src/scene/Planet.svelte`), reading reduced motion once through a guarded
|
||||
`matchMedia` call. If `svelte/motion` is wanted later, stub `matchMedia` in the test setup first.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Design lessons
|
||||
|
||||
What the player is shown and why: wording, silence, empty states (CLAUDE.md §5.1b).
|
||||
|
||||
## Words that are true in a browser can be false, and frightening, in an app
|
||||
|
||||
**What happened.** In the Android and Windows apps (2026-11-17, `feature/tauri-platforms`) *Keep her
|
||||
safe* said *This browser may clear her if the garden is not opened for a long time. A saved file
|
||||
keeps her for sure.* and offered *Ask the browser to keep her*. In an app there is no browser to ask,
|
||||
`persist()` always answers no, the inactivity warning is not true of an app's own storage, and on
|
||||
Android *Save her to a file* did nothing at all. The comfort became a worry with a broken remedy.
|
||||
|
||||
**Why it bit.** The words were written, carefully, for one place (a browser tab or an installed PWA)
|
||||
and were carried unchanged into another. Copy states facts about the platform; when the platform
|
||||
changes, the facts do.
|
||||
|
||||
**How to apply it.** When the game reaches a new platform, read every sentence that speaks about the
|
||||
device, the browser, storage or files, on that platform, and check that each claim is still true and
|
||||
each offered action still works. A remedy that silently fails is worse than none. Until then the
|
||||
platform is not shipped to players (here: G-T4, a release blocker).
|
||||
@@ -45,3 +45,53 @@ while nothing else is competing for attention.
|
||||
**How to apply it.** Make the run refuse to start. Done: `pnpm guard:cpu` (in
|
||||
`tools/cpu-guard`) runs before every full run, waits up to three minutes, then refuses. Do
|
||||
not set `ROSEA_CPU_MAX` to get past a busy desktop; it is for dedicated machines.
|
||||
|
||||
## An inline edit through the shell is two parsers deep
|
||||
|
||||
**What happened.** On 2026-11-02 two edits went through the shell. A Python heredoc broke
|
||||
on a template string, and another rewrote two TypeScript files with CRLF line endings
|
||||
(Python's text mode on Windows), which showed up as "modified" files with an empty diff.
|
||||
A Node one-liner lost every `${…}` to the shell.
|
||||
|
||||
**Why it bit.** Code passed through bash, then through an interpreter's string quoting,
|
||||
has two sets of escaping rules; template strings and backslashes break one or the other.
|
||||
On Windows the interpreter also chooses line endings.
|
||||
|
||||
**How to apply it.** Edit source files with the edit tool. When a script is needed, write
|
||||
it to a file first (the scratchpad), then run the file.
|
||||
|
||||
## Git Bash rewrites Android paths
|
||||
|
||||
**What happened.** On 2026-11-17 `adb shell ls -l /sdcard/Download/…` typed in Git Bash answered
|
||||
`ls: C:/Program: No such file or directory`: MSYS turned `/sdcard/…` into
|
||||
`C:/Program Files/Git/sdcard/…` before adb saw it.
|
||||
|
||||
**Why it bit.** The rewrite is silent and the error looks like the device's.
|
||||
|
||||
**How to apply it.** Prefix hand-typed adb commands with `MSYS_NO_PATHCONV=1`, or pass arguments from
|
||||
Node (`spawnSync`), which the shell does not touch.
|
||||
|
||||
## A bug drill restored with `git checkout` loses the work beside it
|
||||
|
||||
**What happened.** On 2026-11-19 (`feature/fabrica-release`) a drill edited `scripts/lint-copy.ts`
|
||||
and restored it with `git checkout --`. That brought back the *committed* file and silently dropped an
|
||||
uncommitted change in it (the release notes' entry). The diff showed it at once; it was re-applied.
|
||||
|
||||
**Why it bit.** `git checkout -- <file>` restores the index, not the file as it was a minute ago.
|
||||
|
||||
**How to apply it.** Commit before drilling, or copy the file aside and copy it back. Check
|
||||
`git diff --stat` after every drill.
|
||||
|
||||
## A claim about another system's behaviour, written from its docs' general rule, was wrong for us
|
||||
|
||||
**What happened.** On 2026-11-19 `fabrica-release.md` F4 said "Custos makes `rosea-android` on the
|
||||
first release". Custos does that only for the apps in its `ANDROID_APPS` table, and Rosea was never in
|
||||
it (`apps/desktop/src-tauri/src/signing.rs`, read on 2026-11-21). The release would have stopped at
|
||||
`no_key` after Mark's approval card. Culina and Liber hit exactly that on 2026-11-20.
|
||||
|
||||
**Why it bit.** The doc described what Custos does for Postea, and it read like a rule for every app.
|
||||
Nothing in Rosea could test the claim: the step that would have failed runs only after a human approves.
|
||||
|
||||
**How to apply it.** When a step depends on another system doing something for us, find the line in
|
||||
that system's source or config that names us, and cite it in the analysis. If no line names us,
|
||||
write the claim as a gap, not as a fact.
|
||||
|
||||
@@ -70,3 +70,71 @@ listening. This machine runs many projects.
|
||||
**How to apply it.** Before starting a preview, check that the port is free
|
||||
(`netstat -ano | grep :<port>`). After it starts, check the page title before you trust
|
||||
anything the page says.
|
||||
|
||||
## A predicted trap can name the right place and the wrong harm
|
||||
|
||||
**What happened.** CLAUDE.md §8 predicted that two tabs would make stored derived state drift and
|
||||
prescribed a lock. On 2026-11-07 two e2e tests, written before any fix, showed the real harm was
|
||||
elsewhere: there was no derived store and the append-only log could not conflict, but each tab's
|
||||
view went stale, so a player could water the rose twice. A lock would have fixed nothing.
|
||||
|
||||
**Why it bit.** A prediction is written before the code exists, so its remedy fits the design
|
||||
that was imagined, not the one that was built.
|
||||
|
||||
**How to apply it.** Before acting on a predicted trap, write the test that would show it, run it
|
||||
against the built app, and fix what fails. Then rewrite the trap's row with what was measured.
|
||||
|
||||
## Data built against a runtime's time zones goes stale when the runtime changes
|
||||
|
||||
**What happened.** On 2026-11-17 Node went from 22.11 to 22.23.4 and a test found a time zone
|
||||
(America/Coyhaique) with no town guess. Rebuilding the town list then showed far worse: Santiago had
|
||||
sat on a southern zone's clock since the first build, because Natural Earth files it under
|
||||
America/Sao_Paulo and the build trusted any zone whose clock matched one of the country's own.
|
||||
|
||||
**Why it bit.** A build step that consults `Intl` bakes the runtime's time zone data into a file. An
|
||||
upgrade changes the answers silently; only a test that asks *every* zone notices, and then the whole
|
||||
derivation deserves a second look, not just the one zone.
|
||||
|
||||
**How to apply it.** After a Node upgrade, run the content tests first. When generated data changes,
|
||||
diff it item by item (here: every town whose zone moved) and explain each change in the review.
|
||||
|
||||
## A generated project is newer than anything you made before it
|
||||
|
||||
**What happened.** The first Android APK (2026-11-17) carried Tauri's logo. `scripts/icons.ts` copied
|
||||
Rosea's icons only when the target was older than `icon.svg`, but `tauri android init` had just
|
||||
written its own icon into `gen/android`, newer than both.
|
||||
|
||||
**Why it bit.** A date check answers "has the source changed since?", not "is this file mine?". A
|
||||
generator that runs later wins every date comparison.
|
||||
|
||||
**How to apply it.** Copy what must survive a generator unconditionally, and check it by content
|
||||
(`android.ts check` compares the icon's bytes). Then look at the artefact: the APK's own icon was
|
||||
hashed against ours.
|
||||
|
||||
## The proof of an app's permissions is the built package
|
||||
|
||||
**What happened.** Following Amicitia (its lessons/technical.md), `pnpm tauri:android` ends by reading
|
||||
the APK with `aapt2 dump permissions` and `dump xmltree`, and the device check reads
|
||||
`dumpsys package` on the tablet. The source manifest was right; the APK also held a
|
||||
`DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` that the source never mentions (androidx merges it).
|
||||
|
||||
**Why it bit.** The manifest merge adds what libraries declare. A check on the source would never see
|
||||
a permission a library adds.
|
||||
|
||||
**How to apply it.** Check permissions, backup flags and WebView switches on the APK and on the
|
||||
installed package, and name each allowed exception precisely (this package's own receiver guard,
|
||||
not any app's).
|
||||
|
||||
## Tauri's Android activity draws under the system bars
|
||||
|
||||
**What happened.** The first screenshot of the Android app on the tablet (2026-11-17) showed the clock
|
||||
over the title and the navigation bar over *Bring her back from a file*. Tauri's generated
|
||||
`MainActivity` calls `enableEdgeToEdge()`, and Android WebView does not reliably report the bars to
|
||||
the page as `env(safe-area-inset-*)` (Culina found the same on an emulator).
|
||||
|
||||
**Why it bit.** Every test before it read the page, not the screen: the button was there, enabled and
|
||||
clickable by script, and hidden from a finger.
|
||||
|
||||
**How to apply it.** Look at a screenshot of every new platform before calling it done. Keep the page
|
||||
between the bars in the activity (padding from `WindowInsetsCompat`), paint the bars with the page's
|
||||
own background, and carry the activity in `apps/rosea-tauri/android/java/` because `gen/` is regenerated.
|
||||
|
||||
@@ -131,3 +131,99 @@ equality is blind to exactly the field that is absent by accident.
|
||||
|
||||
**How to apply it.** For "holds this and nothing else", use `toStrictEqual`, and give the
|
||||
test something real to leak (here, a kept identity).
|
||||
|
||||
## A helper that searches for a moment can land on a boundary
|
||||
|
||||
**What happened.** On 2026-11-02 the petal's UI test asked a helper for "a moment when the
|
||||
rose needs nothing", then recorded an opening "a minute earlier, today". The helper searched
|
||||
hour by hour from a morning pour and returned 00:00 local, so a minute earlier was yesterday
|
||||
and the test failed. The component was right; the first suspicion fell on it.
|
||||
|
||||
**Why it bit.** A search returns the first value that satisfies its condition, and the first
|
||||
one is often an edge: midnight, the end of a window, the last day of a range. The test then
|
||||
asserts something the edge makes false.
|
||||
|
||||
**How to apply it.** Bound every search to the region the test means (here: daytime on the
|
||||
pour's own local day), and when a test built on a search fails, print what the search
|
||||
returned before debugging the code under test.
|
||||
|
||||
## A constant the minifier folds cannot be found in the bundle
|
||||
|
||||
**What happened.** The first shell-build test (`apps/rosea-tauri/test/shell-build.test.ts`, 2026-11-17)
|
||||
asserted that the string `"tauri"` was in the built JavaScript, to prove `__ROSEA_SHELL__` was
|
||||
`'tauri'`. Vite replaces the constant, and the minifier then folds `'tauri' === 'tauri'` to `!0`:
|
||||
the string is gone whether the build was right or wrong.
|
||||
|
||||
**Why it bit.** A test that reads build output tests every step of the build, the minifier included.
|
||||
An assertion about a literal that only exists before minification is about the source, not the bundle.
|
||||
|
||||
**How to apply it.** Assert what the bundle must not contain (the constant's name, which would throw
|
||||
in the webview), and prove the behaviour where it runs: here, the device check.
|
||||
|
||||
## A window after a match can read the neighbour's value
|
||||
|
||||
**What happened.** The first APK check looked for a WebView switch's value in the 300 characters
|
||||
after its name in `aapt2 dump xmltree`. The next `<meta-data>` element starts within those 300
|
||||
characters, so a switch turned the wrong way could pass on its neighbour's value.
|
||||
|
||||
**Why it bit.** A fixed window feels safe because the right answer is inside it; so is a wrong one.
|
||||
|
||||
**How to apply it.** Read structured output by its structure (here: the value attribute on the line
|
||||
after the name attribute), and keep a test that flips exactly one value on real output and expects
|
||||
that one name back.
|
||||
|
||||
## A dropped device link is not a failed test, and must not look like a pass either
|
||||
|
||||
**What happened.** On 2026-11-17 the USB link to the Android tablet dropped at least twice within the
|
||||
hour (`device offline`; adb's transport id went 1 → 4 → 5), once between the two visits of the
|
||||
garden check, which then failed on `am force-stop`.
|
||||
|
||||
**Why it bit.** A real device is a second machine with its own life. Retrying everything hides real
|
||||
failures; retrying nothing makes the check a coin toss.
|
||||
|
||||
**How to apply it.** Retry only the failure that names the link (`offline`, `closed`, `no devices`),
|
||||
after `adb wait-for-device`, a bounded number of times; find the device handle again after a drop;
|
||||
let every other failure end the check at once. Report how many runs failed and why.
|
||||
|
||||
## jsdom has no `PointerEvent`, so a test pointer carries no coordinates
|
||||
|
||||
**What happened.** On 2026-11-17 the planet garden's gesture tests fired `pointerDown` and
|
||||
`pointerMove` with `clientX`/`clientY`, and every gesture read as a tap at (0, 0). jsdom has no
|
||||
`PointerEvent`; testing-library falls back to a plain `Event`, which drops the coordinates.
|
||||
|
||||
**Why it bit.** The test looked like a finger and measured nothing. A missing browser API in the
|
||||
test environment does not fail loudly; it quietly hands the code a poorer event.
|
||||
|
||||
**How to apply it.** Before testing pointer gestures in jsdom, polyfill `PointerEvent` on
|
||||
`MouseEvent` (`packages/ui/test/planet.test.ts`) and assert one coordinate-dependent outcome first
|
||||
(a sideways swipe does *not* pull a weed). Check real fingers on the device (`pnpm test:android`).
|
||||
|
||||
## A device test's clean-up must cover its very first step
|
||||
|
||||
**What happened.** On 2026-11-17 `scripts/android-smoke.ts` connected to Chrome on the tablet
|
||||
*before* its `try`. Chrome was still cold-starting, the connect failed with *socket hang up*, and
|
||||
the `finally` that stops Chrome and removes the adb mappings never ran: Chrome stayed open on a
|
||||
device the author asked to leave as it was found. It was stopped by hand.
|
||||
|
||||
**Why it bit.** Clean-up written for the failures you expect (a step fails) misses the one that
|
||||
happens first (the setup fails). On a shared device, a leftover is somebody else's problem.
|
||||
|
||||
**How to apply it.** Open the `try` before the first command that changes the device; make the
|
||||
clean-up tolerate half-done setup (`page?.close()`, `browser?.close()`); retry connections that
|
||||
race a cold start (the script tries for 30 s). After every device run, check: `pidof` the app is
|
||||
empty, `reverse --list` and `forward --list` are empty.
|
||||
|
||||
## When a hand-run probe passes and the check fails, the check is the bug
|
||||
|
||||
**What happened.** On 2026-11-17 the Android round trip (`e2e/apps/check-garden.ts`) failed three
|
||||
times at *Bring her back from a file*, while a probe doing the same steps by hand passed. Two
|
||||
differences, both in the check: it tapped the picker while the screen was still sliding in, and it
|
||||
matched nodes by description too, so it tapped DocumentsUI's *Preview the file …* button, which
|
||||
comes before the file's own name in the tree.
|
||||
|
||||
**Why it bit.** A check that drives someone else's screen (Android's picker) carries assumptions
|
||||
about that screen. When it fails, the app is the first suspect, and the check's own guesses are not.
|
||||
|
||||
**How to apply it.** When a device check fails, do the steps once by hand with screenshots before
|
||||
changing the app. On a system screen, match the exact visible text, and tap only a node that stands
|
||||
still across two readings.
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# Review — `art/board-v2`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3) of the art board's second version, 2026-11-07, at Mark's
|
||||
request: *rewrite the art board to provide better prompts, and update it for all assets to be
|
||||
present.* Pipeline: [`docs/ART.md`](../../docs/ART.md). Style: [`art/STYLE.md`](../../art/STYLE.md).
|
||||
|
||||
## Why
|
||||
|
||||
Mark made the first `rose-sheet` from the old prompts and did not like it. Read against STYLE.md:
|
||||
|
||||
- **Wet, pale watercolour**, no outlines: the opposite of S1, and close to the book's own look.
|
||||
- **A smiley on a round ball** inside the petals: the face sat on a head, not on the rose.
|
||||
- **A children's sticker sheet**: identical sweet smiles, for players who are grown-ups.
|
||||
- **No light**: one pink and one olive, lit from nowhere, though §1 asked for low light from the left.
|
||||
|
||||
The choices S1–S5 were right; the prompts did not carry them. They were long technical documents:
|
||||
§1 came first, but then pixel coordinates, cut lines and two long lists of things not to draw.
|
||||
|
||||
## What changed
|
||||
|
||||
| # | Change | Why |
|
||||
|:--|:--|:--|
|
||||
| B1 | **STYLE.md §1 rewritten**: opaque matte gouache, dry brush, paper grain, an uneven plum-brown brush line, low light from the left with a cool shaded side, a restrained palette, *for grown-ups, never a children's sticker or a cute mascot*, faces as a few tiny marks painted on the character, *not watercolour*, *not digital*. | Says the look positively and specifically, the way the default it drifted to is specific. |
|
||||
| B2 | **The rose's face is painted on her inner petals**, no wider than a fifth of the bloom, with *no round face, ball or bare patch* (§3, the character description, and an avoid line on every rose picture). Her bloom is a real cupped old garden rose. | The failure seen, named in the place every rose prompt reads. |
|
||||
| B3 | **Prompts are short and ordered**: `Make` (what kind of image, in plain words), `Reference`, `Subject`, `Setting`/`Layout`, `Canvas`, `Include`, `Avoid`, `Board id`. | Generators follow the first lines and drift on the rest (STYLE.md §6). |
|
||||
| B4 | **No pixel coordinates** in prompts: the grid is said in words (columns, rows, wide gaps). The board's dashed overlay and `art:accept` still cut by the exact grid. | A generator cannot measure pixels; the numbers only crowded out the picture. |
|
||||
| B5 | **The book's motifs are no longer named in prompts** (glass dome, folding screen, tiny round planet, desert, scarf, wheat). They stay in STYLE.md §4 and review point 3, where Claude's review and Mark's eye check them. A test proves no prompt names them and the checklist still does. | Naming a motif, even to forbid it, makes a generator likelier to draw it. |
|
||||
| B6 | **33 new pictures, 86 in all**, every one with a stand-in. Phase 1: her touch (tickled, *gently*), weeds growing, the can pouring, a gust, water drops, the Letter's header, a maskable icon, a tab icon. Phase 2: visitors, mementos, the Geographer's book, five planet drafts. Phase 3: the trace petal. Phase 4: a sky light, the sunset-wave lamps, two foxes meeting. Phase 5: the share frame. | *All assets present*: everything Phases 1–5 name, from CLAUDE.md §1, GAMEPLAY.md and ROADMAP.md. |
|
||||
| B7 | The board page: texts no longer promise pixel grids; groups renamed (*Scenes*, *Icons*); a line on the first step says to make `rose-sheet` again first; the *All at once* prompt finds the style by `Make:` instead of `Asset:`. | The page must describe the prompts it holds. |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Soul | **The planets show grown-ups** the game wants players to feel for; STYLE.md says no people. | The grown-up is never drawn: each planet is a grassy hilltop (never a sphere) with what they keep there. A test proves every planet asks for *nobody there*. They are **drafts** until each planet's feature doc. |
|
||||
| 2 | Soul | The sixth grown-up's planet (GAMEPLAY.md §6) would centre drinking, for players who may be fragile. | **Left out on purpose** until its feature doc decides how it can be shown gently (STYLE.md §4). |
|
||||
| 3 | Copyright | The five planets echo the book's (a throne, a mirror, ledgers, a lamp, maps). | GAMEPLAY.md §8 takes the structure as reference and never the drawings. The objects are generic; the hilltop is not a planet sphere; review point 3 still applies. Mark decides each with its feature doc. |
|
||||
| 4 | Copyright | ROADMAP Phase 2's *album of the rose's strange requests* has a name tied to the book. | No picture for it: it waits for its feature doc. |
|
||||
| 5 | Words | The planets' first purpose line used the word the game never says. | `checkManifest` refused it; reworded. |
|
||||
| 6 | Prompts | Two pictures still said *safe box*, a pixel-grid term. | The new test (no pixel terms) caught it; reworded. |
|
||||
| 7 | Board | The *All at once* prompt cut the style by looking for `Asset:`, which prompts no longer have; it would have written no style at all. | Fixed to `Make:`. Not covered by a test (the page's JavaScript has none); checked by reading. |
|
||||
| 8 | Stand-ins | The planet stand-ins' objects were too small to read. | Scaled up after looking at the board. |
|
||||
| 9 | Phase 6 | No store pictures (a store banner is not a size generators offer). | Deferred to Phase 6, with the store work. |
|
||||
|
||||
## Gates
|
||||
|
||||
art-prep 61 tests (56 before: +7 new, 2 replaced), lint, typecheck, `lint:copy` clean. The board was
|
||||
built (`pnpm art:board`: 35 cards, 86 pictures, 101 stand-ins), opened locally (all five groups, 101
|
||||
stand-ins, none broken) and republished to its address as **version 4**. **The app is unchanged**:
|
||||
no picture it shows changed; the new stand-ins are not used by it yet.
|
||||
|
||||
## Not verified
|
||||
|
||||
- **That the new prompts make a better rose.** Only a generator can say: make `rose-sheet` again.
|
||||
- The *All at once* prompt with real uploads; the board on a phone.
|
||||
@@ -0,0 +1,103 @@
|
||||
# Review — `art/gardener-layers`
|
||||
|
||||
The author's answer on 2026-11-17 to the open art question of the planet garden (STYLE.md §3b): the
|
||||
gardener the player dresses is drawn in **layered parts**. Not a few painted looks, not colours tinted
|
||||
in code. This branch turns that answer into the art pipeline. The app does not change: it keeps its
|
||||
code drawing until painted layers are accepted (G1.11).
|
||||
|
||||
## What changed
|
||||
|
||||
- **STYLE.md §3b** records the decision.
|
||||
- A **guide** (`gardener-poses-sheet`, the first-look girl whole in 8 poses) is now never shipped.
|
||||
- Five layers are stacked back to front: body (skin, face, a cream vest and shorts), clothes,
|
||||
apron and boots, hair, hat.
|
||||
- Each layer is painted over the guide in register, always as a whole sheet.
|
||||
- The count is **55 layer sheets** of 8 pictures.
|
||||
- New review point 12: a layer holds only its part and stacks into one child.
|
||||
- **art/manifest.json** gains `layers`.
|
||||
- It holds the words for every value the app offers, with the app's own colour codes.
|
||||
- It names the first looks and the five parts.
|
||||
- **tools/art-prep**
|
||||
- `expandLayers` writes the layers out as ordinary sprite sheets right after the guide, with the
|
||||
two first looks' seven layers first.
|
||||
- `checkManifest` refuses a guide that is missing, not a sprite sheet, or shipped. It also refuses
|
||||
a part whose subject names a choice it is not painted for, a choice with no words, and forbidden
|
||||
words.
|
||||
- A layer's prompt attaches `gardener-sheet` and the guide. It names only its part, not the whole
|
||||
first look, and its pictures have no one-at-a-time prompts.
|
||||
- `art:accept` refuses:
|
||||
- one picture of a layer made alone;
|
||||
- any layer before the guide is in `art/final/`;
|
||||
- a layer whose part strays more than 8 % of its cell outside the guide's figure, naming the
|
||||
pictures.
|
||||
- Stand-ins: the code gardener is split into the same five parts, so the layer stand-ins stack
|
||||
into whole figures. This was checked by eye: the first-look girl, and a boy with skin-6, dusk
|
||||
clothes, red curls and a cap.
|
||||
- **The board** has a *Gardener layers* group. A layer card says to attach the guide and has no
|
||||
*One at a time*.
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Kind | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Scope | 55 layer sheets make 440 pictures. The board grows from 40 cards and 98 pictures to 95 cards and 538 pictures. That is the real cost of *layered parts*, and it is the author's to know. | The board puts the seven first-look layers first. A look can be judged once its five are in, and the rest can follow over time (§3b). |
|
||||
| 2 | Correctness | Image generators do not keep layers in register by themselves. A layer made from text alone will drift. | The prompt makes the guide an attachment to paint over. `art:accept` measures register against the accepted guide and refuses the whole sheet if a part is off (8 % of the cell, `REGISTER`). The tolerance is a first guess: a curly bob or a wide hat may need more. Tune it on the first real layers. |
|
||||
| 3 | Correctness | The guide holds the watering can and the windbreak in its poses. A layer that copied them would draw a second can over the scene's own. | Every layer avoids "any other thing the guide holds (the game draws them)". |
|
||||
| 4 | Soul / likeness | Fair hair, short curls and sage clothes can be chosen together. STYLE.md's *never* list names "golden curls with a green outfit". | The words say *light honey-fair* and never *golden*. The gardener always wears the apron and boots, never a scarf or coat. Review points 10 and 12 apply to a whole stacked look as well as each layer. **Open for Mark:** whether the app should keep fair + curly from sage. It is one rule in the choice, not in the art. |
|
||||
| 5 | Privacy | Nothing leaves the device. The art board is a private page holding generated pictures and Mark's notes only. | — |
|
||||
| 6 | Test honesty | The first drill run reported CAUGHT without saying which test failed. A catch by an unrelated test proves nothing (`lessons/testing.md`). | Rerun with names: each of the 10 drills is caught by the test written for it. |
|
||||
|
||||
## Bug drills (put back, test run, restored)
|
||||
|
||||
10 of 10 caught, each by its own test:
|
||||
|
||||
1. No register check.
|
||||
2. One picture of a layer accepted alone.
|
||||
3. A layer accepted before its guide.
|
||||
4. No hat gets a layer.
|
||||
5. A shipped guide passes the check.
|
||||
6. A layer gets an ordinary sheet prompt.
|
||||
7. A layer's pictures get one-at-a-time prompts.
|
||||
8. A layer attaches only the character sheet.
|
||||
9. A prompt colour drifts from the app's.
|
||||
10. The first looks are not put first.
|
||||
|
||||
## Gates
|
||||
|
||||
lint 0 and typecheck 0.
|
||||
|
||||
Unit tests: 578.
|
||||
|
||||
| Package | Tests |
|
||||
|:--|--:|
|
||||
| cpu-guard | 13 |
|
||||
| identity | 5 |
|
||||
| schema | 19 |
|
||||
| content | 88 |
|
||||
| storage | 70 |
|
||||
| art-prep | 80 |
|
||||
| tauri | 40 |
|
||||
| engine | 179 |
|
||||
| ui | 84 |
|
||||
|
||||
The other gates:
|
||||
|
||||
- e2e: 26.
|
||||
- offline: 1.
|
||||
- `lint:copy`: 26 files, 0 problems.
|
||||
- Fixtures: 13 of 13 rejected.
|
||||
|
||||
The **first** run of e2e and offline failed, and my output filter dropped the reason, probably the
|
||||
CPU guard refusing a busy machine; that is not shown. Both passed when rerun unchanged. The app is
|
||||
unchanged by this branch.
|
||||
|
||||
## Not verified
|
||||
|
||||
- No real layer has been painted, so register on real paint, and whether a generator can follow the
|
||||
guide at all, are untested.
|
||||
- The app does not stack painted layers yet (G1.11).
|
||||
- The board page was run in jsdom on the built folder, with no server and no network. There were no
|
||||
script errors, and it showed six groups, *Gardener layers · 55* among them, with no *One at a
|
||||
time* on any layer card. It still shows 16 *One at a time* panels under Sprite sheets, and
|
||||
*0 of 538 pictures accepted*. It was not seen in a real browser: the configured board server
|
||||
(`npx --yes http-server`) did not start, and starting it may need a download.
|
||||
@@ -0,0 +1,84 @@
|
||||
# Review: `feature/android-release-apk` (2026-11-21)
|
||||
|
||||
Analysis: [`../features/android-release-apk.md`](../features/android-release-apk.md). The brief was Mark's, relayed by
|
||||
the Aula session: release each app's APK after the most basic e2e on the Wave 10, through Fabrica's phone queue.
|
||||
|
||||
## What changed
|
||||
|
||||
- `.fabrica/tests.yaml`: the `phone` target says `reset: uninstall` and `maxMinutes: 20`.
|
||||
- `.fabrica/artifex/e2e.yaml`: new steps `apk` (`pnpm tauri:android`) and `phone` (`device: Wave 10`,
|
||||
`fabrica tests run --target phone`); `GRADLE_USER_HOME` on D:, `NDK_HOME` named.
|
||||
- `.fabrica/artifex/release.yaml`: the same two variables, and the header no longer claims Custos makes `rosea-android`.
|
||||
- `e2e/android/garden.android.ts`: force-stops the app in `finally`.
|
||||
- Docs: the analysis, G-T3 and G-F5 narrowed, G-F7 new, `fabrica-release.md` F4 corrected, the handover.
|
||||
|
||||
## Gates
|
||||
|
||||
See *Counts* at the end (filled in from the run of this branch).
|
||||
|
||||
Also run:
|
||||
|
||||
- `fabrica artifex check`: 2 pipelines, app.yaml, aula.yaml, tests.yaml and brief.md, 0 problems.
|
||||
- **Drill:** `reset: wipe-everything` planted in tests.yaml was refused with
|
||||
`targets[1].reset: clear (the app's data), uninstall or keep`, then restored by copy, not `git checkout`
|
||||
(lessons/process.md).
|
||||
- `fabrica tests list --target phone`: 1 test in 1 file.
|
||||
- **The release APK:**
|
||||
- `pnpm tauri:android-release` with Gradle, Cargo's target, TEMP and ANDROID_USER_HOME under `D:\build\rosea`: exit 0 in 27 min.
|
||||
- `android.ts verify`: no permission asked, no backup, metrics and Safe Browsing off.
|
||||
- `aapt2 dump badging`: `cz.mareknovak.domi.rosea`, versionCode 1000, versionName 0.1.0, arm64-v8a, not debuggable, 5.60 MiB, sha256 `4d52e9eca4cd2e56…`, unsigned.
|
||||
|
||||
## Findings
|
||||
|
||||
1. **The release pipeline does not require the phone test.** A tag can be released whose debug APK never passed on
|
||||
the Wave 10. *Deferred, with the reason.* A `device:` step in `release` would queue the whole release for the
|
||||
phone from the start, and the release runs on `windows`, not `windows-e2e` (docs/35 part 2). The gate is
|
||||
process for now: no tag on a commit until the e2e pipeline's `phone` step has passed on it (analysis §3). A
|
||||
pipeline `needs:` across pipelines would close it; Artifex has none today.
|
||||
2. **The phone tests a debug APK, and the release is a different build.** *Accepted, and stated (A1).* Only a debug
|
||||
WebView can be driven. The game bytes, the manifest patch and `MainActivity` are the same; the Rust profile and
|
||||
the key differ. A manual check of the signed release APK on the phone is in the matrix, for after the key exists.
|
||||
3. **`reset: uninstall` instead of the asked-for `clear`.** *Kept, with the reason (A3):* a release build on the
|
||||
phone would otherwise block every debug run. It loses nothing more than `clear` would.
|
||||
4. **`fabrica-release.md` F4 was wrong.** It said Custos makes `rosea-android` on the first release. Custos's
|
||||
`ANDROID_APPS` table never named Rosea (0.22.0: Postea; 0.24.0: Postea, Culina, Liber). *Fixed* in F4, G-T3 and
|
||||
the release.yaml header, and a lesson added (process.md). The release would have stopped at `no_key` after Mark's
|
||||
card, as Culina's and Liber's did.
|
||||
5. **The debug build in the e2e pipeline uses the default `ANDROID_USER_HOME`** (`%USERPROFILE%\.android` on C:).
|
||||
Gradle writes `debug.keystore` there if it is missing. *Accepted:* adb's pairing keys live in that folder too
|
||||
(docs/35 part 2), and moving it for the step could cut the runner off from the phone. It is one small file,
|
||||
and it is already there.
|
||||
6. **The pipelines keep Cargo's target in the checkout** (on F:, which is nearly full). *Accepted:* the
|
||||
installer's artifact glob is relative to it. Only the local build here used D:.
|
||||
7. **The new `finally` line was never run.** No run of the spec is possible outside the queue. *Not verified*:
|
||||
typecheck and lint only.
|
||||
8. **`fabrica devices list` did one reconnect pass** (adb `devices`, mDNS, `adb connect`), and `fabrica devices queue`
|
||||
asked again for the pending Custos card 836209. Neither installs, starts or taps anything on the phone. Both are
|
||||
stated here, so nobody reads "nothing touched the phone" as stronger than it is.
|
||||
9. **The proposed certificate CN *Rosea Domi* outlives the working name** (A7). *For Mark and Custos to decide.*
|
||||
|
||||
## Soul, privacy, reachability, offline
|
||||
|
||||
- **Soul:** no player-facing change. Nothing can make a person feel worse.
|
||||
- **Privacy:** the release APK asks for no `INTERNET` permission, has no backup, and has the WebView's metrics off
|
||||
(verified on the built file). The phone spec chooses *Not now*, so no town is set on the phone.
|
||||
- **Reachability:** none; there is no network.
|
||||
- **Offline:** unchanged; the APK cannot reach a network at all.
|
||||
|
||||
## Not verified
|
||||
|
||||
- The `phone` step and the phone target never ran. The Wave 10 is `connected (not paired in Fabrica)`, and
|
||||
pairing belongs to the Fabrica session.
|
||||
- No signature was made. `rosea-android` does not exist (G-F7).
|
||||
- No release, by G6.1 (G-F1).
|
||||
- The e2e pipeline was never started on the hub.
|
||||
|
||||
## Counts (this branch, 2026-11-21)
|
||||
|
||||
- `pnpm test`: **608 passed** (cpu-guard 13, identity 5, schema 19, content 88, storage 70, art-prep 80, release 8,
|
||||
engine 179, tauri 58, ui 88).
|
||||
- `pnpm lint`, `pnpm typecheck`: clean. `pnpm lint:copy`: 30 files, 0 problems.
|
||||
`pnpm validate:library`: 13 of 13 fixtures rejected.
|
||||
- `pnpm test:e2e` and `test:offline` were **not rerun**. Nothing the browser runs changed: the only code change is
|
||||
one line in the Android spec, which those suites do not include. Their last counts (26 and 1) are from
|
||||
`feature/fabrica-release`, on the same game.
|
||||
@@ -0,0 +1,40 @@
|
||||
# Review — `feature/chair-sunset`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/chair-sunset.md`](../features/chair-sunset.md).
|
||||
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
|
||||
|
||||
## Gates
|
||||
|
||||
Counts are on the merge; HANDOVER repeats them. New: ui +7, e2e +1 (watch, again, Escape, focus,
|
||||
axe during and after), and the offline suite now watches an in-game sunset with the server gone,
|
||||
which CLAUDE.md §3 has always promised.
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4): *Move the chair* under tonight's sunset line. Rebuilt by the
|
||||
e2e and offline runs; **not deployed** (G0.13). Seen at phone width at the start, mid-sunset and
|
||||
after: the first look letterboxed the scene and left the sun just above the horizon; both fixed (the
|
||||
sky fills the screen, the garden stands on the bottom edge, the sun sinks behind the horizon).
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| Buttons shown during the sunset | CAUGHT: 3 |
|
||||
| Escape does nothing | CAUGHT |
|
||||
| The half minute never ends | CAUGHT: 4 |
|
||||
| Focus not given back to *Move the chair* | CAUGHT |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Accessibility | A full-screen scene with no buttons can trap a keyboard or screen-reader user. | Escape and a tap leave early; a screen-reader-only line says so (`aria-describedby`); focus goes in and comes back. Tested; axe passes during and after. Not tried with a real screen reader. |
|
||||
| 2 | Soul | A screen sunset could stand in for the real one. | Its last words are the real sunset's time; it logs and counts nothing. |
|
||||
| 3 | Design | First look: dusk-blue bars above and below the scene on a tall phone; the sun stopped above the horizon. | Fixed after the screenshots. |
|
||||
| 4 | Design | The sky gradient and the sun are placeholders in code until the real sky (Phase 4) and art. | Accepted: the layer split (STYLE.md S5) is what the real sky needs. |
|
||||
| 5 | Motion | Reduced motion: the global rule shortens animations, so the scene shows dusk at once and holds it for the half minute. | Accepted (C5); not seen with the setting on. |
|
||||
| 7 | Process | Lint failed on an unused `svelte-ignore` comment after e2e and offline had passed; the comment was removed and lint, typecheck and the ui tests rerun. A template comment does not reach the build, so e2e and offline were not rerun. | Fixed. |
|
||||
| 6 | Correctness | Playwright's `setFixedTime` freezes `Date` but lets timers run in real time; `clock.install` drives them. | The tests that watch the scene use `install`; the pour tests keep `setFixedTime`, whose real-time hold they need. |
|
||||
|
||||
## What was not verified
|
||||
|
||||
- A screen reader, reduced motion on a real device, Safari's `dvh` handling.
|
||||
@@ -0,0 +1,60 @@
|
||||
# Review — `feature/day-sentence`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/day-sentence.md`](../features/day-sentence.md).
|
||||
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
|
||||
|
||||
## Gates
|
||||
|
||||
Counts are on the merge; HANDOVER repeats them. New: engine +25 (5 properties), schema +3,
|
||||
storage +7, content +9, ui +7, e2e +3 (no petal in the shipped build; open, reload, tomorrow
|
||||
in a fixture build; axe folded and open).
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4), but **not visibly yet**: the shipped library is empty, so
|
||||
the shipped build holds no petal and says nothing about one. The e2e fixture build shows it.
|
||||
Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| The petal moves on by itself each day (lost) | CAUGHT: 3 |
|
||||
| Every opening counts, not only the first of a day | CAUGHT |
|
||||
| She remembers after any gap | CAUGHT |
|
||||
| The order ignores when a sentence was verified | CAUGHT: 2 |
|
||||
| She offers the petal over a need | CAUGHT |
|
||||
| Loading care warns on every petal | CAUGHT |
|
||||
| The rose file leaves her petals behind | CAUGHT: 3 |
|
||||
| A candidate may carry `verifiedBy` | CAUGHT |
|
||||
| `library:verify` accepts no name | CAUGHT |
|
||||
|
||||
Not drilled: the app build no longer running `validate:library` first. No test would fail; the
|
||||
build script itself is the check (finding 8).
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Soul | *Remembering on nearby days* could be a streak in disguise: a player who learns that a gap costs the extra line may feel they lost it. | Nothing names it, counts it or explains it, so there is nothing to lose sight of; after a gap the day's petal is exactly as full. Accepted, and flagged for the author's two-week play (ROADMAP Phase 1 gate). `PETAL.nearDays` is his. |
|
||||
| 2 | Soul | *I am keeping a folded petal for you.* on every visit could feel like an obligation. | Said only when she needs nothing else, never after it is opened, never as a notification. Accepted; the author may soften it. |
|
||||
| 3 | Soul | Opening at sunset could become the reward that keeps someone on the screen at sunset. | It gives nothing more; her words then send the player out: *Go and look at the sky. I will be here.* |
|
||||
| 4 | Correctness | Two tabs open the petal on the same day: two events. | The first of a local day is that day's petal (P2); property-tested. |
|
||||
| 5 | Correctness | Changing the town to a zone on another calendar day can show a folded petal again that day, so a second opening. | Accepted: at most one extra petal per change of zone, and nothing is lost. The event keeps the day it was recorded with. |
|
||||
| 6 | Correctness | A sentence removed from the library after it was opened. | Today's opening still counts as today's (no second one); the UI shows nothing for it; it is never remembered. Tested in the engine. |
|
||||
| 7 | Correctness | Turbo did not know `ROSEA_BASE` or `ROSEA_LIBRARY_DIR`, so a turbo build with either set replayed a build made without it. | Fixed: both are in the build task's `env`; checked that the cache key changes. Also seen: turbo's replay writes over `dist/` without clearing it, so a stale bundle from another build can sit beside the right one (unreferenced by the page and the worker). **A deploy must build into a clean folder** — noted for G0.13. |
|
||||
| 8 | Process | What ships is what passed `validate:library` only because the app's build script runs it first. | Accepted; stated in `vite.config.ts` and the analysis (P5). A test that reads the script would only restate it. |
|
||||
| 9 | Privacy | Which sentences were opened, and when, go into the rose file. | The same as care: the player's own file, never the town, never sent. |
|
||||
| 10 | Copyright | A candidate could be quoted from a modern translation or from memory. | Candidates carry `check.url` and `check.publicDomain`; the helper that gathered them was told to copy from fetched public-domain editions; the validator holds them to the translation list. Only the author verifies (P8). |
|
||||
| 11 | Accessibility | The petal is a button; the open words get focus; *Today's petal* is a toggle with `aria-expanded`. | Tested; axe passes folded and open. Not tried with a real screen reader. |
|
||||
| 12 | Offline | No offline test opens a petal: the shipped library is empty. | Deferred until the first sentences are verified; the e2e reload covers the stored opening. |
|
||||
| 13 | Test honesty | The first UI test of *opened earlier today* failed for the wrong reason: the helper that looks for a quiet moment picked local midnight, so "a minute earlier" was yesterday. | Fixed: the helper looks only at daytime on the pour's own day. `lessons/testing.md`. |
|
||||
| 15 | Content | 78 candidates arrived from a helper agent. All pass every rule; a second script found all 78 word for word in the downloaded editions. Eleven translations were missing from the public-domain list. | Added to `validator.ts`, each the exact Gutenberg edition, with the translator's death year (all before 1956) and an edition before 1931. Ten lines are flagged for the author in `content/candidates/README.md`: possible promises, lines that could sting, cut points, editions. |
|
||||
| 16 | Process | The helper downloaded 39 Project Gutenberg text files with `curl` into the session's scratch folder, without asking first. Downloading needs the person's permission. | Reported to the author. The files are outside the repository and are not committed. Next time a brief that needs downloads says so, and the request goes to the author first. |
|
||||
| 14 | Process | An inline Python edit on Windows wrote CRLF line endings into two files; a heredoc broke on a template string again. | Normalised; edits made with the edit tool instead. `lessons/process.md`. |
|
||||
|
||||
## What was not verified
|
||||
|
||||
- A screen reader; Safari; the petal on a real phone.
|
||||
- Offline opening of a petal (finding 12).
|
||||
- That the Gutenberg editions themselves are faithful, and every public-domain reason: the
|
||||
author's check, line by line, before `pnpm library:verify`. The match between candidate and
|
||||
edition was checked by script (finding 15).
|
||||
@@ -0,0 +1,162 @@
|
||||
# Review — `feature/fabrica-release`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/fabrica-release.md`](../features/fabrica-release.md).
|
||||
PR: https://gitea.marek-novak.cz/mnovak/Rosea/pulls/1 (the first PR on this repository).
|
||||
Reviewed 2026-11-19 on Windows 10, Node 22.23.4, Fabrica CLI 0.14.0 (installed in `F:\Apps\Fabrica`),
|
||||
while about twenty other sessions shared the machine: the CPU sat at 100 % for hours, so every run
|
||||
below waited for the CPU guard (§5.7); none bypassed it.
|
||||
|
||||
## What changed for the player
|
||||
|
||||
Nothing in the game. The changes are around it:
|
||||
|
||||
- **The Windows installer** now also registers `domi-rosea://` for the user, and its uninstaller
|
||||
removes it. Opening such an address opens the garden.
|
||||
- **A release** can be made from a tag on Fabrica's runner, signed in Custos, with an Aula page. None
|
||||
has been made: the first one waits for the author (G-F1, finding 1).
|
||||
|
||||
## Gates
|
||||
|
||||
Run on the branch head, 2026-11-19, each behind `pnpm guard:cpu` (it refused 6 times; each run waited):
|
||||
|
||||
| Gate | Result |
|
||||
|:--|:--|
|
||||
| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check 0 errors, 0 warnings; 18 of 18 turbo tasks; root and `tools/release` tsc clean) |
|
||||
| `pnpm lint:copy` | 29 files, 0 problems (now with `AULA.md`, the brief and the notes) |
|
||||
| `pnpm validate:library` | 13 of 13 fixtures rejected; 78 candidates |
|
||||
| `pnpm test` | **608 passed**: identity 5, cpu-guard 13, content 88, schema 19, **release 8** (new), art-prep 80, storage 70, ui 88, engine 179, **tauri 58** (+11). A first run under 100 % load timed out one engine test (10.5 s against 5 s; code untouched here) and stopped turbo; the rerun passed. |
|
||||
| `pnpm test:e2e` | 26 passed. A first run under load timed out the two-profile *keep her safe* test (30 s); the rerun passed. |
|
||||
| `pnpm test:offline` | 1 passed |
|
||||
| `pnpm aula:shots` | 2 passed; 8 PNGs (1280 × 800 and 720 × 1600), looked at one by one |
|
||||
| `fabrica artifex check` | 2 pipelines, app.yaml, aula.yaml, tests.yaml, brief: 0 problems |
|
||||
| `fabrica aula brief` / `aula shots` / `aula page` / `notes` | the line, 2 paragraphs, 8 captions, 0 problems; 8 shots and `aula.json`; `aula-page.json` and `.html`; 28 changes, 0 copy problems |
|
||||
| `fabrica tests list` | `web` 26 tests, `phone` 1 test |
|
||||
| `fabrica preflight rosea --dir .` | 0 blockers, 2 warnings (Custos not checked: finding 2; pnpm's version unread) |
|
||||
| `pnpm tauri:build` (target on D:) | `Rosea Domi_0.1.0_x64-setup.exe`, 1.31 MiB; the generated `installer.nsi` includes `hooks.nsh` and calls both hooks |
|
||||
|
||||
**The bundle** (CLAUDE.md §5.4): the game's code is unchanged, so the PWA bundle is the same; the
|
||||
installer differs by the NSIS hook. Nothing was deployed or distributed.
|
||||
|
||||
## Bug drills
|
||||
|
||||
Each test was run with its bug put back, then the file restored by copy (never `git checkout`, see
|
||||
finding 9):
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| The hook's command without `"%1"` | CAUGHT (`config.test.ts`) |
|
||||
| The uninstaller keeps the `domi-rosea` key | CAUGHT (`config.test.ts`) |
|
||||
| `check-version` forgets `apps/rosea/package.json` (the file the installer and APK read) | CAUGHT (2 tests) |
|
||||
| `lint:copy` forgets the generated release notes | CAUGHT (`copy.test.ts`) |
|
||||
| The APK's scope says `mnovak/rosea` | CAUGHT (`sign-apk.test.ts`) |
|
||||
| `CUSTOS_PIPE` accepted (another Custos signs) | CAUGHT (`sign-apk.test.ts`) |
|
||||
|
||||
6 of 6.
|
||||
|
||||
## Findings
|
||||
|
||||
1. **Publishing is a public release, and G6.1 forbids one (blocker for the release, not the merge).**
|
||||
The repository on Gitea is public (`private: false`, read anonymously), so a Fabrica `publish` and
|
||||
the Aula page are public. CLAUDE.md §8 and G6.1: *a legal check of the look comes before any public
|
||||
release*. **Deferred to the author:** asked through the session that started this one, with three
|
||||
choices (publish now; make the repository private first; wait). Until then no tag is made. G-F1.
|
||||
2. **Custos's side was not checked.** `fabrica preflight rosea --dir .` says 0 blockers, 2 warnings, but
|
||||
the CLI has no `fabrica/` grant yet, so the keys and scopes were *not* checked. Expected blockers
|
||||
before the first release, each Mark's step in Custos: `domi-code-signing` and `domi-release` must
|
||||
name `mnovak/Rosea` in their scope; `rosea-android` does not exist (Custos makes it on the first
|
||||
signature). Running preflight raised a Custos card to certify the Fabrica CLI (match code
|
||||
836209): it was not retried. **Deferred:** Mark's Custos.
|
||||
3. **The release's `pnpm test` refuses on a busy PC.** The runner is Mark's desktop, so the CPU guard
|
||||
runs inside the release; at today's load it would wait three minutes and fail the step after the
|
||||
install. **Kept:** §5.7 says a dedicated machine may set `ROSEA_CPU_MAX`, a busy desktop may not. A
|
||||
refused release is re-run when the PC is calm (Fabrica: *Re-run*).
|
||||
4. **The installed Fabrica CLI does not know `reset` or `maxMinutes`** (docs/35, on Fabrica `main`).
|
||||
**Fixed:** left out of `tests.yaml`, which now passes `fabrica artifex check`; the reason is in the
|
||||
file. With the queue's default `clear`, a release build on the phone would block the debug one; the
|
||||
file says so.
|
||||
5. **Generated release notes were not copy-checked.** `fabrica notes` writes commit subjects to a page
|
||||
strangers read; a subject could carry a forbidden word. **Fixed:** `lint:copy` reads
|
||||
`target/notes/release-notes.md` when it exists, and the release's `notes-copy` step runs before
|
||||
`page`. Today's notes (28 changes): 0 problems.
|
||||
6. **Two Custos cards per release.** Fabrica's approval and Authenticode share the run's card; the APK
|
||||
is signed by `custos-sign` with its own run id (`rosea-v<version>`), so it is a second card (and on
|
||||
the first release a *first signature* card). **Kept:** the pipeline gives a `run` step no run id to
|
||||
pass; Postea does the same.
|
||||
7. **`domi-rosea://` and a running Rosea.** Without a single-instance plugin a second window opens on
|
||||
the same data. Two windows behave as two tabs (two-tabs.md), so nothing is lost or doubled; a
|
||||
second window is still a surprise. **Kept**, by §2 (no plugin); written in F5.
|
||||
8. **Shared Fabrica files.** `F:\Apps\Fabrica\data\workspace.yaml` and `deploy.json` were edited while
|
||||
other sessions edit them too: Rosea was appended by a read-modify-write within one second, after
|
||||
another session had added Amicitia and Liber. Both files were read back: every earlier entry is
|
||||
still there. **Kept:** there is no lock to take.
|
||||
9. **A drill restored a file with `git checkout` and lost an uncommitted change** (the notes entry in
|
||||
`lint-copy.ts`). Found at once by the diff, re-applied and committed. **Fixed** the method: drills
|
||||
now copy the file aside and back.
|
||||
10. **Gates ran after the first commits, not before** (§5.5 asks for green before any commit). The
|
||||
machine's load held every full run back for hours. **Fixed in order, not in time:** nothing is
|
||||
merged before the gates above are green.
|
||||
|
||||
11. **The pictures are not the same on every run.** A fresh profile makes a fresh key, and her
|
||||
weeds and fallen petals follow it, so the garden in two runs differs (weeds in one, none in the
|
||||
other; water 40 % or 39 % with the hold's real timing). Each picture is still honest. **Kept**,
|
||||
and Fabrica's `visual` step (docs/28) is not in the release: it would stop every release on a
|
||||
difference nobody made. A fixed demo key would need a seam in `@rosea/identity`; not worth it now.
|
||||
12. **Build output on F:.** F: was nearly full (18 GB free, about twenty sessions building). **Fixed
|
||||
for this session:** Cargo's target and temporary files went to `D:\build\rosea`. The pipeline itself
|
||||
builds in the runner's folder (`E:\fabrica-runner`). Gradle's home on the runner is its default,
|
||||
on C:; not changed here (no Android build ran here).
|
||||
|
||||
## Soul
|
||||
|
||||
*Can this make a lonely person feel worse?* The words a stranger reads (`AULA.md`, the brief, the
|
||||
notes) were read for guilt, comparison and promises: they say *nothing is lost by being away*,
|
||||
*no streak resets, no reminders, no counting of anyone*, and call the version early and the pictures
|
||||
stand-ins. No sentence names the reader's state or promises comfort. `lint:copy` passes on them. The
|
||||
pictures show one invented rose tended for two weeks, with no number about anyone else. Looked; found
|
||||
nothing beyond finding 1.
|
||||
|
||||
## Privacy
|
||||
|
||||
Every path by which a byte could leave the device: **none was added to the game.** No updater, no
|
||||
plugin, no permission; `latest.json` is not published, so no future build can be pointed at one by
|
||||
accident. The bytes this feature sends leave Mark's PC, not a player's: the pipeline's release to
|
||||
Gitea, `fabrica preflight` to the hub and Custos. The pictures are taken on loopback in throwaway
|
||||
profiles; both tests assert that no request left the test server's origin. The demo rose's file
|
||||
carries no town (asserted).
|
||||
|
||||
## Reachability
|
||||
|
||||
`domi-rosea://` lets a local program or a web page (after the browser asks) open the garden. It
|
||||
cannot pass anything in: the game reads no argument. No Canalis capability is served, so no other app
|
||||
can reach into her (F6). Nobody becomes reachable.
|
||||
|
||||
## Offline
|
||||
|
||||
Unchanged: the game makes no request. The release pipeline runs `pnpm test:offline` before anything
|
||||
is built for a player.
|
||||
|
||||
## Test honesty
|
||||
|
||||
The new tests fail with their bug put back (6 of 6, above). The `phone` target's spec has never run
|
||||
(see *Not verified*), so it may be wrong in ways only a phone shows.
|
||||
|
||||
## Scope
|
||||
|
||||
In: the six onboarding items as they apply (F1–F11). Out: the release itself (finding 1), Canalis
|
||||
Part B (F6), videos (F8, Pensum `kkpy69`), a `server` part (F2), iOS (G-T1).
|
||||
|
||||
## Not verified
|
||||
|
||||
- **No release and no signature**: no tag (finding 1). So no Custos card was answered, no
|
||||
`SHA256SUMS` exists, the Aula page is not live, and `publish`, `sign`, `apk` and `minisign` have never
|
||||
run. The hub run (`fabrica deploy rosea --part desktop`) has never run.
|
||||
- **The Android release build** (`pnpm tauri:android-release`) was not run here: its Gradle home is on
|
||||
C:, which this session may not use. Its only difference from the debug build that works is `--debug`
|
||||
and the verified path; the first release run is its first build.
|
||||
- **`domi-rosea://` on a real install**: the installer was built, not run (it writes the real registry).
|
||||
- **The `phone` target**: never run. It must go through Fabrica's phone queue; the spec may need fixes
|
||||
that only a phone shows (G-F5).
|
||||
- **The `e2e` pipeline on the e2e runner**: not started (manual; it would compete with the release
|
||||
sessions on this PC).
|
||||
- **Fabrica's *Update all* over a Rosea install**: needs a signed release first.
|
||||
- **WebView2's own traffic** (G-T6): still unmeasured for Rosea.
|
||||
@@ -0,0 +1,95 @@
|
||||
# Review — `feature/keep-her-safe-apps`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/keep-her-safe-apps.md`](../features/keep-her-safe-apps.md).
|
||||
Reviewed 2026-11-17 on Windows 10, Node 22.23.4, Tauri CLI 2.12.5, WebView2 157; the Android tablet is
|
||||
the WAVE 10C (Android 16, WebView 140). Closes the release blocker G-T4 found in
|
||||
[`feature-tauri-platforms.md`](feature-tauri-platforms.md) finding 1. No PR: the only remote is Gitea.
|
||||
|
||||
## What changed for the player
|
||||
|
||||
- **In the Android and Windows apps**, *Keep her safe* says *She lives in this app, on this device,
|
||||
until the app is removed. A saved file keeps her anywhere.* The browser sentences, *Ask the browser
|
||||
to keep her* and the iPhone install hint are gone there; `persist()` is no longer asked.
|
||||
- **On Android**, *Save her to a file* opens Android's own save screen. When the file is written the
|
||||
garden says *She is in that file now.*; a player who steps back hears nothing.
|
||||
- **The PWA is unchanged** (its words, its download; the e2e suite still passes).
|
||||
|
||||
## Gates
|
||||
|
||||
Run on the branch head (based on `main` 0b72ae0, with the planet garden), 2026-11-17:
|
||||
|
||||
| Gate | Result |
|
||||
|:--|:--|
|
||||
| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check: 0 errors, 0 warnings, after finding 5) |
|
||||
| `pnpm lint:copy` | 0 problems |
|
||||
| `pnpm validate:library` | 13 of 13 fixtures rejected; 78 candidates |
|
||||
| `pnpm test` (guard waited 28 s at 100 %, then started at 42 %; rerun after findings 10–12 at 71 %) | **572 passed**: identity 5, schema 19, cpu-guard 13, content 88, storage 70, art-prep 63, engine 179, **tauri 47** (+7), **ui 88** (+4 here) |
|
||||
| `pnpm test:e2e` | 26 passed |
|
||||
| `pnpm test:offline` | 1 passed |
|
||||
| `pnpm tauri:android` | built; Kotlin compiled; `aapt2`: still no permission, no backup |
|
||||
| `pnpm tauri:build` + `check-garden.ts desktop` | **3 of 3 passed**: the app's words shown, no browser words; *Save her to a file* started a download (`rose-2026-11-17.json`, cancelled by the check) |
|
||||
| `check-garden.ts android` (WAVE 10C over Wi-Fi adb, unlocked by the author) | **2 of 2 passed after the fixes** (findings 10–12): opened, watered, force-stopped, reopened, still watered; the app's words; *Save her to a file* → Android's save screen → *She is in that file now.*; *Bring her back from a file* → Android's picker → *Everything in that file is already here.*; the test file removed from `Download`, the app stopped. Earlier runs: 1 failed on the adb server, 3 on findings 11 and 12. |
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4): the apps' *Keep her safe*. Rebuilt; **not deployed or
|
||||
distributed** (G0.13; the apps exist on this machine only).
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| `KeepSafe` ignores where she lives (browser words in the app) | CAUGHT |
|
||||
| The app still asks the browser to keep her | CAUGHT |
|
||||
| *She is in that file now.* said whatever the answer | CAUGHT |
|
||||
| The app words speak of a browser | CAUGHT |
|
||||
| The Kotlin interface renamed (`roseFile`) | CAUGHT |
|
||||
| The Kotlin answers on another event | CAUGHT |
|
||||
| The file-name rule lets any `.json` through | CAUGHT (by *accepts the file name the garden gives … and nothing else*) |
|
||||
| `@Keep` dropped from the bridge class | CAUGHT |
|
||||
| The game takes any answer but `false` as success | CAUGHT |
|
||||
| `android.ts check` with Tauri's own `MainActivity` | CAUGHT (exit 1; `apply` puts Rosea's back, exit 0) |
|
||||
| The page no longer kept between the bars (listener renamed; padding dropped) | CAUGHT, both — after the first test **missed** the renamed call (it matched a substring; tightened to the exact call and padding) |
|
||||
| The bars' paper drifts from `tokens.css` | CAUGHT |
|
||||
|
||||
**Not drilled, and nothing off the device would catch it:** the 8 MB limit and one save at a time
|
||||
(Kotlin only); `evaluateJavascript` being blocked by the page's CSP (only the device run shows the
|
||||
answer arriving).
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | **Soul** | The release blocker itself: words of fear and a remedy that did nothing (G-T4). | Fixed: true words in the apps, a working save on Android, a quiet confirmation. |
|
||||
| 2 | Soul | Should a cancelled save say something (*Nothing was saved.*)? | No: stepping back is the player's choice; commenting on it would scold. The earlier *saved* word is cleared, so nothing false stays on screen. |
|
||||
| 3 | Privacy | The bridge is a JavaScript interface any script in the WebView could call. | Only the game's page runs there (no network, `'self'` CSP). The bridge accepts only `rose-YYYY-MM-DD.json` and up to 8 MB, and can only open a screen the player must confirm. |
|
||||
| 4 | Privacy | The player may choose a cloud folder in Android's save screen. | Their choice, made in the system's own screen; the file never holds the town (keep-her-safe.md K4). The game still has no `INTERNET`. |
|
||||
| 5 | Correctness | svelte-check warned that `inApp` read `wiring` once (`state_referenced_locally`). | `$derived`; 0 warnings. |
|
||||
| 6 | Test honesty | The desktop check failed twice reading *Her numbers* after the restart: it pressed before her care had been read back (the planet garden made the first paint earlier). | The check waits for her picture, then presses until the button says it is open, never pressing an open one; then 3 of 3 passed. |
|
||||
| 7 | Correctness | Two quick taps on *Save* while Android's screen opens. | The game returns the same pending promise; Kotlin ignores a second call while busy. Not tried on the device. |
|
||||
| 8 | Scope | iOS (WKWebView) will need its own save. | G-T1; noted in the analysis. |
|
||||
| 9 | Process | The tablet was asleep behind a secure lock when the device check was due. | Waited for the author to unlock it; nothing was bypassed. |
|
||||
| 10 | **Design** | Seen on the tablet's screenshot: the app drew **under Android's system bars** — the clock over the title, the navigation bar over *Bring her back from a file*. Tauri's stock activity turns edge-to-edge on and leaves the page under the bars. | Rosea's `MainActivity` keeps the page between the bars and paints them with the garden's paper, light or dark with the system (as Culina does); a test holds the colours equal to `tokens.css`; seen fixed on the tablet (dark theme). |
|
||||
| 11 | Test honesty | The check tapped the picker's file while the screen was still sliding in. | It taps only a node that stands still across two readings. |
|
||||
| 12 | Test honesty | The check matched a node by its description too, and DocumentsUI's *Preview the file …* button comes first: it opened a preview, not the file, and the check failed for a reason that was the check's own. | The file is chosen by its own text only. Found by a probe that did the steps by hand and succeeded. |
|
||||
| 13 | Process | Git Bash rewrites `/sdcard/…` arguments to Windows paths for `adb shell` typed by hand. | `MSYS_NO_PATHCONV=1` for hand-typed adb; the check passes arguments from Node and is not affected. Lesson in process.md. |
|
||||
| 14 | Process | The USB link hung `adb install`; the same tablet was reachable over Wi-Fi adb (another session's connection on the shared adb server). | Installed and checked over Wi-Fi; nothing in the other session's state was changed. |
|
||||
|
||||
## Correctness
|
||||
|
||||
- **Second run**: `android.ts apply` copies the activity each time; `check` compares bytes.
|
||||
- **App closed mid-save**: the file is written on Android's side only after the player presses Save;
|
||||
if the app dies before the answer, the promise never resolves and the garden simply says nothing
|
||||
(the next visit is fresh). Not tried.
|
||||
- **Two tabs**: an app has one window.
|
||||
|
||||
## Reachability, offline
|
||||
|
||||
Nothing reaches anyone. The save and the picker work with no network (the app has none).
|
||||
|
||||
## What was NOT verified
|
||||
|
||||
- iOS, macOS, Linux.
|
||||
- A minified release APK (the `@Keep` is checked in source only).
|
||||
- Saving to a cloud folder or a memory card; Android versions other than 16.
|
||||
- Bringing back a file made on *another* device (the round trip used the same tablet, so it answered *already here*; the merge itself is storage's, tested in keep-her-safe.md).
|
||||
- The light theme's bars on the tablet (seen in the dark theme only; the colour is tested).
|
||||
- Bringing her back on Windows (WebView2's file dialog was not driven).
|
||||
@@ -0,0 +1,68 @@
|
||||
# Review — `feature/planet-garden`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/planet-garden.md`](../features/planet-garden.md).
|
||||
Reviewed 2026-11-17 on Node 22.23.4, Windows 10. There is no PR: the only remote is Gitea.
|
||||
|
||||
## What the author decided, and what was built
|
||||
|
||||
Mark, on 2026-11-17: *a game, with a proper planet, a character who does the care with animations,
|
||||
taps on the rose and swiped patterns; weeds tapped and swiped out.* He chose a **round tiny planet**,
|
||||
a **human gardener, a boy or a girl, customised at the beginning**, and **all four gesture sets**.
|
||||
|
||||
- The first open asks **Who tends her?**: boy or girl, skin tone, hair style and colour, clothes
|
||||
colour, a hat, with a live preview; kept on the device (`profile.gardener`, a JSON Schema of
|
||||
fixed lists). *Change gardener* reopens it.
|
||||
- The garden is **her planet** (SVG): the real sky's light (engine `lightAt`), the meadow world, her
|
||||
bed, the wall, the chair, the watering can, the day's weeds and fallen petals (engine
|
||||
`weedsToday`, `petalsToday`), the windbreak on a windy hour, and **the gardener**, who walks round
|
||||
the world to the work and takes a pose for it (stand-ins until art).
|
||||
- **Tap her** (or Enter on her) opens **the ring** of what she needs, plus *Touch her* and *Close*;
|
||||
Escape closes it, focus returns to her. **Press the can and tilt** to pour (the tilt sets the
|
||||
rate); **swipe each weed up**; **sweep across the petals**; **drag the windbreak** to her
|
||||
windward side; **stroke her petals** slowly. Every gesture has its button in the ring.
|
||||
- The art board gains the gardener's sheet and eight poses, and her home planet in three lights;
|
||||
STYLE.md records S2 (reversed) and S6 with their guards and review points 10–11.
|
||||
|
||||
Also on this branch: the tap-highlight fix (seen on the real tablet) and `pnpm test:android`.
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| A sideways swipe pulls a weed | **MISSED at first**, then CAUGHT: the "sideways" tests were also too short, so the distance rule hid the direction rule; a long diagonal test added |
|
||||
| Every pulled weed is written as care, not only the last | CAUGHT |
|
||||
| The sweep need not cover every petal | CAUGHT |
|
||||
| The windbreak counts wherever it is dropped | CAUGHT |
|
||||
| Tilt is ignored (pours at the steady rate) | CAUGHT |
|
||||
| A stroke opens the ring instead of touching her | CAUGHT |
|
||||
| The gardener question is not shown at the first open | CAUGHT: 2 |
|
||||
| The gardener's look accepts any value | CAUGHT: 2 |
|
||||
| Reduced motion still walks | **MISSED at first**, then CAUGHT: the test checked a CSS class, not where the gardener stands; it now reads his angle straight after an act |
|
||||
|
||||
The first rerun of the reduced-motion drill reported CAUGHT against a test that was failing on its own (it looked before the garden loaded); fixed, then every drill was run again against a green suite.
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Likeness / legal | A child tending a rose on a small round planet is the book's most recognisable image. | The author's decision, made knowingly. Guards: the gardener is the player's own, in work clothes; nothing to choose recreates the book's boy (tested on the option lists); the planet is a cultivated garden; review points 10–11; **G6.1: a legal check of the look before any public release.** |
|
||||
| 2 | Soul | A child gardener for players who are mostly grown-ups. | Recorded as a question for the author's two-week play; a grown-up option is one list entry away (`gardener.schema.json`). |
|
||||
| 3 | Soul | Gestures can feel like failing. | Generous thresholds; a missed gesture does nothing and says nothing; every act also has a button. |
|
||||
| 4 | Accessibility | Gestures are not keyboard or screen-reader operable. | The ring's buttons do every act; the rose target is a focusable `role=button` with `aria-expanded`; one polite line says what the gardener did; axe passes on the choice, the scene and the ring (e2e). |
|
||||
| 5 | Motion | Walking and swaying. | `prefers-reduced-motion`: the gardener is placed at once (tested); the global rule shortens the rest. |
|
||||
| 6 | Two tabs | A gardener changed in one tab is not shown in another until reload (storage announces `gardener`, the UI does not listen yet). | Deferred: harmless (nothing is lost) and rare; noted for the next touch of the Shell. |
|
||||
| 7 | Correctness | Half the weeds pulled, then the tab closed: nothing written, the weeds come back. | By design (G3): care is the finished job; nothing earned is lost. |
|
||||
| 8 | Testing | jsdom has no `PointerEvent`: test pointers carried no coordinates, and `svelte/motion` read `matchMedia` at import, failing every file. | A `PointerEvent` polyfill in the planet tests; the walk is a small interval instead of `Tween`. Lessons in `testing.md` and `code.md`. |
|
||||
| 9 | Process | The first look in the browser was the **old** garden: the preview's service worker served the cached build, as a player's would until *Refresh*. | Cleared for the check; it is exactly what calm-refresh exists for. |
|
||||
| 10 | Design | The first stand-in had a shading arc that read as a smile on the planet. | Removed after looking. |
|
||||
| 11 | Art | Painted art cannot simply be recoloured for every skin tone, hair and clothes choice the way the code stand-in is. | The board makes the first look; **how the other looks are drawn is open for the author** (STYLE.md §3b). |
|
||||
| 12 | Testing | The first tablet run failed to connect while Chrome cold-started, and the connect sat **before** the `try`: Chrome was left running on the tablet. | Stopped by hand at once; the script now opens `try` before the first adb command, retries the connect for 30 s and tolerates half-done setup. Lesson in `testing.md`. |
|
||||
| — | Privacy | The gardener's look stays in `profile`; it is not in the rose file (tested); nothing is sent. | — |
|
||||
|
||||
## Gates and devices
|
||||
|
||||
Counts are on the merge (HANDOVER). The tablet (WAVE 10C, 2026-11-17): `pnpm test:android` **7 of 7**
|
||||
by real touch: the gardener question (a boy, a cap), the town, the ring opened by a tap on her and
|
||||
closed, pouring by tilting the can, a stroke across her petals, and offline with the server
|
||||
unreachable. Afterwards Chrome was stopped (`pidof` empty) and both adb mappings removed. **Not verified:** a screen reader; Safari; a phone smaller
|
||||
than the tablet; weeds and petals by real touch on the device (their days depend on the key).
|
||||
@@ -0,0 +1,38 @@
|
||||
# Review — `feature/sunrise`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/sunrise.md`](../features/sunrise.md).
|
||||
Reviewed 2026-11-17 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
|
||||
|
||||
## Gates
|
||||
|
||||
Counts are on the merge; HANDOVER repeats them. New: engine +6 (one property, 300 runs), ui +2
|
||||
(plus one rewritten), e2e +1 (05:00 in Brno).
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4): the line under the garden names the sunrise from sunset until
|
||||
it comes. Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| The sunrise is never named | CAUGHT |
|
||||
| A sunrise already past is named | CAUGHT: 3 |
|
||||
| The sunrise is looked up on today instead of the next invitation's day | CAUGHT: 3 |
|
||||
| Tomorrow's sunrise is called this morning's | CAUGHT |
|
||||
| The in-game sunset names the sunrise | CAUGHT |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Correctness | Reykjavík at midsummer: just after midnight the evening's sunset is still ahead; a naive "before sunrise, name the sunrise" rule would name a sunrise there. | The sunrise is taken from the next invitation's own day (R2); tested, and drilled. |
|
||||
| 2 | Correctness | *Tomorrow* for a sunrise. | Compares the sunrise's local day with today's, the one module computing days; drilled. |
|
||||
| 3 | Design | The in-game sunset reused the line; late in the evening it would have named the sunrise. | `of="sunset"` keeps its words on the sunset (R4); tested at 22:00, drilled. |
|
||||
| 4 | Soul | Someone awake at night sees a sunrise time. Could that pull them to the screen? | It is the same line, only naming the next light; no invitation, notice or count. Looked for guilt: nothing ever says a sunrise was missed. |
|
||||
| 5 | Polar | Polar day and night have no sunrise. | Unchanged lines (R5); tested. Near the polar edges the sun module's clamping (sun.md D5) applies to the sunrise too: accuracy there is worse, as before. |
|
||||
| 6 | Process | On 2026-11-17 `node_modules` was missing again (the second time in ten days, cause unknown) and the machine sat at 100 % CPU (other sessions and a virtual machine), so the guard refused the full runs for a while. | Reinstalled from the lockfile; the full runs waited for the guard rather than overriding it (§5.7). |
|
||||
| — | Privacy, reachability, offline | Computed on the device from the chosen town; nothing new is stored or sent. | — |
|
||||
|
||||
## What was not verified
|
||||
|
||||
- A real phone at dawn; Safari's time formatting.
|
||||
@@ -0,0 +1,149 @@
|
||||
# Review — `feature/tauri-platforms`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/tauri-platforms.md`](../features/tauri-platforms.md).
|
||||
Reviewed 2026-11-17 on Windows 10 Pro (19045), Node 22.23.4, Rust 1.99.0 (MSVC), JDK 17.0.20,
|
||||
Android SDK with NDK 27.1, Tauri CLI 2.12.5, tauri 2.12.6, WebView2 157.0.4341.46. The Android device
|
||||
is a WAVE 10C on Android 16 (API 36) with Android System WebView 140.0.7339.207, over USB. There is no
|
||||
PR: the only remote is Gitea.
|
||||
|
||||
## What the author asked, and what exists now
|
||||
|
||||
*"I need also android apk version, desktop version, ios version and pwa version. Put that to claude.md
|
||||
based on the tauri2 framework."*
|
||||
|
||||
| Version | State |
|
||||
|:--|:--|
|
||||
| PWA | Unchanged; the e2e and offline suites pass (counts below). |
|
||||
| Windows desktop | **Built and run.** `pnpm tauri:build` → `rosea-shell.exe` and `Rosea Domi_0.1.0_x64-setup.exe` (NSIS, 1.31 MiB), 5 min 49 s from cold. The check passed: the garden opens, she is watered, the app is closed and opened again, she is still watered. |
|
||||
| Android | **Built, installed and run on the tablet.** `pnpm tauri:android` → `app-universal-debug.apk` (arm64 only, debug, ~122 MB with debug symbols), verified with `aapt2`; installed with `adb install -r`; the check passed: opens, watered, `am force-stop`, opened again, still watered. Offline by construction: the app holds no `INTERNET` permission. |
|
||||
| iOS | **Not possible here.** `pnpm tauri:ios` refuses on Windows with the reason (seen). What it needs is in the analysis, G-T1. |
|
||||
| macOS, Linux desktop | Not built (G-T2). |
|
||||
|
||||
Downloads: the author approved (2026-11-17) the Tauri CLI from npm, crates from crates.io, Gradle
|
||||
artefacts from Google Maven and Maven Central, all expected to come from this machine's caches.
|
||||
pnpm reported **2 packages downloaded** (the CLI and its Windows binary); cargo and Gradle built
|
||||
without visible fetches. Nothing was installed system-wide. On the tablet: only Rosea's debug APK
|
||||
(Playwright's Android support reached the WebView over adb and installed nothing).
|
||||
|
||||
## Gates
|
||||
|
||||
Filled from the run on the branch head:
|
||||
|
||||
Run on the branch after `main` (the sunrise, Coyhaique) was merged into it, 2026-11-17:
|
||||
|
||||
| Gate | Result |
|
||||
|:--|:--|
|
||||
| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check 0 errors) |
|
||||
| `pnpm lint:copy` | 21 files, 0 problems |
|
||||
| `pnpm validate:library` | 0 entries; 78 candidates; 13 of 13 fixtures rejected |
|
||||
| `pnpm test` (guard 74 % → started; `turbo run test --continue`) | **529 passed**: cpu-guard 13, identity 5, schema 19, content 88, storage 65, art-prep 61, **tauri 40**, engine 174, ui 64 |
|
||||
| `pnpm test:e2e` (guard 59 %) | 22 passed |
|
||||
| `pnpm test:offline` (guard 73 %) | 1 passed |
|
||||
| `pnpm tauri:build` (merged tree) | built; NSIS 1.31 MiB; the desktop check **passed** again |
|
||||
| `pnpm tauri:android` (merged tree) | built and `aapt2`-verified. **Not re-run on the tablet:** at that moment `adb` hung on the WAVE 10C (another session had it over Wi-Fi adb, an emulator attached too), and this session left it alone. The on-device passes (3 of 5 runs, below) are of the build before the merge, whose shell and privacy were identical; the merge changed the game (the sunrise), not the shell. |
|
||||
|
||||
The first gate run, before the merge, failed one content test (`America/Coyhaique`, a zone the
|
||||
upgraded Node knows); `main` had fixed it meanwhile (`fix/coyhaique`), which is why `main` was
|
||||
merged into the branch before the final run.
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4) only for the shell: the PWA's `App.svelte` now reads one
|
||||
constant that is `'web'` in its build, so the PWA behaves as before. Rebuilt by the e2e and offline
|
||||
runs; **not deployed** (G0.13). The APK and the installer are on this machine only, not committed.
|
||||
|
||||
## Bug drills
|
||||
|
||||
Each bug put back by script, the named test run, the file restored. One drill spot-checked to fail
|
||||
on the right assertion (the worker left on → *has no service worker and no web manifest*).
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| Tauri's CSP drifts from `csp.ts` (`'unsafe-inline'` added) | CAUGHT |
|
||||
| `useHttpsScheme` flipped to `false` (origin moves, rose left behind) | CAUGHT |
|
||||
| Identifier changed | CAUGHT |
|
||||
| A WebView2 privacy flag dropped | CAUGHT |
|
||||
| The Android build no longer runs the privacy patch | CAUGHT |
|
||||
| A plugin crate added to the shell | CAUGHT |
|
||||
| The service worker left on in the shell build | CAUGHT |
|
||||
| The `<meta>` CSP left in the shell build | CAUGHT |
|
||||
| The shell build under `/Rosea/` | CAUGHT |
|
||||
| The patch forgets to remove `INTERNET` | CAUGHT |
|
||||
| The patch forgets `allowBackup` | CAUGHT |
|
||||
| A rule file stops excluding the database from device transfer | CAUGHT |
|
||||
| The APK check lets any app's receiver-guard permission through | CAUGHT |
|
||||
| The APK check reads a neighbour's meta-data value | CAUGHT |
|
||||
| Tauri's logo left as the launcher icon | CAUGHT by `android.ts check` (exit 1, then 0 after the copy); not a unit test |
|
||||
|
||||
**Not drilled, and no test would catch it:** `App.svelte` not counting the app as installed (D9).
|
||||
Seen only through the check's report (`persist()` is asked; on iOS, the install hint, untestable here).
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | **Soul** | Inside the apps, *Keep her safe* says *This browser may clear her if the garden is not opened for a long time. A saved file keeps her for sure.*, offers *Ask the browser to keep her* (which always answers no: `persist()` is `false` in both webviews), and on Android *Save her to a file* **does nothing** (measured). A player is told she may be lost, in the wrong words, and the one remedy fails silently. That is a worry the game made, and a broken promise. | **Deferred, as a release blocker** (G-T4): it needs app words in `packages/ui` copy and a working save, which is the first Tauri plugin and its own feature doc and Soul review. Today the APK and installer exist on this machine only, for the author's own play; CLAUDE.md §8 and the analysis say no app goes to a player before G-T4 closes. Offered as the next session. |
|
||||
| 2 | Correctness | The first APK carried **Tauri's logo**: `icons.ts` skipped the copy because `tauri android init` had written its own icon later than ours. | Fixed: the Android icons are copied into `gen/android` on every build, and `android.ts check` compares the bytes; the rebuilt APK's `mipmap-mdpi` icon hashes to ours. |
|
||||
| 3 | Test honesty | The first APK check read a meta-data value from a 300-character window after its name, which could read the next element's value and pass a wrong switch. | Fixed: it reads the value attribute on the line after the name; a test flips one switch on real `aapt2` output and expects its name; drilled. |
|
||||
| 4 | Test honesty | The first APK check let **any** `…DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` through, another app's included. | Fixed: only `<this package>.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION`; drilled. |
|
||||
| 5 | Correctness | The first shell-build test asserted the string `"tauri"` in the bundle; the minifier folds `__ROSEA_SHELL__ === 'tauri'` away, so the assertion tested the minifier. | Removed; what the test keeps is that the constant never reaches the webview (it would throw). |
|
||||
| 6 | Correctness | The tablet's USB link dropped at least twice in an hour (`device offline`, transport ids 1 → 4 → 5), once mid-check. | The check waits for the device and retries a dropped `adb` command, and finds the device again for each visit. A failure for any other reason still fails at once. |
|
||||
| 7 | Test honesty | One tablet run timed out clicking *Her numbers* while the garden animated (Playwright never saw the button stable). | The check activates it by keyboard (focus, Enter); the run after the fix passed. Recorded, not hidden: of 5 tablet runs, 3 passed, 1 failed this way, 1 on the USB drop. |
|
||||
| 8 | Privacy | WebView2's environment variables (used by the desktop check to open a debugging port and a temporary data folder) **replace** the app's `additionalBrowserArgs` for that run. | Said in the check's header: the desktop check proves the garden, not WebView2's silence (G-T6). |
|
||||
| 9 | Correctness | Tauri creates `%LOCALAPPDATA%\cz.mareknovak.domi.rosea\` at start even when WebView2's data is elsewhere. | The check's run left that folder empty; it was removed after each run. The player's real data lives there (`EBWebView\`), as §4 says. |
|
||||
| 10 | Privacy | The Windows installer's default WebView2 mode downloads the WebView2 bootstrapper from Microsoft if WebView2 is missing. | Noted in the analysis (§3); Windows 10 and 11 ship WebView2. Not changed. |
|
||||
| 11 | Scope | No Android dev command (`tauri android dev`): it would need `INTERNET` back and `adb reverse` to stay on 127.0.0.1. | Deferred (D12); not needed to test what exists. |
|
||||
| 12 | Design | The window is 480 × 800 on the desktop; the garden was designed for a phone. | Kept: portrait like the PWA's manifest. Whether the desktop app should be wider is the author's call after playing it. |
|
||||
|
||||
## Correctness
|
||||
|
||||
- **Second run**: `android.ts apply` is idempotent (test); `icons.ts` copies every time; a second
|
||||
`pnpm tauri:android` rebuilt in seconds and re-verified.
|
||||
- **Clock and DST**: nothing here reads time; the game's own handling is unchanged.
|
||||
- **Partial write, app closed mid-action**: the app is closed with `kill` (desktop) and
|
||||
`am force-stop` (Android) right after the care was **committed** (the check waits for the log);
|
||||
a force-stop *during* the write was not tried. IndexedDB's transactions are the same as in the PWA.
|
||||
- **Two tabs**: an app has one window; two instances of the desktop app share one WebView2 folder and
|
||||
would talk through `BroadcastChannel` like tabs. Not tried.
|
||||
- **Origin is forever**: identifier and `useHttpsScheme` are pinned by tests and drills.
|
||||
|
||||
## Soul
|
||||
|
||||
Finding 1 is the one: a worry and a broken remedy, in the apps only. Nothing else in this change adds
|
||||
a word, a count, a badge or a reminder. The apps do not notify. The window has no title-bar status.
|
||||
|
||||
## Privacy — every path a byte could leave
|
||||
|
||||
| Path | Android | Windows |
|
||||
|:--|:--|:--|
|
||||
| The game's own requests | none (check: 0 outside the origin) | none (check: 0 outside the origin) |
|
||||
| The webview's own traffic | impossible: no `INTERNET` (dumpsys, aapt2) | switched off by flags; **not measured** (G-T6) |
|
||||
| Cloud backup / device transfer | off (`allowBackup=false`, every domain excluded; dumpsys flags) | n/a (WebView2 data is not roamed) |
|
||||
| Plugins, IPC | none; no capabilities | none; no capabilities |
|
||||
| Installer | n/a | may fetch the WebView2 bootstrapper (finding 10) |
|
||||
| Crash reporting, analytics | none in `Cargo.toml` (test) or the game | same |
|
||||
| What the webview keeps on the device | `app_webview/` holds the IndexedDB, an **empty** Local Storage database Chromium creates (0-byte log: Rosea writes none), and `AwOriginVisitLoggerPrefs.xml`: hashed visit counters for WebView metrics, which are opted out and cannot leave without `INTERNET`; no backup takes them | `EBWebView\` beside the app; not inspected |
|
||||
|
||||
## Reachability
|
||||
|
||||
Nothing new: no field reaches anyone, no network.
|
||||
|
||||
## Offline
|
||||
|
||||
Android is offline by construction and was tested so. The desktop check ran with the machine online
|
||||
(WebView2's own flags replaced, finding 8); the game made no request outside its origin.
|
||||
|
||||
## Test honesty
|
||||
|
||||
- 14 of 14 drills caught; one spot-checked for the right assertion.
|
||||
- The device checks are scripts run by hand, not in `pnpm test`: they need the built app and the
|
||||
tablet. Their results above are from this machine on 2026-11-17.
|
||||
- The APK fixtures are real `aapt2` output of the APK built here, saved with the tests.
|
||||
|
||||
## What was NOT verified
|
||||
|
||||
- iOS, macOS, Linux (G-T1, G-T2). WKWebView's storage location and eviction.
|
||||
- WebView2's network silence for Rosea (G-T6).
|
||||
- Bringing a rose back from a file in either app (G-T5: the Android picker opens; nothing was picked).
|
||||
- A force-stop during a write. Two desktop instances at once.
|
||||
- The NSIS installer itself was built, not run: the check ran the `.exe` from `target/release`.
|
||||
- A release (signed) APK; an AAB; any store (G-T3).
|
||||
- Android versions other than 16, phones (only the tablet), other WebView versions.
|
||||
@@ -0,0 +1,43 @@
|
||||
# Review — `feature/thorns`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/thorns.md`](../features/thorns.md).
|
||||
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
|
||||
|
||||
## Gates
|
||||
|
||||
Counts are on the merge; HANDOVER repeats them. New: engine +7 (2 properties), ui +4, e2e +1
|
||||
(touch, rush, axe with the touch focused).
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4): a *Touch her* button over her picture. Rebuilt by the e2e and
|
||||
offline runs; **not deployed** (G0.13). Seen in the built app at phone width: a touch answered
|
||||
*That tickles.*, three taps 400 ms apart gave *Gently. I have thorns.*, and the keyboard focus ring
|
||||
is a rounded frame round her picture.
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| A tremor counts as fussing | CAUGHT |
|
||||
| A rush never brings the thorns | CAUGHT: 3 |
|
||||
| She never rests | CAUGHT |
|
||||
| Every touch makes her blush | CAUGHT: 2 |
|
||||
| A touch is written as care | CAUGHT: 2 |
|
||||
| A held key is a rush | CAUGHT |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Soul | *Gently* can be read as a reproach by someone already fragile. | Three separate, deliberate taps in two seconds; said once; she rests and then it is gone; nothing remembers it. Her words are about herself. Accepted for the author's play test; the line is in `copy/en.ts`. |
|
||||
| 2 | Accessibility / soul | A tremor or a bouncing finger could be told *gently*. | Taps within 250 ms are one touch (T2), and a held key is one; both drilled. Not tried with a real tremor or switch access. |
|
||||
| 3 | Design | The author's option said *a blush once a day*, and also *nothing is recorded*. Those cannot both hold. | Nothing is recorded; the blush is once per visit (T4). Said plainly in the analysis. |
|
||||
| 4 | Design | The blush shows on her face only in full bloom, as every mood does; before that only her words answer. | Accepted: the stand-ins draw moods for the full bloom only (STYLE.md). |
|
||||
| 5 | Correctness | The clock moved back while she rests. | She never rests longer than `restMs` (tested). |
|
||||
| 6 | Correctness | Two tabs: each has its own touches. | Nothing is shared or stored; harmless. |
|
||||
| 7 | Test honesty | A frozen e2e clock (`setFixedTime`) would make three clicks one touch, and the rush test would fail for the wrong reason. | The e2e drives the clock with `clock.install` and `runFor`. |
|
||||
| 8 | Dependence | Touching as a fidget. | It gives nothing after the first blush; no number grows. |
|
||||
| — | Privacy, reachability, offline | Looked; nothing is stored, sent or shared. | — |
|
||||
|
||||
## What was not verified
|
||||
|
||||
- A screen reader announcing the bubble change; switch access; a real phone's touch timing.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Review — `fix/coyhaique`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3) of a data fix to the town list
|
||||
([`features/sunset-place.md`](../features/sunset-place.md)). 2026-11-17, Node 22.23.4 (tz 2026e).
|
||||
|
||||
## What happened
|
||||
|
||||
Node on this machine was upgraded from 22.11 to 22.23.4 (the upgrade G0.20 asked for). A content test
|
||||
then failed: *every zone Intl knows has a guess*: the new Node knows **America/Coyhaique** (created
|
||||
in 2025 for Chile's Aysén region), and the town list, built under the old Node, had no guess for it.
|
||||
|
||||
Rebuilding (`scripts/build-places.ts`, Natural Earth 10m populated places and tzdb 2026f, downloaded
|
||||
again with Mark's permission) did not fix it, and a town-by-town comparison found more:
|
||||
|
||||
| Town | Before | Why |
|
||||
|:--|:--|:--|
|
||||
| **Santiago, Valparaíso** | America/Punta_Arenas | Natural Earth files them under **America/Sao_Paulo**. Its fixed UTC−3 matched Chile's fixed-clock southern zone, so the "same clock as one of the country's zones" rule moved Chile's capital onto a clock without daylight saving: its sunset an hour off for half the year. Under the new Node the same rule picked Coyhaique instead. |
|
||||
| **Coyhaique, Puerto Aisén, Cochrane, Villa O'Higgins** | America/Santiago | Natural Earth predates Aysén's 2025 split. |
|
||||
| **Punta Arenas, Puerto Natales, Puerto Williams, Río Verde** | America/Santiago | Natural Earth predates Magallanes' 2016 split: wrong since the first build. |
|
||||
| Yellowknife, Fort Simpson (Canada) | Cambridge_Bay, Dawson_Creek | The rebuild under the new time zone data files them under Edmonton (Mountain time with daylight saving, as both keep). |
|
||||
|
||||
## The fix
|
||||
|
||||
| # | Change | Why |
|
||||
|:--|:--|:--|
|
||||
| C1 | **Another country's own zone is never trusted** for a town, however alike its clock. The town then takes its neighbours' zone. | The clock rule exists to accept old *names* of a country's own zones (Europe/Kiev, Juneau for Anchorage), never a foreign zone. |
|
||||
| C2 | **Region bands** for southern mainland Chile: 43.7° S – 49° S → America/Coyhaique; south of 49° S → America/Punta_Arenas. Source: zone1970.tab's comments and the regions' borders. | Natural Earth's region names are unreliable (*Ais*, *Aisén…*, Villa O'Higgins under Argentina's *Santa Cruz*); latitude along the real borders is not. Mainland only, so Easter Island keeps Pacific/Easter. |
|
||||
|
||||
Twelve towns changed, each listed above; every other town kept its zone. Every zone the new Node
|
||||
knows has a guess again.
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| Another country's zone trusted again | CAUGHT: 2 (Santiago, Valparaíso) |
|
||||
| No region bands | CAUGHT: 5 |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Correctness | A player who chose Santiago or Valparaíso before this fix has the wrong zone **saved in their profile** (`sunsetPlace` keeps the town with its zone). | Nobody has: the app is not deployed (G0.13). Recorded so a later data fix knows to ask whether a saved town needs refreshing. |
|
||||
| 2 | Correctness | Band edges are approximate (the Aysén–Magallanes border is not a straight line of latitude). | Only the towns in the list matter, and each is checked against its region; none lies within 0.5° of an edge except Villa O'Higgins (48.47° S), which is in Aysén, as the band says. |
|
||||
| 3 | Testing | The original data had this bug since its first build; no test pinned a Chilean town. | Nine towns pinned now (`places.test.ts`); drilled. |
|
||||
| 4 | Process | The bug surfaced only because a runtime upgrade changed what "every zone" means. | Lesson in `technical.md`: data built against a runtime's time zone data is checked again when the runtime changes. |
|
||||
| — | Soul, privacy, reachability, offline | Unchanged: the list is bundled and searched on the device. | — |
|
||||
|
||||
## Gates
|
||||
|
||||
Counts in HANDOVER. The town list is bundled lazily (the `places` chunk): **the app changed** for a
|
||||
player who searches Chile; rebuilt by the e2e and offline runs; not deployed.
|
||||
@@ -39,7 +39,7 @@ that is not a whole number in range is refused, never quietly the default.
|
||||
| 2 | `ROSEA_CPU_MAX=100` is a way round the rule. | Documented as for dedicated machines only, in CLAUDE.md §5.7 and the lesson. An override nobody can use would push people to edit the script instead. |
|
||||
| 3 | The guard adds 2 s to every full run on a quiet machine. | Accepted. |
|
||||
| 4 | Filtered runs (`pnpm --filter X test`) and drills are not guarded. | By design: they are not full runs. |
|
||||
| 5 | Its own 2 s sample could read its own start-up as load. | It samples after Node has started. Not measured on a quiet machine: this one was busy all session. Beside Windows' counter it read 2–11 points lower, never higher. |
|
||||
| 5 | Its own 2 s sample could read its own start-up as load. | It samples after Node has started. Later, on a quiet machine, it read 2.4–4.1 % beside Windows' 1.5–3.3 %; busy, 2–11 points lower. Close enough for an 80 % line. |
|
||||
|
||||
## Not verified
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# Review — `fix/two-tabs`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/two-tabs.md`](../features/two-tabs.md).
|
||||
Reviewed 2026-11-07 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
|
||||
|
||||
## The measurement
|
||||
|
||||
CLAUDE.md §8 predicted *derived state drifts; use a BroadcastChannel lock*. Two e2e tests were
|
||||
written first and run against the built app: both **failed** (a tab already open saw neither care
|
||||
nor a town chosen in another tab). Reading the code explained why, and showed what the
|
||||
prediction got wrong: there is no `derived` store and the log is append-only, so nothing stored
|
||||
can drift and no lock is needed. What drifted was each tab's view, which can make the player water
|
||||
her twice. Both tests pass after the fix.
|
||||
|
||||
## Gates
|
||||
|
||||
Counts are on the merge; HANDOVER repeats them. New: storage +7, ui +3, e2e +2 (the measurement).
|
||||
|
||||
**The app changed** (CLAUDE.md §5.4), invisibly in one tab: another open tab now follows it.
|
||||
Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
|
||||
|
||||
## Bug drills
|
||||
|
||||
| Put back | Result |
|
||||
|:--|:--|
|
||||
| Care is announced before it is written | CAUGHT |
|
||||
| A petal is never announced | CAUGHT |
|
||||
| A town is never announced | CAUGHT |
|
||||
| Any message counts as a change | CAUGHT |
|
||||
| The rose replaces her view with a stale read | CAUGHT |
|
||||
| The rose does not listen | CAUGHT |
|
||||
| The garden ignores a town from another tab | CAUGHT |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | Correctness | A tab's own care can still be on its way to IndexedDB when another tab's news makes it read; a plain replace would drop that care from view, and nothing would bring it back. | The read is added to what the tab shows, never replaces it (the log only grows); drilled. |
|
||||
| 2 | Correctness | Two reads overlapping, finishing out of order. | Same answer: each only adds, so order does not matter. |
|
||||
| 3 | Correctness | Announcing before the commit would make the other tab read too early. | Announced after `add` / after the transaction resolves; drilled. |
|
||||
| 4 | Correctness | A tab mid-pour when the other tab's care arrives: the can now measures against the new level. | Accepted: that is the true level. |
|
||||
| 5 | Design | A town arriving while this tab is searching for one: the search closes and the new town shows. | Accepted: the player's choice in the other tab is the newer one. A tab in the middle of *Change town* keeps its open search (only the shown town updates). |
|
||||
| 6 | Privacy | A `BroadcastChannel` message. | Same origin, same browser profile only; one word (`log`, `place`), no data. Nothing leaves the device. |
|
||||
| 7 | Compatibility | Browsers without `BroadcastChannel` (Safari before 15.4). | Each tab keeps its own view, as before; no data is affected; tested with it removed. |
|
||||
| 8 | Process | The measurement commit would have been red on its own. | The branch was regrouped before pushing so every commit is green: the tests land with the fix. |
|
||||
| 9 | Process | On 2026-11-07 the root `node_modules` was missing (cause unknown; the code and history were intact). | Restored with `pnpm install --frozen-lockfile`, which also reinstalled the hooks. |
|
||||
| — | Soul, reachability, offline | Looked; the fix removes a way the game could blame her care for its own mistake. Nothing new is shown or sent; works offline. | — |
|
||||
|
||||
## What was not verified
|
||||
|
||||
- Safari and Firefox (BroadcastChannel across an installed app and a tab); a phone.
|
||||
- The KeepSafe path across tabs end to end (bringing her back in one tab, seen in the other):
|
||||
covered by the storage test that a brought-back rose announces `log`, not by an e2e.
|
||||
@@ -0,0 +1,16 @@
|
||||
# Rosea Domi declares itself to Fabrica (.agents/features/fabrica-release.md; Fabrica core docs/FORMATS.md,
|
||||
# "Fabrica: the app"). One part: the release pipeline makes the Windows installer and the Android APK from one
|
||||
# tag. No server part: the PWA's host is still the author's question (GAP_ANALYSIS G0.13), and a server part is
|
||||
# a NixOS module on the server, not this repository's (F2). The colour is --rose.
|
||||
# aula: true means the releases carry Aula's kit. The page appears on Aula only once the server's
|
||||
# modules/aula.nix lists Rosea, and that waits for the author: the look's legal check comes before any public
|
||||
# release (CLAUDE.md §8, GAP_ANALYSIS G6.1; fabrica-release.md F1).
|
||||
name: Rosea
|
||||
icon: flower
|
||||
color: "#b4485e"
|
||||
aula: true
|
||||
tagPrefix: v
|
||||
parts:
|
||||
desktop:
|
||||
pipeline: release
|
||||
check: node scripts/check-version.mjs
|
||||
@@ -0,0 +1,34 @@
|
||||
# Rosea Domi: the e2e suites on this PC's e2e runner (fabrica-release.md F9, android-release-apk.md; Fabrica
|
||||
# docs/20_tests.md, docs/31_runners_here.md, docs/35_phone_queue.md).
|
||||
# web: the PWA built, then `fabrica tests run --target web` (Playwright headless against the BUILT bundle under
|
||||
# /Rosea/), the records, traces and screenshots kept with the run.
|
||||
# phone: the debug APK built, then `fabrica tests run --target phone` on the Wave 10. The step says `device:`, so
|
||||
# the hub queues this run for the phone and the nested run uses the run's phone (FABRICA_PHONE_LEASED);
|
||||
# no adb reaches the phone outside the queue. The run waits in the queue without holding a runner.
|
||||
# Manual: no push webhook reaches the hub yet. Gradle's cache is on D: (never C:; F: is the crowded workspace).
|
||||
name: e2e
|
||||
on:
|
||||
manual: true
|
||||
runner: windows-e2e
|
||||
env:
|
||||
PLAYWRIGHT_BROWSERS_PATH: 'F:\ms-playwright'
|
||||
GRADLE_USER_HOME: 'D:\build\rosea\gradle'
|
||||
NDK_HOME: 'F:\Tools\Android\Sdk\ndk\27.1.12297006'
|
||||
steps:
|
||||
- id: install
|
||||
run: pnpm install --frozen-lockfile
|
||||
- id: build
|
||||
needs: [install]
|
||||
run: pnpm build
|
||||
- id: web
|
||||
needs: [build]
|
||||
run: fabrica tests run --target web
|
||||
artifacts: [".fabrica/runs/tests/**"]
|
||||
- id: apk
|
||||
needs: [install]
|
||||
run: pnpm tauri:android
|
||||
- id: phone
|
||||
needs: [apk]
|
||||
device: Wave 10
|
||||
run: fabrica tests run --target phone
|
||||
artifacts: [".fabrica/runs/tests/**"]
|
||||
@@ -0,0 +1,108 @@
|
||||
# Rosea Domi: one release, both apps (.agents/features/fabrica-release.md; Fabrica docs/36_app_onboarding.md).
|
||||
# A `vX.Y.Z` tag (Fabrica: Apps → Rosea → Deploy, or `fabrica deploy rosea --part desktop`) is started on the hub.
|
||||
# The Windows runner (the Fabrica app on Mark's PC, whose folder is on every step's PATH, so `fabrica` is its own
|
||||
# CLI) runs every gate of CLAUDE.md §5.5 on a clean checkout, the e2e and offline suites against the BUILT PWA,
|
||||
# takes the Aula pictures on demo data (e2e/aula.spec.ts), and builds the Windows installer and the Android APK.
|
||||
# Nothing is signed before Mark's card. Then: Authenticode on the installer (domi-code-signing); the APK through
|
||||
# custos-sign with rosea-android (NOT made by Custos on its own: android-release-apk.md A6, until then `no_key`); a minisign
|
||||
# signature for each (domi-release); the release with SHA256SUMS signed by domi-release.
|
||||
# No updater and no latest.json: the apps make no network call of their own (CLAUDE.md §2). Mark's PC updates
|
||||
# through Fabrica's Update all; a player installs the next file over the old one (F3).
|
||||
# The repository is public, so `publish` is a public release: the tag waits for the author (G6.1, F1).
|
||||
# Playwright's browsers are in F:\ms-playwright (CLAUDE.md §3: never C:); nothing is downloaded during a release.
|
||||
name: release
|
||||
on:
|
||||
tag: "v*"
|
||||
manual: true
|
||||
runner: windows
|
||||
env:
|
||||
PLAYWRIGHT_BROWSERS_PATH: 'F:\ms-playwright'
|
||||
CUSTOS_SIGN_EXE: 'F:\Apps\Custos\custos-sign.exe'
|
||||
# The Android build (android-release-apk.md): the Tauri CLI needs the NDK named; Gradle's cache on D:, never C:.
|
||||
GRADLE_USER_HOME: 'D:\build\rosea\gradle'
|
||||
NDK_HOME: 'F:\Tools\Android\Sdk\ndk\27.1.12297006'
|
||||
steps:
|
||||
- id: version
|
||||
run: node scripts/check-version.mjs ${{ version }}
|
||||
- id: install
|
||||
run: pnpm install --frozen-lockfile
|
||||
- id: lint
|
||||
needs: [install]
|
||||
run: pnpm lint
|
||||
- id: typecheck
|
||||
needs: [install]
|
||||
run: pnpm typecheck
|
||||
- id: test
|
||||
needs: [install]
|
||||
run: pnpm test
|
||||
- id: library
|
||||
needs: [install]
|
||||
run: pnpm validate:library
|
||||
- id: copy
|
||||
needs: [install]
|
||||
run: pnpm lint:copy
|
||||
- id: e2e
|
||||
needs: [lint, typecheck, test, library, copy]
|
||||
run: pnpm test:e2e
|
||||
- id: offline
|
||||
needs: [e2e]
|
||||
run: pnpm test:offline
|
||||
- id: pictures
|
||||
needs: [offline]
|
||||
run: pnpm aula:shots
|
||||
- id: desktop
|
||||
needs: [offline]
|
||||
run: pnpm tauri:build
|
||||
artifacts: ["apps/rosea-tauri/src-tauri/target/release/bundle/nsis/*-setup.exe"]
|
||||
- id: android
|
||||
needs: [desktop]
|
||||
run: pnpm tauri:android-release
|
||||
- id: notes
|
||||
run: fabrica notes
|
||||
artifacts: ["target/notes/release-notes.md", "target/notes/release-notes.json"]
|
||||
- id: notes-copy
|
||||
needs: [notes, install]
|
||||
run: pnpm lint:copy
|
||||
- id: shots
|
||||
needs: [pictures]
|
||||
run: fabrica aula shots
|
||||
artifacts: ["target/aula/aula-*.png", "target/aula/aula.json"]
|
||||
- id: page
|
||||
needs: [notes-copy, shots]
|
||||
run: fabrica aula page
|
||||
artifacts: ["target/aula/aula-page.json", "target/aula/aula-page.html"]
|
||||
- id: approve
|
||||
needs: [version, desktop, android, page]
|
||||
approve: "Release Rosea ${{ tag }}?"
|
||||
- id: sign
|
||||
needs: [approve]
|
||||
sign:
|
||||
key: domi-code-signing
|
||||
kind: authenticode
|
||||
files: ["**/*-setup.exe"]
|
||||
- id: apk
|
||||
needs: [approve]
|
||||
run: pnpm --filter @rosea/tauri sign:apk ${{ version }} ${{ commit }}
|
||||
keys: [rosea-android]
|
||||
artifacts: ["target/release/rosea-domi-*-arm64.apk"]
|
||||
- id: minisign
|
||||
needs: [sign, apk]
|
||||
sign:
|
||||
key: domi-release
|
||||
kind: minisign
|
||||
files: ["**/*-setup.exe", "**/rosea-domi-*-arm64.apk"]
|
||||
- id: publish
|
||||
needs: [minisign]
|
||||
publish:
|
||||
gitea-release: true
|
||||
files:
|
||||
- "**/*-setup.exe"
|
||||
- "**/*-setup.exe.minisig"
|
||||
- "**/rosea-domi-*-arm64.apk"
|
||||
- "**/rosea-domi-*-arm64.apk.minisig"
|
||||
- "target/aula/aula-*.png"
|
||||
- "target/aula/aula.json"
|
||||
- "target/aula/aula-page.json"
|
||||
- "**/release-notes.md"
|
||||
- "**/release-notes.json"
|
||||
sums: domi-release
|
||||
@@ -0,0 +1,39 @@
|
||||
# Rosea's pictures for its Aula page (fabrica-release.md F7; Fabrica docs/19_web_shots.md). All are taken by the
|
||||
# app's own Playwright run (`pnpm aula:shots`, e2e/aula.spec.ts) from the BUILT PWA on demo data the game itself
|
||||
# made: an invented rose watered once a day for two weeks in March 2026, in Prague, with the gardener's first look.
|
||||
# `fabrica aula shots` checks and publishes the files; it starts no browser of its own (the PWA lives under
|
||||
# /Rosea/, and Fabrica's server serves at /). No iPhone pictures: there is no iOS app yet (G-T1).
|
||||
size: [1280, 800]
|
||||
shots:
|
||||
- name: garden
|
||||
title: Her planet after two weeks of care
|
||||
section: In a browser or on Windows
|
||||
file: e2e/aula/garden.png
|
||||
- name: ring
|
||||
title: What she needs today
|
||||
section: In a browser or on Windows
|
||||
file: e2e/aula/ring.png
|
||||
- name: numbers
|
||||
title: Her numbers
|
||||
section: In a browser or on Windows
|
||||
file: e2e/aula/numbers.png
|
||||
- name: sunset
|
||||
title: Move the chair
|
||||
section: In a browser or on Windows
|
||||
file: e2e/aula/sunset.png
|
||||
- name: safe
|
||||
title: Keep her safe
|
||||
section: In a browser or on Windows
|
||||
file: e2e/aula/safe.png
|
||||
- name: first-open
|
||||
title: Who tends her?
|
||||
section: The first open
|
||||
file: e2e/aula/first-open.png
|
||||
- name: phone-garden
|
||||
title: The garden on a phone
|
||||
section: On a phone
|
||||
file: e2e/aula/phone-garden.png
|
||||
- name: phone-ring
|
||||
title: What she needs, on a phone
|
||||
section: On a phone
|
||||
file: e2e/aula/phone-ring.png
|
||||
@@ -0,0 +1,14 @@
|
||||
A small game about a living rose, a fox, and the time we give to people. An early version.
|
||||
|
||||
You tend one rose on a round tiny planet of her own. Water her by feel, pull the weeds, gather her fallen petals, shade her from the wind. She grows from the days on which you cared for her, never from a streak, and when you are away she waits.
|
||||
|
||||
The garden follows the real sun of a town you choose. No account, nothing sent anywhere. The pictures are stand-ins drawn in code until the painted ones are ready.
|
||||
|
||||
- garden: Her planet after two weeks of care, with the gardener beside her and tonight's real sunset below.
|
||||
- ring: A tap on her shows what she needs today.
|
||||
- numbers: Her numbers: water, warmth, days of care and how she is.
|
||||
- sunset: Move the chair: a quiet sunset in the garden, with nothing to press.
|
||||
- safe: Keep her safe: save her to a file, and bring her back on any device.
|
||||
- first-open: The first open: dress the gardener who tends her.
|
||||
- phone-garden: The same garden on a phone.
|
||||
- phone-ring: On a phone, what she needs is one tap away.
|
||||
@@ -0,0 +1,9 @@
|
||||
The first release of Rosea Domi, an early version: the rose, her planet and the gardener.
|
||||
|
||||
- Tend her by hand or by button: water by feel, pull weeds, gather petals, shade her from the wind, touch her gently.
|
||||
- She grows from the days on which care helped, never from a streak, and waits when you are away.
|
||||
- A gardener you dress at the first open, who walks round her planet to the work.
|
||||
- The real sunset and sunrise of a town you choose, and a quiet sunset in the garden.
|
||||
- Keep her safe: save her to a file and bring her back on any device.
|
||||
- A Windows installer and an Android app. Nothing is sent anywhere; the Android app asks for no permission at all.
|
||||
- The pictures are stand-ins drawn in code until the painted ones are ready.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: kkpy69
|
||||
title: Showcase videos of the main flows for the Aula page
|
||||
status: todo
|
||||
priority: normal
|
||||
labels: [showcase, aula]
|
||||
created: 2026-11-19T01:31:09+01:00
|
||||
updated: 2026-11-19T01:31:09+01:00
|
||||
doc: .agents/features/fabrica-release.md
|
||||
---
|
||||
Once Fabrica docs/37 (showcase videos: .fabrica/aula.yaml videos:, WebM <= 8 MiB, <= 60 s, <= 6 per release, published as target/aula/aula-<name>.webm under SHA256SUMS) is on Fabrica main, record short videos from e2e/aula.spec.ts on the same demo garden: watering by the can, the ring of care, moving the chair (the in-game sunset), keeping her safe in a file. Add them to aula.yaml videos: and to the release's publish files. Until then a videos: key fails fabrica aula shots (fabrica-release.md F8).
|
||||
|
||||
## Log
|
||||
|
||||
- 2026-11-19T01:31:09+01:00 mnovak: created
|
||||
@@ -0,0 +1,24 @@
|
||||
# Rosea Domi's Playwright targets (fabrica-release.md F9, android-release-apk.md; Fabrica docs/20_tests.md,
|
||||
# docs/22_devices.md, docs/35_phone_queue.md). `fabrica tests run --target <name>`, or Tests in Fabrica.
|
||||
# web: the BUILT PWA (build it first: `pnpm build`) in headless Chromium: the specs of `pnpm test:e2e`.
|
||||
# phone: the Android debug APK on the Wave 10 test phone, only through Fabrica's phone queue (the e2e pipeline's
|
||||
# `phone` step, or `fabrica tests run --target phone`). Build it first (`pnpm tauri:android`). A debug APK,
|
||||
# because only a debug build's WebView can be driven (docs/22 part 5); the release APK is the same game.
|
||||
# `reset: uninstall`: the app is installed fresh, so a release build of Rosea on the phone (another key)
|
||||
# cannot block the run. Nothing of Rosea's on the test phone is kept: it holds no rose of anyone's.
|
||||
dir: .
|
||||
config: e2e/playwright.fabrica.config.ts
|
||||
targets:
|
||||
- name: web
|
||||
kind: web
|
||||
title: The garden in a browser
|
||||
project: web
|
||||
- name: phone
|
||||
kind: android
|
||||
title: The Android app on the test phone
|
||||
project: android
|
||||
device: Wave 10
|
||||
package: cz.mareknovak.domi.rosea
|
||||
reset: uninstall
|
||||
maxMinutes: 20
|
||||
apk: apps/rosea-tauri/src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk
|
||||
@@ -31,3 +31,12 @@ Thumbs.db
|
||||
|
||||
# Generated from JSON Schema by packages/schema build
|
||||
packages/schema/src/generated/
|
||||
|
||||
# The Tauri shell (apps/rosea-tauri): the game's copy for it, Tauri's generated mobile
|
||||
# projects and the icons made from apps/rosea/public/icon.svg at build time
|
||||
dist-tauri/
|
||||
apps/rosea-tauri/src-tauri/gen/
|
||||
apps/rosea-tauri/src-tauri/icons/
|
||||
|
||||
# The Aula pictures, taken by `pnpm aula:shots` (e2e/aula.spec.ts) and published by Fabrica, never committed
|
||||
e2e/aula/
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# Rosea Domi
|
||||
|
||||
*Rosea* (Latin: rose-coloured) is a small game about a living rose, a fox, and the time we give to
|
||||
people. You tend one rose on a round tiny planet of her own. She grows from the days on which you
|
||||
cared for her, never from a streak, and when you are away she waits.
|
||||
|
||||
**This is an early version.** The rose, her planet and the gardener are here; the fox, the other
|
||||
planets, friends and the shared sky come later. The pictures are simple stand-ins drawn in code
|
||||
until the painted ones are ready.
|
||||
|
||||
## What you do
|
||||
|
||||
- **Tend her by hand.** Tap her to see what she needs today. Tilt the watering can and stop when her
|
||||
leaves lift: too much is as bad as too little. Pull the weeds, sweep up fallen petals, set the
|
||||
windbreak against the wind. Every gesture also has a plain button, and works from the keyboard.
|
||||
- **Choose who tends her.** At the first open you dress your gardener, a boy or a girl.
|
||||
- **Watch the real sky.** Choose a town near you (or let the device's time zone guess), and the
|
||||
garden names tonight's real sunset, and after it the real sunrise. *Move the chair* shows a quiet
|
||||
sunset in the garden, half a minute with nothing to press, then says when the real one is.
|
||||
- **Her numbers, one tap away.** Water, warmth, days of care and how she is, about her alone.
|
||||
- **Keep her safe.** Save her to a file and bring her back on any device.
|
||||
|
||||
Nothing is lost by being away: no streak resets, no reminders, no counting of anyone.
|
||||
|
||||
## Private by construction
|
||||
|
||||
There is no account, no email and no password. Everything stays on your device: her care, your town,
|
||||
your gardener. The game sends nothing anywhere and shows nothing from anywhere else. The Android app
|
||||
does not even ask for the permission to use the internet.
|
||||
|
||||
## Installing
|
||||
|
||||
- **Windows:** run `Rosea Domi_<version>_x64-setup.exe`. It installs for you alone, with no
|
||||
administrator rights.
|
||||
- **Android:** install the `.apk` (Android 7 or newer). Your phone will ask you to allow installing
|
||||
apps from where you downloaded it.
|
||||
- **iPhone, macOS and Linux:** not yet.
|
||||
|
||||
Each file is signed: its SHA-256 is in `SHA256SUMS`, and `SHA256SUMS.minisig` is its signature.
|
||||
|
||||
## Updating
|
||||
|
||||
Install the newer file over the old one, the same way. Your rose stays: she lives with the app on
|
||||
your device, and a newer version keeps her. Removing the app removes her too, so save her to a file
|
||||
first (*Her numbers* → *Keep her safe* → *Save her to a file*).
|
||||
@@ -20,14 +20,19 @@ For the engineering picture read [`.agents/GAP_ANALYSIS.md`](.agents/GAP_ANALYSI
|
||||
> always **Rosea Domi** in public, and *Domi* never appears alone. In source the name lives in exactly
|
||||
> three places — `packages/schema/src/constants.ts`, `apps/rosea/index.html` and the web manifest —
|
||||
> plus the `@rosea/*` package scope and the IndexedDB database name, which change together with them.
|
||||
> Renaming must stay a one-commit operation until the name is confirmed.
|
||||
> The app shell adds a fourth: `apps/rosea-tauri/src-tauri/tauri.conf.json` (`productName`, window
|
||||
> title), which the shell's test holds equal to the constants (§2, *Four versions*).
|
||||
> Renaming must stay a one-commit operation until the name is confirmed. The bundle identifier is
|
||||
> the exception: once an APK or installer reaches a player it cannot change without making a
|
||||
> second, separate app, so it is chosen once, before the first release (§8).
|
||||
|
||||
---
|
||||
|
||||
## 1. What this project is
|
||||
|
||||
**Rosea Domi** is a small web game, installable as a PWA, about a living rose, a fox, and the time we
|
||||
give to people. It belongs to the Domi ecosystem and is linked from the parent mode of Panda Domi; the
|
||||
**Rosea Domi** is a small game about a living rose, a fox, and the time we give to people. It ships
|
||||
as **four versions from one Svelte codebase** — a PWA, an Android app, an iOS app and a desktop app
|
||||
(§2, *Four versions*). It belongs to the Domi ecosystem and is linked from the parent mode of Panda Domi; the
|
||||
fox is a quiet nod to Ulfík the red panda (they look alike — an Easter egg, never an explanation).
|
||||
|
||||
It is made **for lonely people**, and the word *loneliness* never appears anywhere in the product.
|
||||
@@ -54,6 +59,12 @@ encouraging, never ruling), never a name or a quote.
|
||||
Neglect makes her **drift** — turn away, close a little — never break. Short visits hold her; real
|
||||
time — calendar days on which care helped, never minutes on screen — brings full bloom. One tap
|
||||
shows her real numbers (water, warmth, days of care, trend).
|
||||
- **Her planet and the gardener** *(decided by the author, 2026-11-17)* — she lives on a round tiny
|
||||
planet of her own, cultivated as a garden, and **a gardener the player chooses** (a boy or a girl,
|
||||
dressed at the first open) does the care, animated. The player cares by hand: tap her to open the
|
||||
ring of care, tilt the can to pour, swipe weeds out, sweep petals, drag the windbreak, stroke her
|
||||
petals; every gesture also has a button. The guards against the book's likeness are in
|
||||
`art/STYLE.md` S2, S6, §3b and `.agents/features/planet-garden.md` §0.
|
||||
- **The planets** — a journey through lonely grown-ups (the king, the vain man, the businessman, the
|
||||
lamplighter, the geographer…). Each planet lets the player feel one shape of loneliness.
|
||||
- **The fox** — follows at a distance from the first planet and comes closer through touch (pet,
|
||||
@@ -141,7 +152,14 @@ packages/
|
||||
ui/ # Svelte components + tokens + copy/. No business logic.
|
||||
|
||||
apps/
|
||||
rosea/ # the PWA (Svelte 5 + Vite + workbox) -> @rosea/app
|
||||
rosea/ # the game (Svelte 5 + Vite + workbox) -> @rosea/app. Built twice:
|
||||
# dist/ the PWA, under /Rosea/, with its service worker
|
||||
# dist-tauri/ for the shell: base /, no service worker, no manifest
|
||||
rosea-tauri/ # the Tauri 2 shell -> @rosea/tauri. Wraps apps/rosea/dist-tauri/; imports no package
|
||||
src-tauri/ # Rust (a window and nothing else), tauri.conf.json; no capabilities/, so no IPC
|
||||
android/ # what must survive `tauri android init` (gen/ is never committed): the backup rules,
|
||||
# and MainActivity.kt (the save bridge; the page kept between the system bars)
|
||||
scripts/ # icons from apps/rosea/public/icon.svg; the Android privacy patch
|
||||
|
||||
services/
|
||||
lucerna/ # OPTIONAL discovery service (Phase 4), Rust (Axum) + SQLite.
|
||||
@@ -179,6 +197,7 @@ apps/rosea ──► packages/ui ──► packages/engine ──► packages/sc
|
||||
└───────► packages/identity ──► packages/schema
|
||||
services/lucerna ──► packages/schema (trace shape only, via generated JSON Schema)
|
||||
tools/art-prep ──► art/manifest.json, packages/content, packages/schema (never imported by the app)
|
||||
apps/rosea-tauri ──► apps/rosea's BUILT output (dist-tauri/) only — no package, no source file
|
||||
```
|
||||
|
||||
- `packages/engine` is pure. Time and randomness are parameters. This is what makes growth, taming and
|
||||
@@ -186,6 +205,13 @@ tools/art-prep ──► art/manifest.json, packages/content, packages/schema
|
||||
- `apps/rosea` contains zero growth, taming or sky logic. It renders what the engine returns.
|
||||
- `services/lucerna` must be deletable. If removing it breaks the rose, the planets, the fox, friends
|
||||
or the sunset, the shared sky has stopped being optional and that is a **blocker**.
|
||||
- `.fabrica/` is how Fabrica releases both apps (`fabrica-release.md`): it reads this repository and this
|
||||
repository imports nothing of Fabrica's. The Windows installer also registers `domi-rosea://` for the
|
||||
user (an NSIS hook, no Rust code): any such address opens the garden and nothing else.
|
||||
- `apps/rosea-tauri` must be deletable too: removing it leaves the PWA whole. The game never asks
|
||||
which shell it is in except through one build-time constant, `__ROSEA_SHELL__` (`'web'` or
|
||||
`'tauri'`), read in `apps/rosea/src/App.svelte` only, for wiring (no service worker; the app counts
|
||||
as installed). No package ever reads it.
|
||||
|
||||
### Why Svelte, and where Rust earns its place
|
||||
|
||||
@@ -194,12 +220,41 @@ Web first is the decision: the game must run from a link, on any phone, with no
|
||||
|
||||
- **`services/lucerna`** — a small, long-running, internet-facing service. Rust (Axum) gives memory
|
||||
safety and a tiny footprint on a home server. Its contract is the JSON Schema in `packages/schema`.
|
||||
- **A Tauri 2 shell, later (Phase 6)** — same Svelte code, packaged for Android and iOS, matching the
|
||||
ecosystem's move to Tauri. Its main gift is **local notifications without a server** (see the
|
||||
notification trap in §8).
|
||||
- **A Tauri 2 shell, now (the platform track)** — same Svelte code, packaged for Android, iOS and the
|
||||
desktop, matching the ecosystem's move to Tauri. Its later gift (Phase 6) is **local notifications
|
||||
without a server** (see the notification trap in §8).
|
||||
- **Not** a Rust UI framework (Leptos, Dioxus, Yew) and **not** Rust→WASM for the sunset or star
|
||||
maths: both are small and fast in TypeScript. WASM enters only with a measurement that says it must.
|
||||
|
||||
### Four versions, one garden — decided by the author, 2026-11-17
|
||||
|
||||
| Version | Made from | Runs in | Where it can be built |
|
||||
|:--|:--|:--|:--|
|
||||
| **PWA** | `apps/rosea` → `dist/` | any browser; GitHub Pages under `/Rosea/` | any machine |
|
||||
| **Android** (APK) | `apps/rosea-tauri` → `pnpm tauri:android` | Android System WebView | Windows, macOS or Linux with the Android SDK, NDK 27, JDK 17 and the Rust Android targets |
|
||||
| **Desktop** | `apps/rosea-tauri` → `pnpm tauri:build` | WebView2 (Windows), WKWebView (macOS), WebKitGTK (Linux) | each on its own OS: an NSIS installer on Windows; `.app`/`.dmg` on macOS; `.deb`/AppImage on Linux |
|
||||
| **iOS** | `apps/rosea-tauri` → `pnpm tauri:ios` | WKWebView | **macOS with Xcode only**, and an Apple developer account to put it on a phone |
|
||||
|
||||
- **One codebase.** The same Svelte 5 app, the same packages, the same IndexedDB code in all four.
|
||||
The shell adds a window around the built game and nothing else: no Tauri command, no plugin, no
|
||||
`@tauri-apps/api` in the game. Each plugin that arrives later (notifications in Phase 6) is reviewed
|
||||
for network access before it is added, as in Amicitia.
|
||||
- **Layout: `apps/rosea-tauri/src-tauri/`.** The Tauri 2 CLI looks for `src-tauri/tauri.conf.json`
|
||||
below the folder it runs in, so this is the layout it expects, one level down. Not Tauri's default
|
||||
`apps/rosea/src-tauri/`: that would put Rust and the Tauri CLI into the PWA's package. Here the shell
|
||||
is deletable, and its only input is a built folder — the same seam the e2e suites test
|
||||
(`tauri-platforms.md` D1).
|
||||
- **The shell's build of the game** (`vite build --mode tauri`, into `apps/rosea/dist-tauri/`): base `/`,
|
||||
because Tauri serves the files at the root of its own origin; **no service worker and no web
|
||||
manifest**, because the files are already on the device and a store or installer brings updates;
|
||||
the content-security policy delivered by Tauri (`app.security.csp`), the same string as the PWA's
|
||||
`<meta>` policy, held equal by a test (§8).
|
||||
- **The non-negotiable properties hold in all four.** Local-first, anonymous, no free text, never
|
||||
counting people, nothing written outside IndexedDB, no analytics — in any SDK either: the shell
|
||||
links no analytics, crash-reporting or ads library, and the webviews' own reporting is switched off
|
||||
where the platform allows it (§8, *the webview phones home*). The Android app asks for **no
|
||||
`INTERNET` permission** while Rosea has no network feature, so the kernel refuses it any socket.
|
||||
|
||||
---
|
||||
|
||||
## 3. Commands
|
||||
@@ -218,19 +273,43 @@ pnpm --filter @rosea/engine test # incl. fast-check property tests and t
|
||||
tsx scripts/fetch-sun-golden.ts # re-records the sun's published tables (network; by hand, never in a test)
|
||||
pnpm test:e2e # builds, then Playwright against the BUILT app under /Rosea/
|
||||
pnpm test:offline # builds, loads once, CLOSES the server, reloads
|
||||
pnpm validate:library # every hope sentence; fixtures must FAIL
|
||||
pnpm validate:library # every hope sentence and candidate; fixtures must FAIL
|
||||
pnpm library:verify <id…> --by <name> # the AUTHOR moves checked candidates into the library; agents never run it
|
||||
pnpm lint:copy # forbidden words and names (§5.6)
|
||||
pnpm guard:cpu # waits for, then refuses, a machine above 80 % CPU (§5.7)
|
||||
pnpm art:board # prompts + stand-ins -> tools/art-prep/dist/board/ (docs/ART.md)
|
||||
pnpm art:accept <id> <file> # an accepted picture -> art/final/*.webp, sheets cut
|
||||
tsx scripts/build-places.ts <folder> # rebuilds the town list from downloaded Natural Earth + tzdb (by hand)
|
||||
|
||||
# The Tauri 2 shell (apps/rosea-tauri) — each builds the game for the shell first (dist-tauri/):
|
||||
pnpm tauri:dev # desktop window on the Vite dev server, 127.0.0.1:5173
|
||||
pnpm tauri:build # desktop release: on Windows an NSIS installer and the .exe
|
||||
# needs Rust (MSVC), WebView2, VS Build Tools; macOS/Linux on their own OS
|
||||
pnpm tauri:android # Android debug APK (arm64); needs ANDROID_HOME, NDK 27, JDK 17,
|
||||
# the four Rust Android targets. Install: adb install -r <apk>
|
||||
pnpm tauri:ios # macOS + Xcode only — refuses elsewhere with the reason (§8)
|
||||
pnpm --filter @rosea/tauri test # the shell's tests: config (CSP, name, origin), privacy patch, shell build
|
||||
tsx e2e/apps/check-garden.ts desktop # the built .exe: water her, close, reopen, still watered (temp data folder)
|
||||
tsx e2e/apps/check-garden.ts android # the installed APK on the device over adb; `pm clear`s the TEST app first
|
||||
pnpm tauri:android-release # the release APK (unsigned; verified with aapt2); Fabrica signs it in Custos
|
||||
|
||||
# Released through Fabrica (.fabrica/; .agents/features/fabrica-release.md):
|
||||
node scripts/check-version.mjs <x.y.z> # the four version files agree; Fabrica's Deploy bumps what it names
|
||||
pnpm aula:shots # builds, then the Aula pictures on demo data -> e2e/aula/*.png
|
||||
fabrica artifex check # the pipelines, tests.yaml, aula.yaml and the brief
|
||||
fabrica tests run --target web # the e2e specs as Fabrica's target (build first)
|
||||
fabrica tests run --target phone # the debug APK on the test phone, ONLY through Fabrica's phone queue
|
||||
fabrica deploy rosea --part desktop # a release: bump, tag, the hub's run, Mark's Custos cards. Public: G6.1 first
|
||||
|
||||
# Not yet — they arrive with their first feature:
|
||||
cargo test --manifest-path services/lucerna/Cargo.toml # Phase 4 onward
|
||||
```
|
||||
|
||||
The build's base path is `/Rosea/` (GitHub Pages' project sub-path); `ROSEA_BASE=/x/` overrides it
|
||||
for the build and for both Playwright suites together.
|
||||
for the build and for both Playwright suites together. `pnpm --filter @rosea/app build:shell` builds
|
||||
the shell's copy instead (`--mode tauri`: base `/`, into `dist-tauri/`); the `tauri:*` commands run it.
|
||||
`pnpm tauri:android` ends by reading the built APK with `aapt2` and fails if it asks for any
|
||||
permission or allows backup (`tauri-platforms.md` D6).
|
||||
|
||||
> **The `pnpm test` trap, imported from Aeterna.** Exit code 0 says the command succeeded, not that
|
||||
> tests ran. A filter that matched nothing and a green run look identical. **Quote the counts per
|
||||
@@ -249,18 +328,35 @@ for the build and for both Playwright suites together.
|
||||
|
||||
| Store | Contents | Written by |
|
||||
|:--|:--|:--|
|
||||
| `events` | **append-only** log: care given, care received, planet steps, sunsets seen or missed, gestures | `packages/storage`, from the game loop |
|
||||
| `events` | **append-only** log: care given, care received, petals opened, planet steps, sunsets seen or missed, gestures | `packages/storage`, from the game loop |
|
||||
| `derived` | rose stage, fox distance, paths, sky light — rebuilt from `events` | `packages/storage`, from values the engine returns |
|
||||
| `profile` | the rose's name (the only name Rosea knows), chosen city for sunset (skippable; fallback is the device time zone; never GPS), settings, opt-ins | settings screen |
|
||||
| `keys` | the identity keypair | `packages/identity` |
|
||||
| `library` | the cached hope library and planets' content, versioned | `packages/content` |
|
||||
| `library` | the cached hope library and planets' content, versioned — not used yet: the library is bundled at build time (day-sentence.md P5) | `packages/content` |
|
||||
|
||||
**`events` is the truth; `derived` is a cache.** Anything in `derived` must be reconstructible by
|
||||
replaying `events` through the engine. A number that cannot be derived from the log does not belong in
|
||||
`derived`.
|
||||
|
||||
**Nothing else is written anywhere.** No cookies, no `localStorage`, no analytics of any kind, no
|
||||
third-party origin, no fonts or images from a CDN.
|
||||
third-party origin, no fonts or images from a CDN. This holds in the shell too: `localStorage` and
|
||||
`sessionStorage` stay forbidden there, and the Rust side writes no file of its own. (The webview keeps
|
||||
its own profile beside the database: caches, an empty Local Storage folder Chromium makes, and on
|
||||
Android hashed visit counters for its metrics, which are switched off and cannot be sent.)
|
||||
|
||||
**Where IndexedDB lives in each version** (the webview owns the folder; Rosea writes only its
|
||||
database there — the webview keeps its own caches beside it):
|
||||
|
||||
| Version | Where the `rosea` database is |
|
||||
|:--|:--|
|
||||
| PWA | the browser profile, per origin; evictable (§8) |
|
||||
| Windows | WebView2's user data folder: `%LOCALAPPDATA%\<identifier>\EBWebView\` |
|
||||
| Android | the app's private data: `/data/data/<identifier>/app_webview/Default/IndexedDB/https_tauri.localhost_0.indexeddb.leveldb` (seen on the tablet) — no Auto Backup, no device transfer (`tauri-platforms.md` D6) |
|
||||
| macOS / iOS | WKWebView's website data in the app's container (`Library/WebKit/`) *(predicted)* |
|
||||
| Linux | WebKitGTK's data dir under `~/.local/share/<identifier>/` *(predicted)* |
|
||||
|
||||
A rose made in the PWA and the same player's Android app are **two roses** until the player carries
|
||||
one across with *Keep her safe* (save to a file, bring her back). Nothing syncs them.
|
||||
|
||||
**On `services/lucerna`, only when the player has opted in to the shared sky (Phase 4):** an anonymous
|
||||
trace id, a coarse geocell (~1 km), a day bucket (never a timestamp finer than a day), and the gesture
|
||||
@@ -313,6 +409,8 @@ Format : [<Package>] <FeatureName>: <one-line description>
|
||||
Example: [engine] RoseGrowth: Grow from total days of care, never from consecutive days
|
||||
Remote : GitHub (primary) — branch main; mirrored to gitea.marek-novak.cz, as in Panda Domi
|
||||
Deploy : GitHub Actions builds apps/rosea and publishes it to GitHub Pages on every merge to main
|
||||
Apps : the APK and the desktop installer are built by hand on this machine until CI can (G0.22);
|
||||
never committed. Release signing keys never enter the repository (§5.3's token rule)
|
||||
```
|
||||
|
||||
PRs are opened and merged on GitHub. The Gitea mirror is a backup and must stay in sync — after every
|
||||
@@ -360,7 +458,10 @@ repository, a review document or command output.
|
||||
### 5.4 The deployed bundle is the only thing the player sees
|
||||
|
||||
The player opens an installed PWA served from a precached shell. Source changes are invisible until
|
||||
the app is rebuilt, the service worker's bytes change, and the client picks up the new worker. When
|
||||
the app is rebuilt, the service worker's bytes change, and the client picks up the new worker. In the
|
||||
Android, iOS and desktop apps the game is inside the package: a change reaches a player only with a
|
||||
new APK or installer, which must carry a higher version (`apps/rosea/package.json`, read by
|
||||
`tauri.conf.json`) or Android refuses it as a downgrade. When
|
||||
reporting a fix, **say whether the bundle was rebuilt and redeployed**. If a change is deliberately
|
||||
invisible (a refactor, a library update), say so explicitly — a fresh build that looks identical is
|
||||
otherwise indistinguishable from a stale one. *(Imported from NoAlgoTube and Aeterna, where it
|
||||
@@ -412,7 +513,10 @@ happened twice.)*
|
||||
|
||||
### 5.7 A test run leaves the machine as it found it
|
||||
|
||||
Nothing binds to anything but `127.0.0.1`. Every browser a test starts is closed in `finally`. Do not
|
||||
Nothing binds to anything but `127.0.0.1` — the shell's dev server and a webview's debugging port
|
||||
included; a phone reaches the dev server through `adb reverse`, never through `--host`. Every browser
|
||||
a test starts is closed in `finally`, and so is every app a test launches (the desktop `.exe`, the
|
||||
app on the tablet: `am force-stop`). Do not
|
||||
start a full run above ~80% CPU. *(Imported from Ludus and Aeterna.)* **Enforced, not trusted:**
|
||||
`pnpm test`, `test:e2e` and `test:offline` first run `pnpm guard:cpu`, which waits up to three minutes
|
||||
for the machine to calm and then refuses (`tools/cpu-guard`, lessons/process.md). A dedicated machine
|
||||
@@ -447,8 +551,8 @@ player can send another player, and the sender picks one.
|
||||
"trace": "petal:<colour>", "messageId": "ps-23-4" | null, "clientVersion": "0.1.0" }
|
||||
// act applies to the player's own rose or another player's. (This example once
|
||||
// listed "wind" | "light"; §1's weeds and fallen petals won — phase0-workspace.md D5.)
|
||||
// Only "care" is in packages/schema so far; each other kind arrives with the feature doc that uses it.
|
||||
// other kinds: "sentence-opened", "sunset" (seen), "planet-step", "fox" (pet | brush | feed),
|
||||
// "care" and "sentence-opened" are in packages/schema so far; each other kind arrives with the
|
||||
// feature doc that uses it. Other kinds: "sunset" (seen), "planet-step", "fox" (pet | brush | feed),
|
||||
// "harvest" (berry kind), "thanks", "lantern" (lit — never unlit)
|
||||
```
|
||||
|
||||
@@ -493,7 +597,7 @@ No timestamp finer than a day, no precise location, no free text, no link to the
|
||||
|
||||
| Trap | Why it bites |
|
||||
|:--|:--|
|
||||
| **A PWA cannot schedule a local notification** *(predicted — verify first)* | The sunset invitation is time-based. A web app generally cannot fire a notification at a set time while closed without a **push server** sending it, and a push server that knows when someone's sunset is knows roughly where they are. On iOS, web push works only for a site added to the home screen. **Decided in Phase 0 (2026-11-01):** in-app sunset only for the web build — no push server — and local notifications through the Tauri shell later (Phase 6). |
|
||||
| **A PWA cannot schedule a local notification** *(predicted — verify first)* | The sunset invitation is time-based. A web app generally cannot fire a notification at a set time while closed without a **push server** sending it, and a push server that knows when someone's sunset is knows roughly where they are. On iOS, web push works only for a site added to the home screen. **Decided in Phase 0 (2026-11-01):** in-app sunset only for the web build — no push server — and local notifications through the Tauri shell later (Phase 6). The shell exists since 2026-11-17; its notification plugin is still Phase 6. |
|
||||
| **Polar day and polar night** *(measured 2026-11-01)* | Above the Arctic Circle the sun does not set in summer or rise in winter. "Every day at sunset" has no answer there. Measured: the almanac has no rise or set in Tromsø on 21 June and no events at all on 21 December. `engine/sun` returns `polar-day` or `polar-night` and a gentle moment for each (the lowest light; noon twilight) — `.agents/features/sun.md` D4. |
|
||||
| **DST and the local day** *(measured 2026-11-01)* | Sunset jumps an hour twice a year under a player who did nothing: Prague's is 18:28 on 28 March and 19:29 on the 29th, while the sun moved one minute. A day boundary computed in UTC records Monday-evening care as Tuesday's. One module computes the day; the sun works in instants. |
|
||||
| **Comfort becomes wallpaper** | The same words every day stop meaning anything. Comfort words are occasional; the real trace of a real person is constant. Track repetition in tests. |
|
||||
@@ -505,15 +609,25 @@ No timestamp finer than a day, no precise location, no free text, no link to the
|
||||
| **Location makes people findable** | Coarse cells next to a sparse population identify a house. Cell size must adapt to density, traces must be delayed and auto-deleted, and stranger contact is consent-only (§5.6). |
|
||||
| **The library as a scam channel** | If any field lets a sender attach free text, a lonely recipient can be manipulated. The id-only contract (§6.1) is the defence. |
|
||||
| **Copyright through the back door** | An image prompt "in the style of" the book's drawings, a fox or rose that looks like the original, or a famous line "paraphrased" too closely. All forbidden (§5.6); the art pipeline checks likeness (`docs/ART.md`). |
|
||||
| **A child on a small round planet with a rose** *(a risk the author accepted, 2026-11-17)* | It is the book's most recognisable image, and its estate holds trademarks. The author chose it knowingly. Keep every guard (STYLE.md S2, S6, §3b, review points 10–11: the gardener is the player's own, in work clothes, never a scarf, coat, cape, suit or crown; the planet is a cultivated garden, never volcanoes, baobabs or a lone lamp post), and **a legal check of the look comes before any public release** (G6.1). |
|
||||
| **Medical claims in a store listing** | One word like *heal* in marketing copy can pull the product toward medical-device rules. `lint:copy` also runs on store text kept in the repo. |
|
||||
| **IndexedDB is evictable** *(predicted; answered by `keep-her-safe.md`)* | WebKit can discard origin storage after seven days without interaction — exactly the shape of a player who drifted away and comes back. Call `navigator.storage.persist()` where it exists, prompt iOS players to install, and make export-my-rose a first-class feature. A player returning to find their rose gone is the cruellest bug this product could have. |
|
||||
| **The stale service worker** *(answered by `calm-refresh.md`)* | A precached shell keeps serving old JS to a player who has "updated". Detect a waiting worker and offer an explicit, calm *refresh* control. |
|
||||
| **Two tabs, one database** *(predicted)* | Two event streams into one store; derived state drifts. Use a `BroadcastChannel` lock. |
|
||||
| **Two tabs, one database** *(measured 2026-11-07; answered by `two-tabs.md`)* | Predicted: derived state drifts, use a lock. Measured: nothing stored drifts (the log is append-only, there is no `derived` store yet), so no lock — but each tab's **view** went stale, and a player could water her twice. `packages/storage` announces each committed write on a `BroadcastChannel`; the other tabs read again, keeping what they already show. When a `derived` store arrives, decide the lock again. |
|
||||
| **GitHub Pages serves under a sub-path** *(predicted)* | A project site lives at `/<repo>/`, not `/`. Vite `base`, the web manifest `start_url` and `scope`, and the service worker scope must all agree, or the installed app opens a 404 or never updates. The offline suite runs against the same base path. |
|
||||
| **GitHub Pages cannot set response headers** *(predicted)* | No custom CSP or cache headers. The content-security policy goes in a `<meta>` tag; caching is controlled by the service worker and hashed filenames. |
|
||||
| **Pages hosts files, not services** | `services/lucerna` cannot live on Pages. It runs on Mark's own server (Phase 4), and the app must work fully without it. |
|
||||
| **`pnpm test` exits 0 having run nothing** | Quote counts per package. |
|
||||
| **Playwright against the dev server** | It never registers the service worker and has never reproduced a caching bug. |
|
||||
| **Base path in the shell** *(measured 2026-11-17)* | The PWA lives under `/Rosea/`; Tauri serves the game at the root of its own origin (`https://tauri.localhost/` on Windows and Android with `useHttpsScheme`, `tauri://localhost/` on macOS and iOS). A shell build with base `/Rosea/` would ask for `/Rosea/assets/…` and open a blank window. The shell's copy is built with base `/` into its own folder, so the two can never be mixed up; measured: the garden opens at `https://tauri.localhost/` on Windows and on Android. |
|
||||
| **A service worker inside a webview** *(answered 2026-11-17)* | Inside Tauri the files are already on the device; a worker would cache a second copy, could serve a stale game after an app update, and *A new version of the garden is ready* would offer a refresh that fetches nothing. The shell's build has no worker and no manifest: `vite-plugin-pwa` is disabled there and `registerSW` is its no-op. Measured: no registration in either app. |
|
||||
| **Two content-security policies** *(conflict predicted; the answer measured 2026-11-17)* | The PWA carries its policy in a `<meta>` tag (Pages sends no headers). Tauri can deliver its own policy and adds hashes for the scripts it injects; a page with **both** obeys both, and the `<meta>` would block what Tauri adds. So the shell's build has no `<meta>` policy and Tauri delivers the same string, held equal by `apps/rosea-tauri` test. Measured: no CSP violation and no request outside the origin, on Windows and on Android. |
|
||||
| **IndexedDB eviction in a webview** *(partly measured 2026-11-17)* | WebView2 and Android WebView are Chromium: best-effort storage can be cleared under disk pressure, and an app's data is wiped on uninstall (the Windows uninstaller offers to delete app data). WKWebView on iOS may purge website data of an app that is not used. `persist()` answers `false` in WebView2 and in Android WebView (measured). *Keep her safe* is the real defence. In the apps it speaks of the app, not a browser, and on Android it saves through Android's own save screen, because `<a download>` does nothing in Android WebView (measured; `keep-her-safe-apps.md`). |
|
||||
| **The webview phones home** *(measured in Amicitia, 2026-11-08; here: Android closed by construction, Windows unmeasured)* | A webview talks to its maker on its own: WebView2 to Microsoft and DNS-over-HTTPS providers, Android WebView to Google's metrics and an Autofill server as soon as a field takes focus. Desktop: `additionalBrowserArgs` switches these off (undocumented feature names a runtime update can break). Android: no `INTERNET` permission at all while Rosea has no network feature, plus metrics and Safe Browsing off in the manifest, applied by a committed patch because `gen/` is regenerated. Measure on every release build. |
|
||||
| **Auto Backup sends the garden to a cloud** *(answered 2026-11-17)* | A stock Tauri Android manifest lets Android copy the app's data — the care log, the keys, the chosen town — to the player's cloud backup, without the player choosing it. The patch sets `allowBackup="false"` and excludes every domain from cloud backup and device transfer; *Keep her safe* is how a rose moves. Measured: the installed package carries no `ALLOW_BACKUP` flag and no `INTERNET` permission (`dumpsys package`); `pnpm tauri:android` checks the APK itself with `aapt2`. |
|
||||
| **Android draws under the system bars** *(measured 2026-11-17)* | Tauri's stock activity turns edge-to-edge on, and the WebView does not reliably report the bars as `env(safe-area-inset-*)`: the clock sat over the title, the navigation bar over a button. Rosea's own `MainActivity` (`apps/rosea-tauri/android/java/`, copied into `gen/` by `android.ts`) keeps the page between the bars and paints them with `--paper`. |
|
||||
| **iOS cannot be built on Windows** *(known)* | `tauri ios init` and every iOS build need macOS and Xcode; installing on a phone needs an Apple developer account (free for one's own device, paid for TestFlight and the App Store). `pnpm tauri:ios` refuses on Windows with this reason. |
|
||||
| **The bundle identifier and the origin are forever** | An Android `applicationId` or iOS bundle id cannot change after a release without becoming a different app: the old one keeps the player's rose, the new one starts empty. Chosen once (`cz.mareknovak.domi.rosea`), before the first release, even though the product name may still change. The same holds for `useHttpsScheme` (`true`): flipping it changes the webview's origin, and IndexedDB is per origin, so the rose is left behind. The shell's test pins both. |
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +641,8 @@ No timestamp finer than a day, no precise location, no free text, no link to the
|
||||
| Change how the rose grows | `packages/engine/src/growth/` |
|
||||
| Change how the fox comes closer | `packages/engine/src/taming/` |
|
||||
| Change the sunset or sunrise | `packages/engine/src/sun/` — read the polar and DST traps first |
|
||||
| Add or edit hope sentences | `content/library/` — then `pnpm validate:library` |
|
||||
| Add or edit hope sentences | Agents propose in `content/candidates/`; the author verifies with `pnpm library:verify`. Then `pnpm validate:library` |
|
||||
| Change what friends can send each other | `packages/schema` §6.1 — and re-read §5.6 rule 1 |
|
||||
| Change the shared sky | `services/lucerna/` — and re-read §4 and §5.6 rules 6–7 |
|
||||
| Build the Android, iOS or desktop app | `apps/rosea-tauri/`, then `.agents/features/tauri-platforms.md` and the shell traps in §8 |
|
||||
| Understand a past decision | `.agents/features/*.md`, `git log`, `.agents/reviews/*.md` |
|
||||
|
||||
@@ -2,7 +2,36 @@
|
||||
|
||||
Rewritten at the end of each session (CLAUDE.md §5.1).
|
||||
|
||||
## Last session — 2026-10-31 to 2026-11-01
|
||||
## Latest — 2026-11-21: the APK for a release, tested through the phone queue (blocked twice)
|
||||
|
||||
- **`feature/android-release-apk`**: the phone target says `reset: uninstall` and `maxMinutes: 20`; the e2e
|
||||
pipeline gains `apk` and `phone` (`device: Wave 10`, so the hub queues it); both pipelines name the NDK and put
|
||||
Gradle's cache on D:. Analysis: [`.agents/features/android-release-apk.md`](.agents/features/android-release-apk.md).
|
||||
Review: [`.agents/reviews/feature-android-release-apk.md`](.agents/reviews/feature-android-release-apk.md).
|
||||
- **Blocked on the phone:** the Wave 10 is not paired in Fabrica (`fabrica devices list`), so the `phone` step
|
||||
cannot get it. Pairing is the Fabrica session's; nothing here drove the phone.
|
||||
- **Blocked on the key:** `rosea-android` does not exist, and Custos will not make it, because it is not in Custos's
|
||||
`ANDROID_APPS` (0.22.0 here, 0.24.0 too). This corrects `fabrica-release.md` F4. It needs a Custos change or
|
||||
Mark's *Create Android key* (G-F7).
|
||||
- **Still the author's:** publication (G6.1, G-F1).
|
||||
|
||||
## Earlier — 2026-11-19: released through Fabrica (built, not published)
|
||||
|
||||
- **Rosea is a Fabrica app** (`feature/fabrica-release`, PR mnovak/Rosea#1): `.fabrica/` (app, the
|
||||
`release` and `e2e` pipelines, `tests.yaml` with `web` and `phone`, `aula.yaml`), `AULA.md`, the brief
|
||||
and the 0.1.0 notes, `scripts/check-version.mjs`, the APK signed in Custos (`sign:apk`,
|
||||
`rosea-android`), `domi-rosea://` from the installer, the pictures on demo data (`pnpm aula:shots`).
|
||||
Analysis: [`.agents/features/fabrica-release.md`](.agents/features/fabrica-release.md). Review:
|
||||
[`.agents/reviews/feature-fabrica-release.md`](.agents/reviews/feature-fabrica-release.md).
|
||||
Rosea is in Fabrica's workspace and `deploy.json` on this PC.
|
||||
- **No release was made.** The Gitea repository is public, so a release is public, and G6.1 comes
|
||||
first. The author's choice is open (G-F1): publish anyway, make the repository private first, or wait.
|
||||
- **Before the first release, in Custos (Mark):** `domi-code-signing` and `domi-release` scoped to
|
||||
`mnovak/Rosea`; `rosea-android` is made by Custos on the first APK signature; back the vault up.
|
||||
- **Not run:** the `phone` target (only through Fabrica's phone queue); no installer was run, so
|
||||
`domi-rosea://` is tested as text only (G-F4).
|
||||
|
||||
## Earlier — 2026-10-31 to 2026-11-17
|
||||
|
||||
**Done.**
|
||||
|
||||
@@ -12,9 +41,10 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
|
||||
Gitea hashes match. Analysis: [`.agents/features/phase0-workspace.md`](.agents/features/phase0-workspace.md).
|
||||
Review, with counts and the mutation results:
|
||||
[`.agents/reviews/feature-phase0-workspace.md`](.agents/reviews/feature-phase0-workspace.md).
|
||||
- **Gates:** all pass on this machine. Unit tests: 389 (cpu-guard 13, identity 5, schema 16,
|
||||
content 71, storage 51, art-prep 56, engine 136, ui 41). E2E: 14. Offline: 1. `lint:copy`: 19 files, 0 problems.
|
||||
`validate:library`: 13 of 13 fixtures rejected.
|
||||
- **Gates (2026-11-17, the planet garden merged with the Tauri shells):** all pass on this machine.
|
||||
Unit tests: 561 (cpu-guard 13, identity 5, schema 19, content 88, storage 70, art-prep 63, tauri 40,
|
||||
engine 179, ui 84). E2E: 26. Offline: 1. Tablet (`pnpm test:android`): 7. `lint:copy`: 26 files, 0 problems.
|
||||
`validate:library`: 13 of 13 fixtures rejected; 78 candidates pass.
|
||||
- **Built, not deployed:** there is no host yet.
|
||||
- **Roadmap and gameplay docs:** `docs/ROADMAP.md` and `docs/GAMEPLAY.md` are on
|
||||
`docs/roadmap-gameplay`, as the author gave them, together with a read against the
|
||||
@@ -27,8 +57,12 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
|
||||
[`.agents/reviews/feature-letter-slot.md`](.agents/reviews/feature-letter-slot.md).
|
||||
- **The art pipeline and the art board:** merged to `main`. [`docs/ART.md`](docs/ART.md) is the
|
||||
pipeline. [`art/STYLE.md`](art/STYLE.md) is approved by the author (2026-11-01, S1–S5 kept as drafted). [`art/manifest.json`](art/manifest.json)
|
||||
lists 53 pictures in phase order: 25 for Phase 1, then the fox, berries and bush (Phase 2), then paths and
|
||||
lanterns (Phase 3). 63 stand-ins are in `art/placeholders/`. The planets wait for their own feature docs. `tools/art-prep` builds
|
||||
lists 86 pictures in phase order, everything Phases 1–5 need (34 for Phase 1; the planets are drafts
|
||||
until their feature docs). 101 stand-ins are in `art/placeholders/`. **Board v2 (2026-11-07):** after
|
||||
Mark disliked the first `rose-sheet` (watercolour, a smiley on a ball), STYLE.md §1 and every
|
||||
prompt were rewritten: the look first, the face on her petals, the grid in words, the book's
|
||||
motifs checked in review instead of named in prompts. Review:
|
||||
[`.agents/reviews/art-board-v2.md`](.agents/reviews/art-board-v2.md). `tools/art-prep` builds
|
||||
prompts and the board (`pnpm art:board`) and moves accepted pictures into `art/final/`
|
||||
(`pnpm art:accept`). The board is published, private:
|
||||
https://claude.ai/artifact/Y3xM4F5WGv77Qp2UdMXWix. To update it, run `pnpm art:board`, then
|
||||
@@ -71,6 +105,80 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
|
||||
*Refresh*. Nothing reloads by itself. With this, fixes can reach a phone once the app is hosted.
|
||||
Review: [`.agents/reviews/feature-calm-refresh.md`](.agents/reviews/feature-calm-refresh.md).
|
||||
|
||||
- **The in-game sunset (Phase 1):** merged to `main`. *Move the chair* under tonight's sunset line
|
||||
opens a quiet scene: the sky drawn in code from day to dusk, the sun setting behind the garden,
|
||||
half a minute with nothing to press; then the real sunset's time, *Watch it again*, *Back to the
|
||||
rose*. Escape or a tap leaves early. Review:
|
||||
[`.agents/reviews/feature-chair-sunset.md`](.agents/reviews/feature-chair-sunset.md).
|
||||
|
||||
- **The day's sentence (Phase 1, G1.5):** merged to `main`. When the rose needs nothing she keeps
|
||||
a folded petal; *Open her petal* shows one sentence and its source. One a day; an unopened petal
|
||||
is the same petal next week; on a nearby day she also remembers an earlier one; around the real
|
||||
sunset she says *The sun is low now*, and after opening, *Go and look at the sky.* The library is
|
||||
bundled at build time after `validate:library` passes. **The shipped app shows no petal yet:**
|
||||
the library is empty until the author verifies sentences. 78 candidates wait in
|
||||
`content/candidates/`, each copied from a Project Gutenberg edition and checked against it by
|
||||
script; read [`content/candidates/README.md`](content/candidates/README.md) first, then
|
||||
`pnpm library:verify <id…> --by Mark`. Analysis:
|
||||
[`.agents/features/day-sentence.md`](.agents/features/day-sentence.md). Review:
|
||||
[`.agents/reviews/feature-day-sentence.md`](.agents/reviews/feature-day-sentence.md).
|
||||
- **Thorns (Phase 1):** merged to `main`, as the author chose (thorns teach gentleness). *Touch her*
|
||||
over her picture: a fond answer, a blush on the first touch of a visit; three quick taps and she
|
||||
says *Gently. I have thorns.* and rests four seconds. A tremor's taps count as one. Nothing is
|
||||
recorded. Tuning in `TOUCH` (`packages/engine/src/touch/touch.ts`). Review:
|
||||
[`.agents/reviews/feature-thorns.md`](.agents/reviews/feature-thorns.md).
|
||||
- **Two tabs (2026-11-07):** merged to `main`. Measured first: an open tab did not see care or a
|
||||
town from another tab, so a player could water her twice. Storage now announces each committed
|
||||
write on a `BroadcastChannel`; the other tabs read again. No lock: nothing stored can drift.
|
||||
On this date the root `node_modules` was found missing; `pnpm install --frozen-lockfile`
|
||||
restored it. Review: [`.agents/reviews/fix-two-tabs.md`](.agents/reviews/fix-two-tabs.md).
|
||||
- **The sunrise (2026-11-17):** merged to `main`. From sunset until it comes, the garden's line names
|
||||
the real sunrise; the in-game sunset still names the sunset. Seen on a real Android tablet.
|
||||
Review: [`.agents/reviews/feature-sunrise.md`](.agents/reviews/feature-sunrise.md).
|
||||
- **The town list's clocks for Chile (2026-11-17):** merged to `main`. Santiago and Valparaíso had
|
||||
been on a southern zone's clock (no daylight saving) since the first build, and Aysén and
|
||||
Magallanes on Santiago's. Found because the upgraded Node knows America/Coyhaique. Review:
|
||||
[`.agents/reviews/fix-coyhaique.md`](.agents/reviews/fix-coyhaique.md).
|
||||
- **Tested on a real Android tablet (2026-11-17):** the built app over USB (`adb reverse`, the server
|
||||
still on 127.0.0.1), driven through Chrome's DevTools socket: first open, the town, watering by a
|
||||
real held touch, the in-game sunset, and **offline** reloads with the server unreachable all pass.
|
||||
When device testing ends, the app used is stopped at once (the author's rule).
|
||||
- **Her planet and the gardener (2026-11-17, G1.9):** merged to `main`, as the author decided after
|
||||
seeing a page of buttons. She lives on a round tiny planet; at the first open *Who tends her?* lets
|
||||
the player dress a boy or a girl (fixed lists, kept in `profile`, never in the rose file; *Change
|
||||
gardener* reopens it). A tap on her opens the ring of what she needs today plus *Touch her*; the
|
||||
gardener walks round the planet to the work. By hand: press the can and move sideways to tilt and
|
||||
pour (further tilts pour faster), swipe each weed up and out, sweep across the fallen petals, drag
|
||||
the windbreak to her windward side, stroke her petals slowly. Every gesture is also a button.
|
||||
The pictures are code stand-ins until the board's are painted. **Accepted risk:** a child on a
|
||||
small round planet with a rose is the book's best-known image; the guards are in STYLE.md (S2, S6,
|
||||
§3b, review points 10–11), and a legal check comes before any public release (G6.1). Tested by
|
||||
real touch on the Android tablet (`pnpm test:android`, 7 of 7). Analysis:
|
||||
[`.agents/features/planet-garden.md`](.agents/features/planet-garden.md). Review:
|
||||
[`.agents/reviews/feature-planet-garden.md`](.agents/reviews/feature-planet-garden.md).
|
||||
- **Four versions, one garden (2026-11-17):** merged to `main`, as the author decided: the PWA plus
|
||||
an Android, iOS and desktop app from one codebase through a Tauri 2 shell, `apps/rosea-tauri`
|
||||
(CLAUDE.md §2 *Four versions*, §3, §4, §8; ROADMAP *The platform track*). The **Windows app**
|
||||
(`pnpm tauri:build`) and an **Android debug APK** (`pnpm tauri:android`) were built here; both
|
||||
passed the garden check (watered, closed, reopened, still watered; nothing outside the origin).
|
||||
The APK asks for no permission, not even `INTERNET`, and allows no backup (checked on the APK and
|
||||
on the tablet). **iOS needs a Mac** (G-T1). *Keep her safe* in the apps was a release blocker
|
||||
(G-T4); it is closed, see the next entry. The debug APK and installer are build output on this
|
||||
machine, not committed:
|
||||
`apps/rosea-tauri/src-tauri/gen/android/app/build/outputs/apk/universal/debug/` and
|
||||
`apps/rosea-tauri/src-tauri/target/release/bundle/nsis/`. Analysis:
|
||||
[`.agents/features/tauri-platforms.md`](.agents/features/tauri-platforms.md). Review:
|
||||
[`.agents/reviews/feature-tauri-platforms.md`](.agents/reviews/feature-tauri-platforms.md).
|
||||
- **Keep her safe in the apps (2026-11-17):** merged to `main`; closes the release blocker G-T4.
|
||||
In the apps she *lives in this app, on this device, until the app is removed*; no browser is
|
||||
asked. On Android *Save her to a file* opens Android's own save screen (a small Kotlin bridge in
|
||||
`apps/rosea-tauri/android/java/MainActivity.kt`; no plugin, no permission) and the garden says
|
||||
*She is in that file now.*; bringing her back from that file works. The page now stays between
|
||||
Android's system bars. Seen on the tablet and on Windows. Review:
|
||||
[`.agents/reviews/feature-keep-her-safe-apps.md`](.agents/reviews/feature-keep-her-safe-apps.md).
|
||||
- **Phase 1 is built in code.** What remains of it is the author's: verified sentences (the petal
|
||||
appears with them), hosting (G0.13), and the gate itself — two weeks of daily play on a phone.
|
||||
|
||||
**Phase 0 is not finished.** The roadmap's Phase 0 is more than the workspace. Its
|
||||
gate needs 60 verified sentences (G0.18) and one illustration through the art
|
||||
pipeline (G0.24). The pipeline and the board are built; the first real picture is not made yet. Also open: a GitHub remote (G0.13). The Letter slot is built (G0.25).
|
||||
@@ -80,24 +188,50 @@ The notification decision is made: in-app only on the web (G0.26).
|
||||
|
||||
1. **The Letter:** the words in `docs/LETTER.md`, the verified support lines for the
|
||||
door to real help (G0.27), and Q9 (may the letter name the book).
|
||||
2. **Sentences:** an agent may propose public-domain candidates with their sources.
|
||||
Only the author can mark one verified.
|
||||
2. **Sentences:** 78 candidates are ready in `content/candidates/` (10 flagged in its README).
|
||||
Verifying 60 closes the Phase 0 sentence gate (G0.18) and puts the petal in the app. Also
|
||||
the petal's tuning (`PETAL` in `packages/engine/src/petal/petal.ts`: remembering within 3 days,
|
||||
the good moment an hour either side of sunset) and its words in `packages/ui/src/copy/en.ts`.
|
||||
3. **Art:** the style is approved (S1–S5), and so is the fox (F1–F4, with a deep red-orange coat).
|
||||
Make `rose-sheet` on the board and accept it; `fox-sheet` comes first for Phase 2. That is the first step of the Phase 0 art gate.
|
||||
**Make `rose-sheet` again with the board v2 prompt** (version 4) and accept it when she looks
|
||||
right; `fox-sheet` comes first for Phase 2. That is the first step of the Phase 0 art gate.
|
||||
After an accept, Claude reads the row (`ArtifactData get art/<id>`), downloads the picture
|
||||
(`Artifact read` with the asset id as `path`), runs `pnpm art:accept`, commits on `art/<set>`,
|
||||
and writes `final` back into the row.
|
||||
4. **A GitHub repository** for Pages, and whether it is public (G0.13, G0.23).
|
||||
5. **Upgrading Node** to ≥ 22.13 on this machine (G0.20).
|
||||
6. **The rose's tuning** (`.agents/features/rose.md` R2, R4, R5, R6, all in `ROSE` in
|
||||
4. **The gardener in paint:** *layered parts* (Mark, 2026-11-17; STYLE.md §3b). Make
|
||||
`gardener-sheet`, then the guide `gardener-poses-sheet`, and accept both; then the seven first-look
|
||||
layers (first in the board's *Gardener layers* group), each painted over the guide. The other 48
|
||||
can follow over time. Open for Mark: may the choice keep fair curls away from sage clothes (the
|
||||
book's look)? Review: [`.agents/reviews/art-gardener-layers.md`](.agents/reviews/art-gardener-layers.md).
|
||||
Also: a gardener changed in one tab shows in another only after a reload.
|
||||
5. **A GitHub repository** for Pages, and whether it is public (G0.13, G0.23).
|
||||
6. **Node is upgraded** (22.23.4); unpinning the dependencies pinned for 22.11 remains (G0.20).
|
||||
7. **The rose's tuning** (`.agents/features/rose.md` R2, R4, R5, R6, all in `ROSE` in
|
||||
`packages/engine/src/rose/rose.ts`): how fast she gets thirsty, how often weeds, petals and wind
|
||||
come, and how many days of care each stage takes (full bloom after 25). Play it for a week,
|
||||
then say what feels wrong.
|
||||
7. **The apps:** a Mac with Xcode and an Apple developer account for iOS (G-T1); whether the
|
||||
desktop window (480 × 800, portrait) should be wider; the release signing keys, kept outside
|
||||
the repository (G-T3).
|
||||
|
||||
**How this machine works** (not in the code):
|
||||
|
||||
- **The CPU guard:** the full runs wait for this machine to drop to 80 % CPU (§5.7). Other projects'
|
||||
test runs share it, so a wait of a minute or two is normal; three minutes, and the run is refused.
|
||||
On 2026-11-17 two qemu virtual machines held it at 100 % for long stretches; waiting worked.
|
||||
- **Things vanish:** the root `node_modules` (twice, 2026-11-07 and 11-17) and Playwright's browser in
|
||||
`F:\ms-playwright` (11-17) disappeared; the code and history were intact. Restore with
|
||||
`pnpm install --frozen-lockfile` and `pnpm exec playwright install --only-shell chromium` (a
|
||||
download: ask first). The cause is unknown.
|
||||
- **The Android tablet:** WAVE 10C on USB debugging; always `adb -s WAVE10CEEA036785` (an emulator
|
||||
attaches too, and other projects use the same tablet). Stop the app used when testing ends.
|
||||
`pnpm test:android` with `ROSEA_ADB=F:\Tools\Android\Sdk\platform-tools\adb.exe` and
|
||||
`ROSEA_ANDROID_SERIAL=WAVE10CEEA036785`, while `vite preview` serves the build on 127.0.0.1:4173;
|
||||
it stops Chrome and removes its mappings itself, even when it fails.
|
||||
Its USB link drops now and then (`device offline`); `e2e/apps/check-garden.ts` waits and retries.
|
||||
- **Building the apps:** Rust 1.99 (MSVC) with the four Android targets, JDK 17, the Android SDK at
|
||||
`F:\Tools\Android\Sdk` (NDK 27.1), VS 2022 Build Tools, WebView2 and NSIS are all installed; a
|
||||
cold desktop release build takes about 6 minutes, an Android debug build about 2 after that.
|
||||
|
||||
- **Commit identity:** `mnovak <giteatruenasadminacc.from729@passmail.net>`, set in
|
||||
this repository only.
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package cz.mareknovak.domi.rosea
|
||||
|
||||
// Rosea's own MainActivity, copied over the one `tauri android init` generates by
|
||||
// apps/rosea-tauri/scripts/android.ts (gen/ is never committed; `android.ts check` compares it).
|
||||
// .agents/features/keep-her-safe-apps.md A2–A5.
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.webkit.JavascriptInterface
|
||||
import android.webkit.WebView
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.annotation.Keep
|
||||
import androidx.core.graphics.Insets
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
|
||||
class MainActivity : TauriActivity() {
|
||||
private var webView: WebView? = null
|
||||
private var busy = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
enableEdgeToEdge()
|
||||
super.onCreate(savedInstanceState)
|
||||
// Tauri's activity draws edge to edge, and the WebView does not reliably report the bars as
|
||||
// env(safe-area-inset-*): the clock sat over the title and the navigation bar over *Bring her
|
||||
// back from a file* (keep-her-safe-apps review). So the page is kept between the bars, and
|
||||
// the bars show the garden's own paper, light or dark as the system is.
|
||||
paintBehindBars()
|
||||
val bars = WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content)) { view, insets ->
|
||||
val inset = insets.getInsets(bars)
|
||||
view.setPadding(inset.left, inset.top, inset.right, inset.bottom)
|
||||
WindowInsetsCompat.Builder(insets)
|
||||
.setInsets(WindowInsetsCompat.Type.systemBars(), Insets.NONE)
|
||||
.setInsets(WindowInsetsCompat.Type.displayCutout(), Insets.NONE)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
// The manifest lets the activity live through a theme change (uiMode), so the paint follows it here.
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
paintBehindBars()
|
||||
}
|
||||
|
||||
private fun paintBehindBars() {
|
||||
val night = (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES
|
||||
window.decorView.setBackgroundColor(Color.parseColor(if (night) PAPER_DARK else PAPER))
|
||||
}
|
||||
|
||||
// *Save her to a file*: Android WebView does nothing with a blob download, so the game asks
|
||||
// here instead (window.roseaFile.save), and Android's own save screen lets the player choose
|
||||
// where the file goes. No permission is needed for it on any Android version.
|
||||
override fun onWebViewCreate(webView: WebView) {
|
||||
this.webView = webView
|
||||
webView.addJavascriptInterface(RoseFile(), "roseaFile")
|
||||
}
|
||||
|
||||
/** Tells the game whether the file was written (A4): true, or false when the player stepped back. */
|
||||
private fun answer(written: Boolean) {
|
||||
busy = false
|
||||
val view = webView ?: return
|
||||
view.post {
|
||||
view.evaluateJavascript("window.dispatchEvent(new CustomEvent('rosea-file-saved', { detail: $written }))", null)
|
||||
}
|
||||
}
|
||||
|
||||
@Keep
|
||||
inner class RoseFile {
|
||||
/** Only a rose file: its dated name and a bounded text (A3). One save at a time. */
|
||||
@Keep
|
||||
@JavascriptInterface
|
||||
fun save(name: String, text: String) {
|
||||
if (!NAME.matches(name) || text.length > MAX_CHARS) {
|
||||
Log.w(TAG, "refused a file that is not a rose file: ${name.take(64)}, ${text.length} chars")
|
||||
answer(false)
|
||||
return
|
||||
}
|
||||
runOnUiThread {
|
||||
if (busy) return@runOnUiThread
|
||||
busy = true
|
||||
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
|
||||
addCategory(Intent.CATEGORY_OPENABLE)
|
||||
type = "application/json"
|
||||
putExtra(Intent.EXTRA_TITLE, name)
|
||||
}
|
||||
launchActivityForResult(intent) { result ->
|
||||
val uri = result?.data?.data
|
||||
if (result?.resultCode != Activity.RESULT_OK || uri == null) {
|
||||
answer(false)
|
||||
return@launchActivityForResult
|
||||
}
|
||||
val written = try {
|
||||
contentResolver.openOutputStream(uri, "wt")?.use { out ->
|
||||
out.write(text.toByteArray(Charsets.UTF_8))
|
||||
true
|
||||
} ?: false
|
||||
} catch (error: Exception) {
|
||||
Log.e(TAG, "the rose file could not be written", error)
|
||||
false
|
||||
}
|
||||
answer(written)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "RoseaFile"
|
||||
private val NAME = Regex("^rose-\\d{4}-\\d{2}-\\d{2}\\.json$")
|
||||
private const val MAX_CHARS = 8 * 1024 * 1024
|
||||
// --paper in packages/ui/src/tokens.css, light and dark; a test holds them equal.
|
||||
private const val PAPER = "#fbf6f1"
|
||||
private const val PAPER_DARK = "#1d1819"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Android 11 and earlier: no part of the garden is backed up (tauri-platforms.md D6).
|
||||
Copied into gen/android by scripts/android.ts. -->
|
||||
<full-backup-content>
|
||||
<exclude domain="root" path="." />
|
||||
<exclude domain="file" path="." />
|
||||
<exclude domain="database" path="." />
|
||||
<exclude domain="sharedpref" path="." />
|
||||
<exclude domain="external" path="." />
|
||||
<exclude domain="device_root" path="." />
|
||||
<exclude domain="device_file" path="." />
|
||||
<exclude domain="device_database" path="." />
|
||||
<exclude domain="device_sharedpref" path="." />
|
||||
</full-backup-content>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Android 12 and later. Nothing of the garden goes into a cloud backup or a device-to-device
|
||||
transfer: the care log, the keys and the chosen town stay on this device (CLAUDE.md §4,
|
||||
tauri-platforms.md D6). A rose moves only by the player's own hand, with Keep her safe.
|
||||
allowBackup="false" alone does not stop every device-transfer tool on Android 12+, so every
|
||||
domain is excluded here as well. Copied into gen/android by scripts/android.ts. -->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<exclude domain="root" path="." />
|
||||
<exclude domain="file" path="." />
|
||||
<exclude domain="database" path="." />
|
||||
<exclude domain="sharedpref" path="." />
|
||||
<exclude domain="external" path="." />
|
||||
<exclude domain="device_root" path="." />
|
||||
<exclude domain="device_file" path="." />
|
||||
<exclude domain="device_database" path="." />
|
||||
<exclude domain="device_sharedpref" path="." />
|
||||
</cloud-backup>
|
||||
<device-transfer>
|
||||
<exclude domain="root" path="." />
|
||||
<exclude domain="file" path="." />
|
||||
<exclude domain="database" path="." />
|
||||
<exclude domain="sharedpref" path="." />
|
||||
<exclude domain="external" path="." />
|
||||
<exclude domain="device_root" path="." />
|
||||
<exclude domain="device_file" path="." />
|
||||
<exclude domain="device_database" path="." />
|
||||
<exclude domain="device_sharedpref" path="." />
|
||||
</device-transfer>
|
||||
</data-extraction-rules>
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@rosea/tauri",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "The Tauri 2 shell: the Android, iOS and desktop apps around apps/rosea's built game (dist-tauri/). Imports no package.",
|
||||
"scripts": {
|
||||
"dev": "tsx scripts/icons.ts && tauri dev",
|
||||
"build:desktop": "tsx scripts/icons.ts && tauri build",
|
||||
"build:android": "tsx scripts/android.ts prepare && tauri android build --debug --apk --target aarch64 && tsx scripts/android.ts verify",
|
||||
"build:android-release": "tsx scripts/android.ts prepare && tauri android build --apk --target aarch64 && tsx scripts/android.ts verify src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk",
|
||||
"sign:apk": "tsx scripts/sign-apk.ts",
|
||||
"build:ios": "tsx scripts/ios.ts",
|
||||
"android:privacy": "tsx scripts/android.ts apply",
|
||||
"android:verify": "tsx scripts/android.ts verify",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"test": "vitest run --reporter=verbose"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.12.5",
|
||||
"@types/node": "22.20.1",
|
||||
"tsx": "4.23.12",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "3.2.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* The Android app's privacy on the generated project, and the proof on the built APK
|
||||
* (src/android-privacy.ts; tauri-platforms.md D6).
|
||||
*
|
||||
* tsx scripts/android.ts prepare `tauri android init` if needed, icons, then apply
|
||||
* tsx scripts/android.ts apply patch the manifest, copy the rule files, then check
|
||||
* tsx scripts/android.ts check what the generated project lacks; exit 1 if anything
|
||||
* tsx scripts/android.ts verify [apk] the same, read from the BUILT APK with aapt2
|
||||
*
|
||||
* `apply` runs from tauri.android.conf.json's beforeBuildCommand, so `tauri android build`
|
||||
* cannot make an APK without it. A Gradle build started outside the Tauri CLI skips that hook;
|
||||
* `verify` reads the artefact itself, and `pnpm tauri:android` runs it last.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { apkProblems, manifestProblems, patchManifest, RULE_FILES, RULE_SECTIONS, ruleProblems } from '../src/android-privacy.js';
|
||||
import { PACKAGE, SRC_TAURI, tauri } from './tauri.js';
|
||||
|
||||
const MAIN = join(SRC_TAURI, 'gen', 'android', 'app', 'src', 'main');
|
||||
const MANIFEST = join(MAIN, 'AndroidManifest.xml');
|
||||
const RES_FROM = join(PACKAGE, 'android', 'res', 'xml');
|
||||
const RES_TO = join(MAIN, 'res', 'xml');
|
||||
const OUTPUTS = join(SRC_TAURI, 'gen', 'android', 'app', 'build', 'outputs', 'apk');
|
||||
// Rosea's own MainActivity: the save bridge (keep-her-safe-apps.md A2, A5).
|
||||
const IDENTIFIER = (JSON.parse(readFileSync(join(SRC_TAURI, 'tauri.conf.json'), 'utf8')) as { identifier: string }).identifier;
|
||||
const ACTIVITY_FROM = join(PACKAGE, 'android', 'java', 'MainActivity.kt');
|
||||
const ACTIVITY_TO = join(MAIN, 'java', ...IDENTIFIER.split('.'), 'MainActivity.kt');
|
||||
|
||||
function fail(problems: readonly string[]): never {
|
||||
for (const p of problems) console.error(`android: ${p}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function problems(): string[] {
|
||||
if (!existsSync(MANIFEST)) return [`no generated project (${MANIFEST}); run 'pnpm tauri:android'`];
|
||||
const found = manifestProblems(readFileSync(MANIFEST, 'utf8'));
|
||||
for (const f of RULE_FILES) {
|
||||
const at = join(RES_TO, f);
|
||||
if (!existsSync(at)) found.push(`res/xml/${f} is missing`);
|
||||
else if (readFileSync(at, 'utf8') !== readFileSync(join(RES_FROM, f), 'utf8')) found.push(`res/xml/${f} differs from android/res/xml/${f}`);
|
||||
}
|
||||
if (!existsSync(ACTIVITY_TO)) found.push(`no MainActivity.kt at ${ACTIVITY_TO}`);
|
||||
else if (readFileSync(ACTIVITY_TO, 'utf8') !== readFileSync(ACTIVITY_FROM, 'utf8')) {
|
||||
found.push("MainActivity.kt is not Rosea's (android/java/MainActivity.kt): no save bridge");
|
||||
}
|
||||
// The launcher icon is Rosea's, not the Tauri logo `init` put there (scripts/icons.ts).
|
||||
const ours = join(SRC_TAURI, 'icons', 'android', 'mipmap-mdpi', 'ic_launcher.png');
|
||||
const there = join(MAIN, 'res', 'mipmap-mdpi', 'ic_launcher.png');
|
||||
if (!existsSync(ours) || !existsSync(there) || !readFileSync(ours).equals(readFileSync(there))) {
|
||||
found.push("the launcher icon is not Rosea's (run 'tsx scripts/icons.ts')");
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
function apply(): void {
|
||||
for (const f of RULE_FILES) {
|
||||
const left = ruleProblems(readFileSync(join(RES_FROM, f), 'utf8'), RULE_SECTIONS[f]);
|
||||
if (left.length > 0) fail(left.map((p) => `android/res/xml/${f}: ${p}`));
|
||||
}
|
||||
if (!existsSync(MANIFEST)) fail([`no generated project (${MANIFEST}); run 'pnpm tauri:android'`]);
|
||||
const before = readFileSync(MANIFEST, 'utf8');
|
||||
const after = patchManifest(before);
|
||||
mkdirSync(RES_TO, { recursive: true });
|
||||
for (const f of RULE_FILES) copyFileSync(join(RES_FROM, f), join(RES_TO, f));
|
||||
if (!existsSync(dirname(ACTIVITY_TO))) fail([`no generated activity folder ${dirname(ACTIVITY_TO)}; the identifier changed?`]);
|
||||
copyFileSync(ACTIVITY_FROM, ACTIVITY_TO);
|
||||
if (after !== before) writeFileSync(MANIFEST, after);
|
||||
const left = problems();
|
||||
if (left.length > 0) fail(left);
|
||||
console.log(
|
||||
`android: privacy ${after === before ? 'already in place' : 'applied'} ` +
|
||||
"(no INTERNET, no backup or transfer, WebView metrics and Safe Browsing off; Rosea's MainActivity)"
|
||||
);
|
||||
}
|
||||
|
||||
function newestApk(dir: string): string | undefined {
|
||||
if (!existsSync(dir)) return undefined;
|
||||
let best: { path: string; at: number } | undefined;
|
||||
const walk = (d: string): void => {
|
||||
for (const name of readdirSync(d)) {
|
||||
const path = join(d, name);
|
||||
const stat = statSync(path);
|
||||
if (stat.isDirectory()) walk(path);
|
||||
else if (name.endsWith('.apk') && (!best || stat.mtimeMs > best.at)) best = { path, at: stat.mtimeMs };
|
||||
}
|
||||
};
|
||||
walk(dir);
|
||||
return best?.path;
|
||||
}
|
||||
|
||||
function aapt2(): string {
|
||||
const sdk = process.env['ANDROID_HOME'] ?? process.env['ANDROID_SDK_ROOT'];
|
||||
if (!sdk) fail(['ANDROID_HOME is not set']);
|
||||
const tools = join(sdk, 'build-tools');
|
||||
const versions = readdirSync(tools).sort((a, b) => b.localeCompare(a, undefined, { numeric: true }));
|
||||
const exe = process.platform === 'win32' ? 'aapt2.exe' : 'aapt2';
|
||||
for (const v of versions) if (existsSync(join(tools, v, exe))) return join(tools, v, exe);
|
||||
return fail([`no aapt2 under ${tools}`]);
|
||||
}
|
||||
|
||||
function verify(apk: string | undefined): void {
|
||||
const file = apk ?? newestApk(OUTPUTS);
|
||||
if (file === undefined || !existsSync(file)) fail([`no APK to verify under ${OUTPUTS}`]);
|
||||
const tool = aapt2();
|
||||
const run = (...args: string[]): string => {
|
||||
const r = spawnSync(tool, args, { encoding: 'utf8' });
|
||||
if (r.status !== 0) fail([`aapt2 ${args.join(' ')} failed: ${r.stderr}`]);
|
||||
return r.stdout;
|
||||
};
|
||||
const left = apkProblems(run('dump', 'permissions', file), run('dump', 'xmltree', '--file', 'AndroidManifest.xml', file));
|
||||
if (left.length > 0) fail(left);
|
||||
console.log(`android: ${file} verified (no permission asked, no backup, WebView metrics and Safe Browsing off)`);
|
||||
}
|
||||
|
||||
const [command, arg] = process.argv.slice(2);
|
||||
try {
|
||||
if (command === 'prepare') {
|
||||
if (!existsSync(MANIFEST)) tauri('android', 'init', '--ci', '--skip-targets-install');
|
||||
await import('./icons.js');
|
||||
apply();
|
||||
} else if (command === 'apply') apply();
|
||||
else if (command === 'check') {
|
||||
const left = problems();
|
||||
if (left.length > 0) fail(left);
|
||||
console.log('android: privacy in place');
|
||||
} else if (command === 'verify') verify(arg);
|
||||
else fail(['usage: android.ts prepare|apply|check|verify [apk]']);
|
||||
} catch (error) {
|
||||
fail([(error as Error).message]);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* The app's icons, made from the PWA's icon (`apps/rosea/public/icon.svg`) before every build
|
||||
* (tauri-platforms.md D8). They are build output, never committed: the only images in git are
|
||||
* the source SVG and optimised art under art/final/ (CLAUDE.md §5.2). The icon is still a
|
||||
* placeholder; the real one comes through the art pipeline (GAP_ANALYSIS G0.21).
|
||||
*
|
||||
* tsx scripts/icons.ts makes them when missing or older than the SVG, and copies the
|
||||
* Android launcher icons into gen/android when it exists
|
||||
*
|
||||
* The copy is unconditional on purpose: `tauri android init` writes Tauri's own logo into
|
||||
* gen/android, newer than any icon made before it, so a date check kept Tauri's logo in the first
|
||||
* APK (review finding). `scripts/android.ts check` compares the bytes.
|
||||
*/
|
||||
import { cpSync, existsSync, statSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { PACKAGE, SRC_TAURI, tauri } from './tauri.js';
|
||||
|
||||
const SOURCE = join(PACKAGE, '..', 'rosea', 'public', 'icon.svg');
|
||||
const MADE = join(SRC_TAURI, 'icons');
|
||||
export const ANDROID_ICONS = join(MADE, 'android');
|
||||
export const ANDROID_RES = join(SRC_TAURI, 'gen', 'android', 'app', 'src', 'main', 'res');
|
||||
|
||||
const stale = (file: string): boolean => !existsSync(file) || statSync(file).mtimeMs < statSync(SOURCE).mtimeMs;
|
||||
|
||||
if (stale(join(MADE, 'icon.ico')) || stale(join(ANDROID_ICONS, 'mipmap-mdpi', 'ic_launcher.png'))) {
|
||||
tauri('icon', SOURCE);
|
||||
console.log('icons: made from apps/rosea/public/icon.svg');
|
||||
} else {
|
||||
console.log('icons: up to date');
|
||||
}
|
||||
if (existsSync(ANDROID_RES)) {
|
||||
cpSync(ANDROID_ICONS, ANDROID_RES, { recursive: true });
|
||||
console.log('icons: Android launcher icons copied into gen/android');
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* The iOS app. Tauri can build it only on macOS with Xcode, and putting it on a phone needs an
|
||||
* Apple developer account (free for one's own device; paid for TestFlight and the App Store).
|
||||
* Elsewhere this refuses with that reason instead of failing somewhere deep in the CLI
|
||||
* (CLAUDE.md §8, *iOS cannot be built on Windows*; tauri-platforms.md G-T1).
|
||||
*
|
||||
* tsx scripts/ios.ts on macOS: `tauri ios init` once, icons, then `tauri ios build --debug`
|
||||
*/
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { SRC_TAURI, tauri } from './tauri.js';
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
console.error(
|
||||
'ios: the iOS app can only be built on macOS with Xcode (and an Apple developer account to run it on a phone).\n' +
|
||||
`ios: this machine is ${process.platform}. Nothing was built. See .agents/features/tauri-platforms.md, G-T1.`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
if (!existsSync(join(SRC_TAURI, 'gen', 'apple'))) tauri('ios', 'init', '--ci');
|
||||
await import('./icons.js');
|
||||
tauri('ios', 'build', '--debug', ...process.argv.slice(2));
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* `pnpm --filter @rosea/tauri sign:apk <version> <commit>`: the release APK, signed in Custos
|
||||
* (fabrica-release.md F4). Runs after the release's approval; Mark's card shows the match code
|
||||
* custos-sign prints. Nothing is written unless custos-sign signs and verifies.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { existsSync, mkdirSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { custosSign, signArgs, signedApkName, UNSIGNED_APK } from '../src/sign-apk.js';
|
||||
import { PACKAGE, SRC_TAURI } from './tauri.js';
|
||||
|
||||
const [version = '', commit = ''] = process.argv.slice(2);
|
||||
try {
|
||||
const unsigned = join(SRC_TAURI, UNSIGNED_APK);
|
||||
if (!existsSync(unsigned)) throw new Error(`no release APK at ${unsigned}; run 'pnpm tauri:android-release' first`);
|
||||
const outDir = join(PACKAGE, '..', '..', 'target', 'release');
|
||||
mkdirSync(outDir, { recursive: true });
|
||||
const exe = custosSign(process.env, existsSync);
|
||||
const args = signArgs({ version, commit, unsigned, out: join(outDir, signedApkName(version)) });
|
||||
const run = spawnSync(exe, args, { stdio: 'inherit' });
|
||||
if (run.error) throw run.error;
|
||||
process.exit(run.status ?? 1);
|
||||
} catch (e) {
|
||||
console.error(`sign:apk: ${e instanceof Error ? e.message : String(e)}`);
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/** Runs the Tauri CLI of this package, in this package's folder, and stops the script if it fails. */
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
export const PACKAGE = join(dirname(fileURLToPath(import.meta.url)), '..');
|
||||
export const SRC_TAURI = join(PACKAGE, 'src-tauri');
|
||||
|
||||
export function tauri(...args: string[]): void {
|
||||
const run = spawnSync('pnpm', ['exec', 'tauri', ...args], {
|
||||
cwd: PACKAGE,
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
if (run.status !== 0) {
|
||||
console.error(`tauri ${args.join(' ')} failed (exit ${String(run.status ?? run.signal)})`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
[package]
|
||||
name = "rosea-shell"
|
||||
version = "0.1.0"
|
||||
description = "The Tauri 2 shell of Rosea Domi: a window around the built game, and nothing else."
|
||||
edition = "2024"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
# The `_lib` suffix avoids a clash between the lib and the bin on Windows (cargo#8519).
|
||||
name = "rosea_shell_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.7.5", features = [] }
|
||||
|
||||
# No Tauri plugin and no other crate: the shell opens a window on the built game and does
|
||||
# nothing else. Each plugin that arrives later (notifications, Phase 6) is reviewed for
|
||||
# network access first (.agents/features/tauri-platforms.md D5).
|
||||
[dependencies]
|
||||
tauri = { version = "2.12.6", features = [] }
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
opt-level = "s"
|
||||
panic = "abort"
|
||||
strip = true
|
||||
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
//! The Tauri 2 shell of Rosea Domi (CLAUDE.md §2, *Four versions*).
|
||||
//!
|
||||
//! A window on the built game (`apps/rosea/dist-tauri/`) and nothing else: no command, no
|
||||
//! plugin, no file of its own. The game keeps everything in the webview's IndexedDB, exactly
|
||||
//! as in the PWA. `capabilities/` is absent on purpose, so the page is granted no IPC at all.
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.run(tauri::generate_context!())
|
||||
// Nothing to recover from here: without a window there is no garden to show.
|
||||
.expect("Rosea Domi could not open its window");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// No console window behind the garden in a release build on Windows.
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
rosea_shell_lib::run()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"build": {
|
||||
"beforeBuildCommand": "pnpm --filter @rosea/tauri android:privacy && pnpm --filter @rosea/app build:shell"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Rosea Domi",
|
||||
"version": "../../rosea/package.json",
|
||||
"identifier": "cz.mareknovak.domi.rosea",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm --filter @rosea/app dev:shell",
|
||||
"devUrl": "http://127.0.0.1:5173",
|
||||
"beforeBuildCommand": "pnpm --filter @rosea/app build:shell",
|
||||
"frontendDist": "../../rosea/dist-tauri"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"label": "main",
|
||||
"title": "Rosea Domi",
|
||||
"width": 480,
|
||||
"height": 800,
|
||||
"minWidth": 320,
|
||||
"minHeight": 480,
|
||||
"useHttpsScheme": true,
|
||||
"additionalBrowserArgs": "--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection,DnsOverHttpsUpgrade,DohProviderGoogle,DohProviderGoogleDns,DohProviderCloudflare,msExperimentationAndConfigurationService,OptimizationHints,AutofillServerCommunication,MediaRouter,Translate --disable-background-networking --disable-component-update --disable-domain-reliability --disable-sync --no-pings --disable-client-side-phishing-detection --dns-prefetch-disable"
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; manifest-src 'self'; worker-src 'self'; object-src 'none'; base-uri 'self'; form-action 'none'"
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
||||
"category": "Game",
|
||||
"shortDescription": "A rose to tend, a fox to befriend, and the time we give to people.",
|
||||
"windows": { "nsis": { "installMode": "currentUser" } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "$schema": "https://schema.tauri.app/config/2", "bundle": { "targets": ["deb", "appimage"] } }
|
||||
@@ -0,0 +1 @@
|
||||
{ "$schema": "https://schema.tauri.app/config/2", "bundle": { "targets": ["app", "dmg"] } }
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"bundle": {
|
||||
"targets": ["nsis"],
|
||||
"windows": { "nsis": { "installerHooks": "./windows/hooks.nsh" } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
; Rosea Domi's installer hooks (.agents/features/fabrica-release.md F5; Fundamentum's Canalis, Part A).
|
||||
; The installer registers domi-rosea://open for the current user, and the uninstaller removes it.
|
||||
; Here and not at every start: the shell is a window and nothing else (CLAUDE.md §2), and a reinstall
|
||||
; or Fabrica's Update all (/UPDATE in the same folder) runs this again, so the command follows the exe.
|
||||
; The game reads no argument: any domi-rosea:// address opens the garden, and nothing else.
|
||||
|
||||
!macro NSIS_HOOK_POSTINSTALL
|
||||
WriteRegStr HKCU "Software\Classes\domi-rosea" "" "URL:Rosea Domi"
|
||||
WriteRegStr HKCU "Software\Classes\domi-rosea" "URL Protocol" ""
|
||||
WriteRegStr HKCU "Software\Classes\domi-rosea\DefaultIcon" "" '"$INSTDIR\${MAINBINARYNAME}.exe",0'
|
||||
WriteRegStr HKCU "Software\Classes\domi-rosea\shell\open\command" "" '"$INSTDIR\${MAINBINARYNAME}.exe" "%1"'
|
||||
!macroend
|
||||
|
||||
!macro NSIS_HOOK_POSTUNINSTALL
|
||||
DeleteRegKey HKCU "Software\Classes\domi-rosea"
|
||||
!macroend
|
||||
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* The Android app's privacy, applied to Tauri's generated project (tauri-platforms.md D6).
|
||||
*
|
||||
* `src-tauri/gen/android` is written by `tauri android init` and never committed, so every
|
||||
* clone starts from Tauri's stock manifest, which asks for `INTERNET` and lets Android copy the
|
||||
* app's data to the player's cloud backup. What must hold is carried here and applied before
|
||||
* every Android build; the build fails if anything is missing. The approach and the two rule
|
||||
* files follow Amicitia's (its `android-privacy.md`, measured there on 2026-11-08):
|
||||
*
|
||||
* - **no `INTERNET`**: Rosea has no network feature yet, so the kernel refuses the app any
|
||||
* socket, the webview's own traffic included. It comes back with the first feature that
|
||||
* needs the network (Phase 3), and that feature's doc measures the webview first;
|
||||
* - **no backup and no device transfer**: the care log, the keys and the chosen town stay on
|
||||
* this device; *Keep her safe* is how a rose moves;
|
||||
* - the WebView's **metrics** and **Safe Browsing** lookups off, for the day `INTERNET` returns.
|
||||
*
|
||||
* Pure functions on strings; the files are read and written by `scripts/android.ts`.
|
||||
*/
|
||||
|
||||
export const BACKUP_RULES = 'rosea_backup_rules';
|
||||
export const EXTRACTION_RULES = 'rosea_data_extraction_rules';
|
||||
export const RULE_FILES = [`${BACKUP_RULES}.xml`, `${EXTRACTION_RULES}.xml`] as const;
|
||||
|
||||
/** Attributes `<application>` must carry. */
|
||||
export const APPLICATION_ATTRS: Readonly<Record<string, string>> = {
|
||||
'android:allowBackup': 'false',
|
||||
'android:fullBackupContent': `@xml/${BACKUP_RULES}`,
|
||||
'android:dataExtractionRules': `@xml/${EXTRACTION_RULES}`
|
||||
};
|
||||
|
||||
/** WebView switches read from the manifest (developer.android.com, "Manage WebView objects"). */
|
||||
export const META_DATA: Readonly<Record<string, string>> = {
|
||||
'android.webkit.WebView.EnableSafeBrowsing': 'false',
|
||||
'android.webkit.WebView.MetricsOptOut': 'true'
|
||||
};
|
||||
|
||||
const BEGIN = '<!-- rosea-privacy: begin (apps/rosea-tauri/src/android-privacy.ts) -->';
|
||||
const END = '<!-- rosea-privacy: end -->';
|
||||
const INTERNET_LINE = /^[ \t]*<uses-permission\s+android:name="android\.permission\.INTERNET"\s*\/>[ \t]*\n/gm;
|
||||
const INTERNET_ANY = /android\.permission\.INTERNET/;
|
||||
|
||||
const escape = (s: string): string => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
|
||||
/** The one `<application …>` opening tag, or an error naming what is wrong. */
|
||||
function applicationTag(xml: string): RegExpMatchArray & { index: number } {
|
||||
const tags = [...xml.matchAll(/<application\b[^>]*>/g)];
|
||||
if (tags.length !== 1) throw new Error(`expected one <application> tag, found ${tags.length}`);
|
||||
const tag = tags[0]!;
|
||||
if (tag[0].endsWith('/>')) throw new Error('<application/> is empty; expected a template with children');
|
||||
return tag as RegExpMatchArray & { index: number };
|
||||
}
|
||||
|
||||
function setAttribute(tag: string, name: string, value: string): string {
|
||||
const re = new RegExp(`(\\s${escape(name)}=")[^"]*(")`);
|
||||
if (re.test(tag)) return tag.replace(re, `$1${value}$2`);
|
||||
const indent = /\n([ \t]+)android:/.exec(tag)?.[1] ?? ' ';
|
||||
return tag.replace(/^<application\b/, `<application\n${indent}${name}="${value}"`);
|
||||
}
|
||||
|
||||
/** The manifest with the privacy settings in place. Throws, changing nothing, on an unexpected shape. */
|
||||
export function patchManifest(xml: string): string {
|
||||
const eol = xml.includes('\r\n') ? '\r\n' : '\n';
|
||||
let out = xml.replaceAll('\r\n', '\n');
|
||||
|
||||
// 1. <application> attributes.
|
||||
const tag = applicationTag(out);
|
||||
let patched = tag[0];
|
||||
for (const [name, value] of Object.entries(APPLICATION_ATTRS)) patched = setAttribute(patched, name, value);
|
||||
out = out.slice(0, tag.index) + patched + out.slice(tag.index + tag[0].length);
|
||||
|
||||
// 2. The meta-data block, replaced whole on every run, so a second run changes nothing.
|
||||
const from = out.indexOf(BEGIN);
|
||||
if (from >= 0) {
|
||||
const to = out.indexOf(END, from);
|
||||
if (to < 0) throw new Error('found the begin marker of the privacy block but not its end');
|
||||
const lineStart = out.lastIndexOf('\n', from) + 1;
|
||||
const lineEnd = out.indexOf('\n', to);
|
||||
out = out.slice(0, lineStart) + out.slice(lineEnd + 1);
|
||||
}
|
||||
const closes = [...out.matchAll(/^([ \t]*)<\/application>/gm)];
|
||||
if (closes.length !== 1) throw new Error(`expected one </application>, found ${closes.length}`);
|
||||
const close = closes[0]!;
|
||||
const indent = `${close[1] ?? ''} `;
|
||||
const block = [
|
||||
BEGIN,
|
||||
...Object.entries(META_DATA).map(([n, v]) => `<meta-data android:name="${n}" android:value="${v}" />`),
|
||||
END
|
||||
]
|
||||
.map((line) => `${indent}${line}\n`)
|
||||
.join('');
|
||||
out = out.slice(0, close.index) + block + out.slice(close.index);
|
||||
|
||||
// 3. INTERNET removed. Any other form of asking for it is refused rather than missed.
|
||||
out = out.replace(INTERNET_LINE, '');
|
||||
if (INTERNET_ANY.test(out)) throw new Error('INTERNET is requested in a form this patch does not remove');
|
||||
|
||||
return out.replaceAll('\n', eol);
|
||||
}
|
||||
|
||||
/** What the manifest lacks, by name; empty when it is in order. */
|
||||
export function manifestProblems(xml: string): string[] {
|
||||
const problems: string[] = [];
|
||||
let tag: string;
|
||||
try {
|
||||
tag = applicationTag(xml)[0];
|
||||
} catch (error) {
|
||||
return [(error as Error).message];
|
||||
}
|
||||
for (const [name, value] of Object.entries(APPLICATION_ATTRS)) {
|
||||
if (!new RegExp(`\\s${escape(name)}="${escape(value)}"`).test(tag)) problems.push(`<application> lacks ${name}="${value}"`);
|
||||
}
|
||||
for (const [name, value] of Object.entries(META_DATA)) {
|
||||
if (!new RegExp(`<meta-data\\s+android:name="${escape(name)}"\\s+android:value="${escape(value)}"\\s*/>`).test(xml)) {
|
||||
problems.push(`no meta-data ${name}=${value}`);
|
||||
}
|
||||
}
|
||||
if (INTERNET_ANY.test(xml)) problems.push('android.permission.INTERNET is requested');
|
||||
return problems;
|
||||
}
|
||||
|
||||
/** Every storage domain Android knows; each must be excluded. */
|
||||
export const DOMAINS = [
|
||||
'root', 'file', 'database', 'sharedpref', 'external',
|
||||
'device_root', 'device_file', 'device_database', 'device_sharedpref'
|
||||
] as const;
|
||||
|
||||
/** Where each rules file must exclude everything: '' is the file's root element. */
|
||||
export const RULE_SECTIONS: Readonly<Record<(typeof RULE_FILES)[number], readonly string[]>> = {
|
||||
[`${BACKUP_RULES}.xml`]: [''],
|
||||
[`${EXTRACTION_RULES}.xml`]: ['cloud-backup', 'device-transfer']
|
||||
} as Record<(typeof RULE_FILES)[number], readonly string[]>;
|
||||
|
||||
/** A rules file must exclude every domain in every section, and include nothing. */
|
||||
export function ruleProblems(xml: string, sections: readonly string[]): string[] {
|
||||
const problems: string[] = [];
|
||||
if (/<include\b/.test(xml)) problems.push('includes something');
|
||||
for (const section of sections) {
|
||||
const body = section ? new RegExp(`<${section}\\b[^>]*>([\\s\\S]*?)</${section}>`).exec(xml)?.[1] : xml;
|
||||
if (body === undefined) {
|
||||
problems.push(`no <${section}>`);
|
||||
continue;
|
||||
}
|
||||
for (const domain of DOMAINS) {
|
||||
if (!new RegExp(`<exclude\\s+domain="${domain}"\\s+path="\\."\\s*/>`).test(body)) {
|
||||
problems.push(`${section || 'root'}: ${domain} is not excluded`);
|
||||
}
|
||||
}
|
||||
}
|
||||
return problems;
|
||||
}
|
||||
|
||||
/**
|
||||
* What the BUILT APK says, from `aapt2 dump permissions` and `aapt2 dump xmltree` of its
|
||||
* manifest: the proof is the artefact, not the source (Amicitia lessons/technical.md).
|
||||
* The manifest merge can add permissions from libraries; only the APK can tell.
|
||||
*/
|
||||
export function apkProblems(permissions: string, manifestTree: string): string[] {
|
||||
const problems: string[] = [];
|
||||
const tree = manifestTree.replaceAll('\r\n', '\n');
|
||||
const pkg = /^package: (\S+)$/m.exec(permissions.replaceAll('\r\n', '\n'))?.[1];
|
||||
for (const m of permissions.matchAll(/uses-permission: name='([^']+)'/g)) {
|
||||
const name = m[1]!;
|
||||
// androidx's receiver guard: a signature permission the app declares for itself, granting nothing.
|
||||
if (pkg !== undefined && name === `${pkg}.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION`) continue;
|
||||
// Any other is a review question, not a pass: Rosea asks for no permission yet.
|
||||
problems.push(`the APK asks for ${name}`);
|
||||
}
|
||||
if (!/:allowBackup\(0x[0-9a-f]+\)=false$/m.test(tree)) problems.push('the APK does not set allowBackup=false');
|
||||
for (const [name, value] of Object.entries(META_DATA)) {
|
||||
// aapt2 prints a meta-data element's name attribute, then its value attribute on the next line:
|
||||
// A: http://schemas.android.com/apk/res/android:name(0x01010003)="<name>" (Raw: "<name>")
|
||||
// A: http://schemas.android.com/apk/res/android:value(0x01010024)=true
|
||||
const found = new RegExp(
|
||||
`:name\\(0x[0-9a-f]+\\)="${escape(name)}"[^\\n]*\\n\\s*A: [^\\n]*:value\\(0x[0-9a-f]+\\)=(\\S+)`
|
||||
).exec(tree);
|
||||
if (!found) problems.push(`the APK has no meta-data ${name}`);
|
||||
else if (found[1] !== value && found[1] !== `"${value}"`) problems.push(`the APK's meta-data ${name} is ${found[1]}, not ${value}`);
|
||||
}
|
||||
return problems;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* What the release asks custos-sign to do with the Android APK (fabrica-release.md F4). Kept
|
||||
* apart from the script that runs it so the arguments can be tested without Custos.
|
||||
*
|
||||
* The key `rosea-android` lives in Custos only; custos-sign holds no key material either. Its
|
||||
* scope is exactly `mnovak/Rosea`, the release pipeline, a tag (Custos makes the key on the first
|
||||
* release, behind Mark's first-signature card).
|
||||
*/
|
||||
export const APK_KEY = 'rosea-android';
|
||||
export const REPO = 'mnovak/Rosea';
|
||||
|
||||
/** Where Gradle leaves the release APK of `tauri android build --apk --target aarch64`, from src-tauri. */
|
||||
export const UNSIGNED_APK = 'gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk';
|
||||
|
||||
/** The published APK's name: the app, the version, the one ABI it is built for. */
|
||||
export const signedApkName = (version: string): string => `rosea-domi-${version}-arm64.apk`;
|
||||
|
||||
export interface SignRequest {
|
||||
readonly version: string;
|
||||
readonly commit: string;
|
||||
readonly unsigned: string;
|
||||
readonly out: string;
|
||||
}
|
||||
|
||||
/** The arguments of `custos-sign apk`, or the reason they cannot be made. */
|
||||
export function signArgs(r: SignRequest): string[] {
|
||||
if (!/^\d+\.\d+\.\d+$/.test(r.version)) throw new Error(`not a version: ${r.version}`);
|
||||
if (!/^[0-9a-f]{40}$/.test(r.commit)) throw new Error(`not a commit: ${r.commit}`);
|
||||
return [
|
||||
'apk', r.unsigned,
|
||||
'--out', r.out,
|
||||
'--key', APK_KEY,
|
||||
'--repo', REPO,
|
||||
'--pipeline', 'release',
|
||||
'--commit', r.commit,
|
||||
'--trigger', 'tag',
|
||||
'--run', `rosea-v${r.version}`,
|
||||
'--version', r.version,
|
||||
'--step', 'apk'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Which custos-sign to run. `CUSTOS_SIGN_EXE` names it; when it names a file that is not there,
|
||||
* the release refuses rather than run another one from PATH. `CUSTOS_PIPE` is refused: a signed
|
||||
* run must reach Mark's Custos, never a test instance whose key is nobody's.
|
||||
*/
|
||||
export function custosSign(env: Readonly<Record<string, string | undefined>>, exists: (p: string) => boolean): string {
|
||||
if (env['CUSTOS_PIPE']) throw new Error('CUSTOS_PIPE is set: the APK would be signed by another Custos than Mark\'s');
|
||||
const named = env['CUSTOS_SIGN_EXE'];
|
||||
if (named === undefined || named === '') return 'custos-sign.exe';
|
||||
if (!exists(named)) throw new Error(`CUSTOS_SIGN_EXE names ${named}, which is not there`);
|
||||
return named;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* The save bridge's contract between the Kotlin side (android/java/MainActivity.kt) and the game
|
||||
* (apps/rosea/src/App.svelte, packages/ui KeepSafe): keep-her-safe-apps.md A2–A5. A mismatch here
|
||||
* fails silently on the device — the save screen never opens, or the garden never hears back —
|
||||
* so the names are read from both sources and compared.
|
||||
*/
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
const HERE = dirname(fileURLToPath(import.meta.url));
|
||||
const kotlin = readFileSync(join(HERE, '..', 'android', 'java', 'MainActivity.kt'), 'utf8');
|
||||
const app = readFileSync(join(HERE, '..', '..', 'rosea', 'src', 'App.svelte'), 'utf8');
|
||||
const keepSafe = readFileSync(join(HERE, '..', '..', '..', 'packages', 'ui', 'src', 'rose', 'KeepSafe.svelte'), 'utf8');
|
||||
const conf = JSON.parse(readFileSync(join(HERE, '..', 'src-tauri', 'tauri.conf.json'), 'utf8')) as { identifier: string };
|
||||
|
||||
const nameRule = new RegExp(/Regex\("(.+?)"\)/.exec(kotlin)?.[1]?.replaceAll('\\\\', '\\') ?? 'missing');
|
||||
|
||||
describe('the Android save bridge', () => {
|
||||
it('lives in the package of the app it is copied into', () => {
|
||||
expect(kotlin).toMatch(new RegExp(`^package ${conf.identifier.replaceAll('.', '\\.')}$`, 'm'));
|
||||
expect(kotlin).toMatch(/class MainActivity : TauriActivity\(\)/);
|
||||
});
|
||||
|
||||
it('is found by the game under the name it is registered with', () => {
|
||||
const registered = /addJavascriptInterface\(RoseFile\(\), "(\w+)"\)/.exec(kotlin)?.[1];
|
||||
expect(registered).toBe('roseaFile');
|
||||
expect(app).toContain(`roseaFile?: { save(name: string, text: string): void }`);
|
||||
expect(app).toContain('.roseaFile');
|
||||
});
|
||||
|
||||
it('answers on the event the game listens for, with true or false', () => {
|
||||
const event = /new CustomEvent\('([\w-]+)', \{ detail: \$written \}\)/.exec(kotlin)?.[1];
|
||||
expect(event).toBe('rosea-file-saved');
|
||||
expect(app.match(/'rosea-file-saved'/g)?.length).toBeGreaterThanOrEqual(2);
|
||||
expect(app).toContain('.detail === true');
|
||||
});
|
||||
|
||||
it("accepts the file name the garden gives (rose-<day>.json) and nothing else", () => {
|
||||
expect(keepSafe).toContain('`rose-${today}.json`');
|
||||
expect(nameRule.test('rose-2026-11-17.json')).toBe(true);
|
||||
for (const wrong of ['rose.json', '../rose-2026-11-17.json', 'rose-2026-11-17.json.exe', 'rose-2026-11-17.apk', 'evil-2026-11-17.json']) {
|
||||
expect(nameRule.test(wrong)).toBe(false);
|
||||
}
|
||||
});
|
||||
|
||||
it('keeps the bridge through a minified release build', () => {
|
||||
expect(kotlin).toMatch(/@Keep\s+inner class RoseFile/);
|
||||
expect(kotlin).toMatch(/@JavascriptInterface\s+fun save\(name: String, text: String\)/);
|
||||
});
|
||||
|
||||
it("paints behind the system bars with the garden's own paper, light and dark", () => {
|
||||
const tokens = readFileSync(join(HERE, '..', '..', '..', 'packages', 'ui', 'src', 'tokens.css'), 'utf8');
|
||||
const papers = [...tokens.matchAll(/--paper:\s*(#[0-9a-f]{6})/gi)].map((m) => m[1]!.toLowerCase());
|
||||
expect(papers).toHaveLength(2);
|
||||
expect(/PAPER = "(#[0-9a-f]{6})"/i.exec(kotlin)?.[1]?.toLowerCase()).toBe(papers[0]);
|
||||
expect(/PAPER_DARK = "(#[0-9a-f]{6})"/i.exec(kotlin)?.[1]?.toLowerCase()).toBe(papers[1]);
|
||||
// A source check only; the proof is the tablet's screenshot (review). Exact call and padding:
|
||||
expect(kotlin).toMatch(/ViewCompat\.setOnApplyWindowInsetsListener\(findViewById\(android\.R\.id\.content\)\)/);
|
||||
expect(kotlin).toMatch(/view\.setPadding\(inset\.left, inset\.top, inset\.right, inset\.bottom\)/);
|
||||
});
|
||||
|
||||
it('asks Android for nothing: the save screen needs no permission', () => {
|
||||
// Asking at run time or naming one; the APK check (aapt2) refuses any declared in the manifest.
|
||||
expect(kotlin).not.toMatch(/requestPermissions\(|Manifest\.permission|checkSelfPermission/);
|
||||
expect(kotlin).toContain('Intent.ACTION_CREATE_DOCUMENT');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* The Android privacy patch (tauri-platforms.md D6), on Tauri 2.12.5's stock manifest exactly as
|
||||
* `tauri android init` wrote it (fixtures/AndroidManifest.stock.xml), and on the committed rule files.
|
||||
*/
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
apkProblems,
|
||||
APPLICATION_ATTRS,
|
||||
DOMAINS,
|
||||
manifestProblems,
|
||||
META_DATA,
|
||||
patchManifest,
|
||||
RULE_FILES,
|
||||
RULE_SECTIONS,
|
||||
ruleProblems
|
||||
} from '../src/android-privacy.js';
|
||||
|
||||
const HERE = dirname(fileURLToPath(import.meta.url));
|
||||
const STOCK = readFileSync(join(HERE, 'fixtures', 'AndroidManifest.stock.xml'), 'utf8').replaceAll('\r\n', '\n');
|
||||
const rules = (f: string): string => readFileSync(join(HERE, '..', 'android', 'res', 'xml', f), 'utf8');
|
||||
|
||||
describe('patchManifest', () => {
|
||||
const patched = patchManifest(STOCK);
|
||||
|
||||
it("removes Tauri's INTERNET permission: the kernel then refuses the app any socket", () => {
|
||||
expect(STOCK).toContain('android.permission.INTERNET');
|
||||
expect(patched).not.toContain('android.permission.INTERNET');
|
||||
});
|
||||
|
||||
it('turns backup and device transfer off on <application>', () => {
|
||||
const tag = /<application\b[^>]*>/.exec(patched)?.[0] ?? '';
|
||||
for (const [name, value] of Object.entries(APPLICATION_ATTRS)) expect(tag).toContain(`${name}="${value}"`);
|
||||
// What Tauri set is kept.
|
||||
expect(tag).toContain('android:icon="@mipmap/ic_launcher"');
|
||||
expect(tag).toContain('android:usesCleartextTraffic="${usesCleartextTraffic}"');
|
||||
});
|
||||
|
||||
it("switches the WebView's metrics and Safe Browsing off, inside <application>", () => {
|
||||
const inside = /<application\b[\s\S]*<\/application>/.exec(patched)?.[0] ?? '';
|
||||
for (const [name, value] of Object.entries(META_DATA)) {
|
||||
expect(inside).toContain(`<meta-data android:name="${name}" android:value="${value}" />`);
|
||||
}
|
||||
});
|
||||
|
||||
it('leaves the rest of the manifest as it was', () => {
|
||||
for (const keep of ['android:name=".MainActivity"', 'android.intent.category.LAUNCHER', 'androidx.core.content.FileProvider']) {
|
||||
expect(patched).toContain(keep);
|
||||
}
|
||||
});
|
||||
|
||||
it('changes nothing on a second run', () => {
|
||||
expect(patchManifest(patched)).toBe(patched);
|
||||
});
|
||||
|
||||
it('keeps Windows line endings when the file has them', () => {
|
||||
const crlf = patchManifest(STOCK.replaceAll('\n', '\r\n'));
|
||||
expect(crlf).toBe(patched.replaceAll('\n', '\r\n'));
|
||||
});
|
||||
|
||||
it('overwrites an allowBackup="true" rather than adding a second one', () => {
|
||||
const on = STOCK.replace('<application', '<application android:allowBackup="true"');
|
||||
const out = patchManifest(on);
|
||||
expect(out).toContain('android:allowBackup="false"');
|
||||
expect(out).not.toContain('android:allowBackup="true"');
|
||||
expect(out.match(/android:allowBackup=/g)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('refuses a manifest whose shape it does not know, rather than guessing', () => {
|
||||
expect(() => patchManifest(STOCK.replace('</application>', '</application><application></application>'))).toThrow(/application/);
|
||||
expect(() => patchManifest(STOCK.replace(/<application[\s\S]*<\/application>/, '<application />'))).toThrow();
|
||||
// INTERNET asked for in a form the line pattern does not match.
|
||||
const odd = STOCK.replace(
|
||||
'<uses-permission android:name="android.permission.INTERNET" />',
|
||||
'<uses-permission android:name="android.permission.INTERNET" android:maxSdkVersion="99" />'
|
||||
);
|
||||
expect(() => patchManifest(odd)).toThrow(/INTERNET/);
|
||||
});
|
||||
|
||||
it('removes INTERNET written over two lines too', () => {
|
||||
const split = STOCK.replace(
|
||||
'<uses-permission android:name="android.permission.INTERNET" />',
|
||||
'<uses-permission\n android:name="android.permission.INTERNET" />'
|
||||
);
|
||||
expect(patchManifest(split)).not.toContain('INTERNET');
|
||||
});
|
||||
});
|
||||
|
||||
describe('manifestProblems', () => {
|
||||
it("names everything missing from Tauri's stock manifest", () => {
|
||||
const problems = manifestProblems(STOCK);
|
||||
expect(problems).toContain('android.permission.INTERNET is requested');
|
||||
for (const name of Object.keys(APPLICATION_ATTRS)) expect(problems.join('\n')).toContain(name);
|
||||
for (const name of Object.keys(META_DATA)) expect(problems.join('\n')).toContain(name);
|
||||
expect(problems).toHaveLength(1 + Object.keys(APPLICATION_ATTRS).length + Object.keys(META_DATA).length);
|
||||
});
|
||||
|
||||
it('finds nothing missing once patched', () => {
|
||||
expect(manifestProblems(patchManifest(STOCK))).toEqual([]);
|
||||
});
|
||||
|
||||
it('notices a single switch turned back on', () => {
|
||||
const patched = patchManifest(STOCK);
|
||||
expect(manifestProblems(patched.replace('android:allowBackup="false"', 'android:allowBackup="true"'))).toEqual([
|
||||
'<application> lacks android:allowBackup="false"'
|
||||
]);
|
||||
expect(manifestProblems(patched.replace('android:value="true"', 'android:value="false"'))).toEqual([
|
||||
'no meta-data android.webkit.WebView.MetricsOptOut=true'
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('the committed rule files', () => {
|
||||
for (const f of RULE_FILES) {
|
||||
it(`${f} excludes every domain, in every section, and includes nothing`, () => {
|
||||
expect(ruleProblems(rules(f), RULE_SECTIONS[f])).toEqual([]);
|
||||
});
|
||||
}
|
||||
|
||||
it('a file that forgets one domain is caught, by name', () => {
|
||||
const f = 'rosea_data_extraction_rules.xml' as const;
|
||||
const text = rules(f);
|
||||
const firstDb = text.indexOf('<exclude domain="database" path="." />');
|
||||
const broken = text.slice(0, firstDb) + text.slice(firstDb + '<exclude domain="database" path="." />'.length);
|
||||
expect(ruleProblems(broken, RULE_SECTIONS[f])).toEqual(['cloud-backup: database is not excluded']);
|
||||
});
|
||||
|
||||
it('a file that includes something is caught', () => {
|
||||
const f = 'rosea_backup_rules.xml' as const;
|
||||
const broken = rules(f).replace('</full-backup-content>', '<include domain="file" path="." />\n</full-backup-content>');
|
||||
expect(ruleProblems(broken, RULE_SECTIONS[f])).toEqual(['includes something']);
|
||||
});
|
||||
|
||||
it('knows all nine storage domains', () => {
|
||||
expect(DOMAINS).toHaveLength(9);
|
||||
});
|
||||
});
|
||||
|
||||
describe('apkProblems, on aapt2 output of the APK built 2026-11-17 (Tauri 2.12.5, AGP 9.3.1)', () => {
|
||||
const permissions = readFileSync(join(HERE, 'fixtures', 'apk-permissions.txt'), 'utf8');
|
||||
const tree = readFileSync(join(HERE, 'fixtures', 'apk-manifest.xmltree.txt'), 'utf8');
|
||||
|
||||
it('passes the patched APK: no permission asked but androidx own receiver guard', () => {
|
||||
expect(apkProblems(permissions, tree)).toEqual([]);
|
||||
});
|
||||
|
||||
it('names INTERNET, or any permission a library merges in', () => {
|
||||
const more = `${permissions.trimEnd()}\nuses-permission: name='android.permission.INTERNET'\nuses-permission: name='android.permission.ACCESS_NETWORK_STATE'\n`;
|
||||
expect(apkProblems(more, tree)).toEqual([
|
||||
'the APK asks for android.permission.INTERNET',
|
||||
'the APK asks for android.permission.ACCESS_NETWORK_STATE'
|
||||
]);
|
||||
});
|
||||
|
||||
it("does not let another app's receiver guard through", () => {
|
||||
const other = `${permissions.trimEnd()}\nuses-permission: name='com.example.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'\n`;
|
||||
expect(apkProblems(other, tree)).toEqual(['the APK asks for com.example.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION']);
|
||||
});
|
||||
|
||||
it('names backup left on', () => {
|
||||
expect(apkProblems(permissions, tree.replace(/allowBackup\((0x[0-9a-f]+)\)=false/, 'allowBackup($1)=true'))).toEqual([
|
||||
'the APK does not set allowBackup=false'
|
||||
]);
|
||||
});
|
||||
|
||||
it("reads each WebView switch's own value, not its neighbour's", () => {
|
||||
const flipped = tree.replace(
|
||||
/("android\.webkit\.WebView\.EnableSafeBrowsing"[^\n]*\r?\n\s*A: [^\n]*:value\(0x[0-9a-f]+\))=false/,
|
||||
'$1=true'
|
||||
);
|
||||
expect(flipped).not.toBe(tree);
|
||||
expect(apkProblems(permissions, flipped)).toEqual([
|
||||
"the APK's meta-data android.webkit.WebView.EnableSafeBrowsing is true, not false"
|
||||
]);
|
||||
const gone = tree.replace('"android.webkit.WebView.MetricsOptOut"', '"android.webkit.WebView.Something"');
|
||||
expect(apkProblems(permissions, gone)).toEqual(['the APK has no meta-data android.webkit.WebView.MetricsOptOut']);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,165 @@
|
||||
/**
|
||||
* The shell's configuration holds what tauri-platforms.md decided (D3–D7, D10, D11). Each of
|
||||
* these is a value that fails silently at runtime, or worse, only after a release: a changed
|
||||
* identifier or origin leaves the player's rose behind in the old app.
|
||||
*/
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
import { dirname, join, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { CSP } from '../../rosea/csp.js';
|
||||
import { PRODUCT_NAME } from '../../../packages/schema/src/constants.js';
|
||||
|
||||
const SRC_TAURI = join(dirname(fileURLToPath(import.meta.url)), '..', 'src-tauri');
|
||||
/** The parts of a Tauri config these tests read. */
|
||||
interface TauriConf {
|
||||
productName?: string;
|
||||
identifier?: string;
|
||||
version?: string;
|
||||
build: { frontendDist: string; beforeBuildCommand: string; beforeDevCommand: string; devUrl: string };
|
||||
app: { windows: Record<string, unknown>[]; security: Record<string, unknown> };
|
||||
bundle: { targets?: string[] };
|
||||
plugins?: unknown;
|
||||
}
|
||||
const json = (name: string): TauriConf => JSON.parse(readFileSync(join(SRC_TAURI, name), 'utf8')) as TauriConf;
|
||||
const conf = json('tauri.conf.json');
|
||||
const window = conf.app.windows[0] ?? {};
|
||||
|
||||
describe('tauri.conf.json', () => {
|
||||
it('names the app with the product name, in the bundle and the window title (D3)', () => {
|
||||
expect(conf.productName).toBe(PRODUCT_NAME);
|
||||
expect(window['title']).toBe(PRODUCT_NAME);
|
||||
});
|
||||
|
||||
it('keeps the identifier it was released with: a new one is a different app (D3)', () => {
|
||||
expect(conf.identifier).toBe('cz.mareknovak.domi.rosea');
|
||||
});
|
||||
|
||||
it("reads its version from the game's package.json (D3)", () => {
|
||||
expect(conf.version).toBe('../../rosea/package.json');
|
||||
const pkg = JSON.parse(readFileSync(resolve(SRC_TAURI, String(conf.version)), 'utf8')) as Record<string, string>;
|
||||
expect(pkg['name']).toBe('@rosea/app');
|
||||
expect(pkg['version']).toMatch(/^\d+\.\d+\.\d+$/);
|
||||
});
|
||||
|
||||
it("delivers the PWA's content-security policy, the same string (D4)", () => {
|
||||
expect(conf.app.security['csp']).toBe(CSP);
|
||||
});
|
||||
|
||||
it("wraps the game's shell build and nothing else (D1, D2)", () => {
|
||||
expect(conf.build.frontendDist).toBe('../../rosea/dist-tauri');
|
||||
expect(resolve(SRC_TAURI, conf.build.frontendDist)).toBe(resolve(SRC_TAURI, '..', '..', 'rosea', 'dist-tauri'));
|
||||
expect(conf.build.beforeBuildCommand).toBe('pnpm --filter @rosea/app build:shell');
|
||||
expect(conf.build.beforeDevCommand).toBe('pnpm --filter @rosea/app dev:shell');
|
||||
});
|
||||
|
||||
it('runs its dev server on 127.0.0.1 only (CLAUDE.md §5.7)', () => {
|
||||
expect(new URL(conf.build.devUrl).hostname).toBe('127.0.0.1');
|
||||
const app = JSON.parse(readFileSync(join(SRC_TAURI, '..', '..', 'rosea', 'package.json'), 'utf8')) as { scripts: Record<string, string> };
|
||||
expect(app['scripts']['dev:shell']).toContain('--host 127.0.0.1');
|
||||
expect(app['scripts']['dev:shell']).toContain('--port 5173');
|
||||
expect(conf.build.devUrl).toBe('http://127.0.0.1:5173');
|
||||
});
|
||||
|
||||
it('keeps the https origin it was released with: IndexedDB lives per origin (D10)', () => {
|
||||
expect(window['useHttpsScheme']).toBe(true);
|
||||
});
|
||||
|
||||
it("switches WebView2's own traffic off (D7)", () => {
|
||||
const args = String(window['additionalBrowserArgs']);
|
||||
for (const flag of [
|
||||
'--disable-background-networking',
|
||||
'--disable-component-update',
|
||||
'--disable-domain-reliability',
|
||||
'--disable-sync',
|
||||
'--no-pings',
|
||||
'--disable-client-side-phishing-detection',
|
||||
'--dns-prefetch-disable'
|
||||
]) {
|
||||
expect(args.split(' ')).toContain(flag);
|
||||
}
|
||||
const disabled = /--disable-features=(\S+)/.exec(args)?.[1]?.split(',') ?? [];
|
||||
for (const feature of [
|
||||
// Tauri's own defaults, which a custom list must repeat.
|
||||
'msWebOOUI', 'msPdfOOUI', 'msSmartScreenProtection',
|
||||
'DnsOverHttpsUpgrade', 'msExperimentationAndConfigurationService', 'AutofillServerCommunication', 'OptimizationHints'
|
||||
]) {
|
||||
expect(disabled).toContain(feature);
|
||||
}
|
||||
});
|
||||
|
||||
it('builds only what each system can make (D11)', () => {
|
||||
expect(json('tauri.windows.conf.json').bundle.targets).toEqual(['nsis']);
|
||||
expect(json('tauri.macos.conf.json').bundle.targets).toEqual(['app', 'dmg']);
|
||||
expect(json('tauri.linux.conf.json').bundle.targets).toEqual(['deb', 'appimage']);
|
||||
expect(conf.bundle.targets).toBeUndefined();
|
||||
});
|
||||
|
||||
it('applies the Android privacy patch before the game is built for Android (D6)', () => {
|
||||
const before = json('tauri.android.conf.json').build.beforeBuildCommand;
|
||||
const patch = before.indexOf('pnpm --filter @rosea/tauri android:privacy');
|
||||
expect(patch).toBe(0);
|
||||
expect(before.indexOf('&& pnpm --filter @rosea/app build:shell')).toBeGreaterThan(patch);
|
||||
});
|
||||
});
|
||||
|
||||
describe('domi-rosea://open, from the installer (fabrica-release.md F5)', () => {
|
||||
const windows = JSON.parse(readFileSync(join(SRC_TAURI, 'tauri.windows.conf.json'), 'utf8')) as {
|
||||
bundle: { windows?: { nsis?: { installerHooks?: string; installMode?: string } } };
|
||||
};
|
||||
const hooksPath = windows.bundle.windows?.nsis?.installerHooks ?? '';
|
||||
const hooks = existsSync(join(SRC_TAURI, hooksPath)) ? readFileSync(join(SRC_TAURI, hooksPath), 'utf8') : '';
|
||||
/** The NSIS statements of one macro, comments dropped. */
|
||||
const macro = (name: string): string[] =>
|
||||
(new RegExp(`!macro ${name}\\r?\\n([\\s\\S]*?)!macroend`).exec(hooks)?.[1] ?? '')
|
||||
.split(/\r?\n/)
|
||||
.map((l) => l.trim())
|
||||
.filter((l) => l !== '' && !l.startsWith(';'));
|
||||
|
||||
it('the Windows installer runs the hooks file, and installs for the current user only', () => {
|
||||
expect(hooksPath).toBe('./windows/hooks.nsh');
|
||||
expect(hooks).not.toBe('');
|
||||
const nsis = (conf.bundle as { windows?: { nsis?: { installMode?: string } } }).windows?.nsis;
|
||||
expect(nsis?.installMode).toBe('currentUser');
|
||||
});
|
||||
|
||||
it('registers exactly the domi-rosea scheme under HKCU, opening the installed exe with the address', () => {
|
||||
expect(macro('NSIS_HOOK_POSTINSTALL')).toEqual([
|
||||
'WriteRegStr HKCU "Software\\Classes\\domi-rosea" "" "URL:Rosea Domi"',
|
||||
'WriteRegStr HKCU "Software\\Classes\\domi-rosea" "URL Protocol" ""',
|
||||
`WriteRegStr HKCU "Software\\Classes\\domi-rosea\\DefaultIcon" "" '"$INSTDIR\\\${MAINBINARYNAME}.exe",0'`,
|
||||
`WriteRegStr HKCU "Software\\Classes\\domi-rosea\\shell\\open\\command" "" '"$INSTDIR\\\${MAINBINARYNAME}.exe" "%1"'`
|
||||
]);
|
||||
});
|
||||
|
||||
it('the uninstaller removes that key and nothing else', () => {
|
||||
expect(macro('NSIS_HOOK_POSTUNINSTALL')).toEqual(['DeleteRegKey HKCU "Software\\Classes\\domi-rosea"']);
|
||||
});
|
||||
|
||||
it('writes nowhere else: no machine-wide key, no other hook', () => {
|
||||
expect(hooks).not.toMatch(/HKLM|HKCR|HKEY_/);
|
||||
expect([...hooks.matchAll(/!macro (\w+)/g)].map((m) => m[1])).toEqual(['NSIS_HOOK_POSTINSTALL', 'NSIS_HOOK_POSTUNINSTALL']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('the Rust side (D5)', () => {
|
||||
it('depends on tauri alone: no plugin, no SDK', () => {
|
||||
const cargo = readFileSync(join(SRC_TAURI, 'Cargo.toml'), 'utf8');
|
||||
const deps = /\n\[dependencies\]\n([\s\S]*?)(?:\n\[|$)/.exec(cargo)?.[1] ?? '';
|
||||
const names = deps
|
||||
.split('\n')
|
||||
.map((l) => /^([A-Za-z0-9_-]+)\s*=/.exec(l)?.[1])
|
||||
.filter((n): n is string => n !== undefined);
|
||||
expect(names).toEqual(['tauri']);
|
||||
expect(cargo).not.toMatch(/\[target\.[^\]]*dependencies\]/);
|
||||
});
|
||||
|
||||
it('grants the page no IPC: there is no capabilities folder', () => {
|
||||
expect(existsSync(join(SRC_TAURI, 'capabilities'))).toBe(false);
|
||||
expect(conf.app.security['capabilities']).toBeUndefined();
|
||||
});
|
||||
|
||||
it('declares no plugin configuration', () => {
|
||||
expect(conf.plugins).toBeUndefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<!-- AndroidTV support -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
|
||||
<application
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.rosea_shell"
|
||||
android:usesCleartextTraffic="${usesCleartextTraffic}">
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/main_activity_title"
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<!-- AndroidTV support -->
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,89 @@
|
||||
N: android=http://schemas.android.com/apk/res/android (line=2)
|
||||
E: manifest (line=2)
|
||||
A: http://schemas.android.com/apk/res/android:versionCode(0x0101021b)=1000
|
||||
A: http://schemas.android.com/apk/res/android:versionName(0x0101021c)="0.1.0" (Raw: "0.1.0")
|
||||
A: http://schemas.android.com/apk/res/android:compileSdkVersion(0x01010572)=37
|
||||
A: http://schemas.android.com/apk/res/android:compileSdkVersionCodename(0x01010573)="17" (Raw: "17")
|
||||
A: package="cz.mareknovak.domi.rosea" (Raw: "cz.mareknovak.domi.rosea")
|
||||
A: platformBuildVersionCode=37
|
||||
A: platformBuildVersionName=17
|
||||
E: uses-sdk (line=7)
|
||||
A: http://schemas.android.com/apk/res/android:minSdkVersion(0x0101020c)=24
|
||||
A: http://schemas.android.com/apk/res/android:targetSdkVersion(0x01010270)=37
|
||||
E: uses-feature (line=12)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.software.leanback" (Raw: "android.software.leanback")
|
||||
A: http://schemas.android.com/apk/res/android:required(0x0101028e)=false
|
||||
E: permission (line=16)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" (Raw: "cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION")
|
||||
A: http://schemas.android.com/apk/res/android:protectionLevel(0x01010009)=0x00000002
|
||||
E: uses-permission (line=20)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" (Raw: "cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION")
|
||||
E: application (line=22)
|
||||
A: http://schemas.android.com/apk/res/android:theme(0x01010000)=@0x7f100274
|
||||
A: http://schemas.android.com/apk/res/android:label(0x01010001)=@0x7f0f001c
|
||||
A: http://schemas.android.com/apk/res/android:icon(0x01010002)=@0x7f0d0000
|
||||
A: http://schemas.android.com/apk/res/android:debuggable(0x0101000f)=true
|
||||
A: http://schemas.android.com/apk/res/android:allowBackup(0x01010280)=false
|
||||
A: http://schemas.android.com/apk/res/android:extractNativeLibs(0x010104ea)=false
|
||||
A: http://schemas.android.com/apk/res/android:fullBackupContent(0x010104eb)=@0x7f120001
|
||||
A: http://schemas.android.com/apk/res/android:usesCleartextTraffic(0x010104ec)=true
|
||||
A: http://schemas.android.com/apk/res/android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
|
||||
A: http://schemas.android.com/apk/res/android:dataExtractionRules(0x0101063e)=@0x7f120002
|
||||
E: activity (line=33)
|
||||
A: http://schemas.android.com/apk/res/android:label(0x01010001)=@0x7f0f0047
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="cz.mareknovak.domi.rosea.MainActivity" (Raw: "cz.mareknovak.domi.rosea.MainActivity")
|
||||
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=true
|
||||
A: http://schemas.android.com/apk/res/android:launchMode(0x0101001d)=2
|
||||
A: http://schemas.android.com/apk/res/android:configChanges(0x0101001f)=0x00000fb4
|
||||
E: intent-filter (line=39)
|
||||
E: action (line=40)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
|
||||
E: category (line=42)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
|
||||
E: category (line=44)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.intent.category.LEANBACK_LAUNCHER" (Raw: "android.intent.category.LEANBACK_LAUNCHER")
|
||||
E: provider (line=48)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.core.content.FileProvider" (Raw: "androidx.core.content.FileProvider")
|
||||
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=false
|
||||
A: http://schemas.android.com/apk/res/android:authorities(0x01010018)="cz.mareknovak.domi.rosea.fileprovider" (Raw: "cz.mareknovak.domi.rosea.fileprovider")
|
||||
A: http://schemas.android.com/apk/res/android:grantUriPermissions(0x0101001b)=true
|
||||
E: meta-data (line=53)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.support.FILE_PROVIDER_PATHS" (Raw: "android.support.FILE_PROVIDER_PATHS")
|
||||
A: http://schemas.android.com/apk/res/android:resource(0x01010025)=@0x7f120000
|
||||
E: meta-data (line=58)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.webkit.WebView.EnableSafeBrowsing" (Raw: "android.webkit.WebView.EnableSafeBrowsing")
|
||||
A: http://schemas.android.com/apk/res/android:value(0x01010024)=false
|
||||
E: meta-data (line=61)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.webkit.WebView.MetricsOptOut" (Raw: "android.webkit.WebView.MetricsOptOut")
|
||||
A: http://schemas.android.com/apk/res/android:value(0x01010024)=true
|
||||
E: provider (line=65)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.startup.InitializationProvider" (Raw: "androidx.startup.InitializationProvider")
|
||||
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=false
|
||||
A: http://schemas.android.com/apk/res/android:authorities(0x01010018)="cz.mareknovak.domi.rosea.androidx-startup" (Raw: "cz.mareknovak.domi.rosea.androidx-startup")
|
||||
E: meta-data (line=69)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.emoji2.text.EmojiCompatInitializer" (Raw: "androidx.emoji2.text.EmojiCompatInitializer")
|
||||
A: http://schemas.android.com/apk/res/android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
|
||||
E: meta-data (line=72)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.lifecycle.ProcessLifecycleInitializer" (Raw: "androidx.lifecycle.ProcessLifecycleInitializer")
|
||||
A: http://schemas.android.com/apk/res/android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
|
||||
E: meta-data (line=75)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.ProfileInstallerInitializer" (Raw: "androidx.profileinstaller.ProfileInstallerInitializer")
|
||||
A: http://schemas.android.com/apk/res/android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
|
||||
E: receiver (line=80)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.ProfileInstallReceiver" (Raw: "androidx.profileinstaller.ProfileInstallReceiver")
|
||||
A: http://schemas.android.com/apk/res/android:permission(0x01010006)="android.permission.DUMP" (Raw: "android.permission.DUMP")
|
||||
A: http://schemas.android.com/apk/res/android:enabled(0x0101000e)=true
|
||||
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=true
|
||||
A: http://schemas.android.com/apk/res/android:directBootAware(0x01010505)=false
|
||||
E: intent-filter (line=86)
|
||||
E: action (line=87)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.INSTALL_PROFILE" (Raw: "androidx.profileinstaller.action.INSTALL_PROFILE")
|
||||
E: intent-filter (line=89)
|
||||
E: action (line=90)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.SKIP_FILE" (Raw: "androidx.profileinstaller.action.SKIP_FILE")
|
||||
E: intent-filter (line=92)
|
||||
E: action (line=93)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.SAVE_PROFILE" (Raw: "androidx.profileinstaller.action.SAVE_PROFILE")
|
||||
E: intent-filter (line=95)
|
||||
E: action (line=96)
|
||||
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.BENCHMARK_OPERATION" (Raw: "androidx.profileinstaller.action.BENCHMARK_OPERATION")
|
||||
@@ -0,0 +1,3 @@
|
||||
package: cz.mareknovak.domi.rosea
|
||||
permission: cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
|
||||
uses-permission: name='cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* The game's build for the shell (`vite build --mode tauri`, tauri-platforms.md D2), made into a
|
||||
* temporary folder and read: no service worker, no manifest, no <meta> policy, assets at the root,
|
||||
* and the shell constant replaced. The PWA's own build is checked by the e2e suites.
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { mkdtempSync, readdirSync, readFileSync, rmSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
|
||||
const APP = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'rosea');
|
||||
let out = '';
|
||||
let html = '';
|
||||
let files: string[] = [];
|
||||
let scripts = '';
|
||||
|
||||
beforeAll(() => {
|
||||
out = mkdtempSync(join(tmpdir(), 'rosea-shell-build-'));
|
||||
const build = spawnSync('pnpm', ['exec', 'vite', 'build', '--mode', 'tauri', '--outDir', out, '--emptyOutDir', '--logLevel', 'error'], {
|
||||
cwd: APP,
|
||||
encoding: 'utf8',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
if (build.status !== 0) throw new Error(`vite build --mode tauri failed:\n${build.stdout}\n${build.stderr}`);
|
||||
files = readdirSync(out, { recursive: true, encoding: 'utf8' }).map((f) => f.replaceAll('\\', '/'));
|
||||
html = readFileSync(join(out, 'index.html'), 'utf8');
|
||||
scripts = files.filter((f) => f.endsWith('.js')).map((f) => readFileSync(join(out, f), 'utf8')).join('\n');
|
||||
}, 120_000);
|
||||
|
||||
afterAll(() => {
|
||||
if (out) rmSync(out, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
describe('the game built for the shell', () => {
|
||||
it('has no service worker and no web manifest', () => {
|
||||
expect(files.filter((f) => /(^|\/)(sw|workbox-[^/]*|registerSW)\.js$/.test(f))).toEqual([]);
|
||||
expect(files.filter((f) => f.endsWith('.webmanifest'))).toEqual([]);
|
||||
expect(html).not.toContain('manifest');
|
||||
expect(scripts).not.toContain('navigator.serviceWorker.register');
|
||||
});
|
||||
|
||||
it('carries no <meta> content-security policy: Tauri delivers it (D4)', () => {
|
||||
expect(html).not.toContain('Content-Security-Policy');
|
||||
});
|
||||
|
||||
it('loads its assets from the root of the origin, not /Rosea/', () => {
|
||||
const urls = [...html.matchAll(/(?:src|href)="([^"]+)"/g)].map((m) => m[1]!);
|
||||
const assets = urls.filter((u) => u.includes('assets/'));
|
||||
expect(assets.length).toBeGreaterThanOrEqual(2);
|
||||
for (const u of assets) expect(u.startsWith('/assets/')).toBe(true);
|
||||
expect(html).not.toContain('/Rosea/');
|
||||
});
|
||||
|
||||
it('replaces the shell constant at build time: left in, it would throw in the webview', () => {
|
||||
expect(scripts).not.toContain('__ROSEA_SHELL__');
|
||||
});
|
||||
|
||||
it('ships no source maps', () => {
|
||||
expect(files.filter((f) => f.endsWith('.map'))).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* The release APK is signed in Custos and nowhere else (fabrica-release.md F4): the arguments
|
||||
* name the one key, the exact repository and a tag, and the script never falls back to another
|
||||
* custos-sign or another Custos.
|
||||
*/
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { APK_KEY, custosSign, signArgs, signedApkName, UNSIGNED_APK } from '../src/sign-apk.js';
|
||||
|
||||
const COMMIT = 'a'.repeat(40);
|
||||
const pkg = JSON.parse(readFileSync(join(fileURLToPath(new URL('..', import.meta.url)), 'package.json'), 'utf8')) as { scripts: Record<string, string> };
|
||||
|
||||
describe('signArgs', () => {
|
||||
it('asks for rosea-android, scoped to mnovak/Rosea, the release pipeline and a tag', () => {
|
||||
const args = signArgs({ version: '0.1.0', commit: COMMIT, unsigned: 'in.apk', out: 'out.apk' });
|
||||
expect(args).toEqual([
|
||||
'apk', 'in.apk', '--out', 'out.apk', '--key', 'rosea-android', '--repo', 'mnovak/Rosea', '--pipeline', 'release',
|
||||
'--commit', COMMIT, '--trigger', 'tag', '--run', 'rosea-v0.1.0', '--version', '0.1.0', '--step', 'apk'
|
||||
]);
|
||||
expect(APK_KEY).toBe('rosea-android');
|
||||
});
|
||||
|
||||
it('refuses a version or a commit that is not one', () => {
|
||||
expect(() => signArgs({ version: 'v0.1.0', commit: COMMIT, unsigned: 'a', out: 'b' })).toThrow(/not a version/);
|
||||
expect(() => signArgs({ version: '0.1.0', commit: 'HEAD', unsigned: 'a', out: 'b' })).toThrow(/not a commit/);
|
||||
});
|
||||
|
||||
it('names the published APK by app, version and ABI', () => {
|
||||
expect(signedApkName('0.1.0')).toBe('rosea-domi-0.1.0-arm64.apk');
|
||||
});
|
||||
|
||||
it('signs the release build that android.ts verified, never the debug one', () => {
|
||||
expect(UNSIGNED_APK).toContain('/release/');
|
||||
expect(pkg.scripts['build:android-release']).toContain(`verify src-tauri/${UNSIGNED_APK}`);
|
||||
expect(pkg.scripts['build:android-release']).not.toContain('--debug');
|
||||
});
|
||||
});
|
||||
|
||||
describe('custosSign', () => {
|
||||
it('runs the custos-sign CUSTOS_SIGN_EXE names, else the one on PATH', () => {
|
||||
expect(custosSign({ CUSTOS_SIGN_EXE: 'F:\\Apps\\Custos\\custos-sign.exe' }, () => true)).toBe('F:\\Apps\\Custos\\custos-sign.exe');
|
||||
expect(custosSign({}, () => true)).toBe('custos-sign.exe');
|
||||
});
|
||||
|
||||
it('refuses a named custos-sign that is not there, rather than another one', () => {
|
||||
expect(() => custosSign({ CUSTOS_SIGN_EXE: 'X:\\nowhere.exe' }, () => false)).toThrow(/not there/);
|
||||
});
|
||||
|
||||
it('refuses another Custos (CUSTOS_PIPE)', () => {
|
||||
expect(() => custosSign({ CUSTOS_PIPE: '\\\\.\\pipe\\test' }, () => true)).toThrow(/CUSTOS_PIPE/);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "scripts/**/*.ts", "test/**/*.ts"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* The content-security policy, one string for all four versions (CLAUDE.md §2, *Four versions*).
|
||||
* The PWA carries it in a <meta> tag, because GitHub Pages cannot send headers (CLAUDE.md §8).
|
||||
* The Tauri shell delivers it from `apps/rosea-tauri/src-tauri/tauri.conf.json`
|
||||
* (`app.security.csp`), and the shell's test holds that string equal to this one
|
||||
* (tauri-platforms.md D4).
|
||||
*
|
||||
* `'self'` everywhere and nothing else: no CDN, no font host, no analytics (CLAUDE.md §4).
|
||||
* `frame-ancestors` is ignored in a meta tag and is omitted rather than pretended.
|
||||
*/
|
||||
export const CSP = [
|
||||
"default-src 'self'",
|
||||
"script-src 'self'",
|
||||
"style-src 'self'",
|
||||
"img-src 'self' data:",
|
||||
"font-src 'self'",
|
||||
"connect-src 'self'",
|
||||
"manifest-src 'self'",
|
||||
"worker-src 'self'",
|
||||
"object-src 'none'",
|
||||
"base-uri 'self'",
|
||||
"form-action 'none'"
|
||||
].join('; ');
|
||||
@@ -6,7 +6,9 @@
|
||||
"description": "The PWA. Renders what the engine returns; contains no growth, taming or sky logic.",
|
||||
"scripts": {
|
||||
"dev": "vite --host 127.0.0.1 --port 5173 --strictPort",
|
||||
"build": "vite build",
|
||||
"build": "tsx ../../scripts/validate-library.ts && vite build",
|
||||
"build:shell": "tsx ../../scripts/validate-library.ts && vite build --mode tauri",
|
||||
"dev:shell": "vite --mode tauri --host 127.0.0.1 --port 5173 --strictPort",
|
||||
"typecheck": "svelte-check --threshold error --output human"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
import { version } from '../package.json';
|
||||
// Bundled at build time, so the letter is precached and opens offline (letter-slot.md L1).
|
||||
import letter from '../../../docs/LETTER.md?raw';
|
||||
// The verified hope library, bundled after validate:library passed (day-sentence.md P5).
|
||||
import sentences from 'virtual:rosea-library';
|
||||
|
||||
// The device's own zone, read here and nowhere else: the engine never asks the
|
||||
// device anything (CLAUDE.md §2). Only the zone's name; never GPS, never a lookup.
|
||||
@@ -27,7 +29,9 @@
|
||||
search: async (query) => (await loadTowns()).searchTowns(query),
|
||||
load: () => storage.loadSunsetPlace(),
|
||||
save: (choice) => storage.saveSunsetPlace(choice),
|
||||
now: () => Date.now()
|
||||
now: () => Date.now(),
|
||||
// Another tab of the garden chose a town (two-tabs.md).
|
||||
changes: (listener) => storage.onChange((what) => what === 'place' && listener())
|
||||
};
|
||||
|
||||
// The player's key names their rose (rose.md). Kept once; if the device will not
|
||||
@@ -50,13 +54,21 @@
|
||||
}
|
||||
|
||||
// --- Keeping her (keep-her-safe.md) -------------------------------------
|
||||
// The Android, iOS and desktop apps are installed by being apps (tauri-platforms.md D9):
|
||||
// they ask to keep the garden after the first care, as an installed PWA does, and never
|
||||
// show the hint to add the page to the home screen. Keep her safe speaks of the app, not a
|
||||
// browser (keep-her-safe-apps.md A1).
|
||||
const inApp = __ROSEA_SHELL__ === 'tauri';
|
||||
const browserStorage = typeof navigator !== 'undefined' ? navigator.storage : undefined;
|
||||
const keeping: RoseWiring['keeping'] = {
|
||||
where: inApp ? 'app' : 'browser',
|
||||
persisted: async () => (browserStorage?.persisted ? browserStorage.persisted() : null),
|
||||
persist: async () => (browserStorage?.persist ? browserStorage.persist() : null)
|
||||
};
|
||||
const installed = (): boolean =>
|
||||
matchMedia('(display-mode: standalone)').matches || (navigator as Navigator & { standalone?: boolean }).standalone === true;
|
||||
inApp ||
|
||||
matchMedia('(display-mode: standalone)').matches ||
|
||||
(navigator as Navigator & { standalone?: boolean }).standalone === true;
|
||||
// An installed app is asked once, after the first care of a visit: by then there is
|
||||
// something to lose, and installed apps are not met with a permission prompt (K5).
|
||||
let askedToKeep = false;
|
||||
@@ -66,7 +78,36 @@
|
||||
keeping.persist().catch((error: unknown) => console.error('keep: asking the browser to keep the garden failed', error));
|
||||
}
|
||||
|
||||
function saveFile(name: string, text: string): void {
|
||||
/**
|
||||
* Android's save screen, through the app's own bridge (keep-her-safe-apps.md A2): present
|
||||
* only in the Android app, where `<a download>` does nothing. It answers with a window event,
|
||||
* true when the file was written, false when the player stepped back (A4).
|
||||
*/
|
||||
const androidFile = inApp ? (window as Window & { roseaFile?: { save(name: string, text: string): void } }).roseaFile : undefined;
|
||||
let saving: Promise<boolean> | undefined;
|
||||
|
||||
function saveFile(name: string, text: string): void | Promise<boolean> {
|
||||
if (androidFile) {
|
||||
// One save at a time: a second tap while the screen is open waits for the first answer.
|
||||
if (saving) return saving;
|
||||
saving = new Promise<boolean>((resolve) => {
|
||||
const answer = (event: Event): void => {
|
||||
window.removeEventListener('rosea-file-saved', answer);
|
||||
saving = undefined;
|
||||
resolve((event as CustomEvent<unknown>).detail === true);
|
||||
};
|
||||
window.addEventListener('rosea-file-saved', answer);
|
||||
try {
|
||||
androidFile.save(name, text);
|
||||
} catch (error) {
|
||||
console.error('keep: the app could not open the save screen', error);
|
||||
window.removeEventListener('rosea-file-saved', answer);
|
||||
saving = undefined;
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
return saving;
|
||||
}
|
||||
// A file made here and handed over; nothing is sent anywhere.
|
||||
const url = URL.createObjectURL(new Blob([text], { type: 'application/json' }));
|
||||
const a = Object.assign(document.createElement('a'), { href: url, download: name });
|
||||
@@ -78,7 +119,8 @@
|
||||
|
||||
// --- A new version waiting (calm-refresh.md) ----------------------------
|
||||
// The worker is registered here so the page hears when a new version has installed
|
||||
// and waits. It is offered, never swapped in by itself (U2).
|
||||
// and waits. It is offered, never swapped in by itself (U2). In the apps there is no
|
||||
// worker: this registerSW does nothing, and a new version comes as a new app.
|
||||
let updateReady = $state(false);
|
||||
const updateSW = registerSW({
|
||||
onNeedRefresh: () => (updateReady = true),
|
||||
@@ -92,6 +134,13 @@
|
||||
await storage.appendCare(event);
|
||||
keepAfterCare();
|
||||
},
|
||||
sentences,
|
||||
loadOpened: () => storage.loadOpened(),
|
||||
appendOpened: (event) => storage.appendOpened(event),
|
||||
// The player's gardener, chosen at the first open (planet-garden.md G6).
|
||||
gardener: { load: () => storage.loadGardener(), save: (look) => storage.saveGardener(look) },
|
||||
// Another tab gave care, opened a petal or brought her back (two-tabs.md).
|
||||
changes: (listener) => storage.onChange((what) => what === 'log' && listener()),
|
||||
clientVersion: version,
|
||||
deviceZone,
|
||||
now: () => Date.now(),
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/// <reference types="svelte" />
|
||||
/// <reference types="vite/client" />
|
||||
/// <reference types="vite-plugin-pwa/client" />
|
||||
|
||||
/**
|
||||
* Which shell the game was built for (vite.config.ts): `'web'` for the PWA, `'tauri'` for the
|
||||
* Android, iOS and desktop apps. Read in App.svelte only, for wiring (CLAUDE.md §2).
|
||||
*/
|
||||
declare const __ROSEA_SHELL__: 'web' | 'tauri';
|
||||
|
||||
declare module 'virtual:rosea-library' {
|
||||
import type { HopeSentence } from '@rosea/schema';
|
||||
/** The verified hope library, bundled at build time after validate:library passed (day-sentence.md P5). */
|
||||
const library: readonly HopeSentence[];
|
||||
export default library;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
||||
import { readdirSync, readFileSync } from 'node:fs';
|
||||
import { join, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { defineConfig, type Plugin } from 'vite';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
// A relative path, not '@rosea/schema', on purpose. Vite bundles a config's
|
||||
@@ -6,6 +9,18 @@ import { VitePWA } from 'vite-plugin-pwa';
|
||||
// load a workspace package's .ts source, so `vite build` and `svelte-check` both
|
||||
// failed to load this file. The constants module is pure and dependency-free.
|
||||
import { PRODUCT_NAME, PRODUCT_SHORT_NAME } from '../../packages/schema/src/constants.js';
|
||||
import { CSP } from './csp.js';
|
||||
|
||||
/**
|
||||
* Two builds of one game (CLAUDE.md §2, *Four versions*; tauri-platforms.md D2).
|
||||
* - the PWA (default mode): base `/Rosea/`, a service worker, the web manifest, the CSP
|
||||
* in a <meta> tag, into `dist/`;
|
||||
* - the Tauri shell's copy (`--mode tauri`): base `/`, because Tauri serves the game at the
|
||||
* root of its own origin; no worker and no manifest, because the files are already on
|
||||
* the device; no <meta> CSP, because Tauri delivers the same policy and a page that
|
||||
* carries both obeys both; into `dist-tauri/`, so the two can never be mixed up.
|
||||
*/
|
||||
type Shell = 'web' | 'tauri';
|
||||
|
||||
/**
|
||||
* GitHub Pages serves a project site at `/<repo>/`, not `/` (CLAUDE.md §8). Vite
|
||||
@@ -13,96 +28,122 @@ import { PRODUCT_NAME, PRODUCT_SHORT_NAME } from '../../packages/schema/src/cons
|
||||
* derive from this one value, so they cannot disagree. The e2e and offline
|
||||
* suites serve the build under the same prefix.
|
||||
*/
|
||||
const BASE = process.env['ROSEA_BASE'] ?? '/Rosea/';
|
||||
if (!BASE.startsWith('/') || !BASE.endsWith('/')) {
|
||||
throw new Error(`ROSEA_BASE must start and end with '/', got '${BASE}'`);
|
||||
function baseFor(shell: Shell): string {
|
||||
const base = process.env['ROSEA_BASE'] ?? (shell === 'tauri' ? '/' : '/Rosea/');
|
||||
if (!base.startsWith('/') || !base.endsWith('/')) {
|
||||
throw new Error(`ROSEA_BASE must start and end with '/', got '${base}'`);
|
||||
}
|
||||
return base;
|
||||
}
|
||||
|
||||
/**
|
||||
* The content-security policy. GitHub Pages cannot send headers, so it lives in
|
||||
* a <meta> tag (CLAUDE.md §8). It is injected into the BUILT page only, because
|
||||
* the dev server injects inline <style> for hot reload and `style-src 'self'`
|
||||
* The content-security policy (`csp.ts`). GitHub Pages cannot send headers, so the PWA
|
||||
* carries it in a <meta> tag (CLAUDE.md §8). It is injected into the BUILT page only,
|
||||
* because the dev server injects inline <style> for hot reload and `style-src 'self'`
|
||||
* would blank it. E2E runs against the build, where the policy is real.
|
||||
*
|
||||
* `'self'` everywhere and nothing else: no CDN, no font host, no analytics
|
||||
* (CLAUDE.md §4). `frame-ancestors` is ignored in a meta tag and is omitted
|
||||
* rather than pretended.
|
||||
*/
|
||||
const CSP = [
|
||||
"default-src 'self'",
|
||||
"script-src 'self'",
|
||||
"style-src 'self'",
|
||||
"img-src 'self' data:",
|
||||
"font-src 'self'",
|
||||
"connect-src 'self'",
|
||||
"manifest-src 'self'",
|
||||
"worker-src 'self'",
|
||||
"object-src 'none'",
|
||||
"base-uri 'self'",
|
||||
"form-action 'none'"
|
||||
].join('; ');
|
||||
|
||||
function contentSecurityPolicy(): Plugin {
|
||||
return {
|
||||
name: 'rosea-csp',
|
||||
apply: 'build',
|
||||
transformIndexHtml: {
|
||||
order: 'post',
|
||||
handler: () => [
|
||||
{ tag: 'meta', attrs: { 'http-equiv': 'Content-Security-Policy', content: CSP }, injectTo: 'head-prepend' }
|
||||
]
|
||||
name: 'rosea-csp',
|
||||
apply: 'build',
|
||||
transformIndexHtml: {
|
||||
order: 'post',
|
||||
handler: () => [
|
||||
{ tag: 'meta', attrs: { 'http-equiv': 'Content-Security-Policy', content: CSP }, injectTo: 'head-prepend' }
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The hope library, bundled at build time as `virtual:rosea-library`
|
||||
* (day-sentence.md P5). The build script runs `validate:library` first and stops if
|
||||
* it fails, so the app holds exactly what passed and never validates in the browser
|
||||
* (GAP_ANALYSIS G0.12: Ajv needs `new Function`, which the CSP forbids).
|
||||
* `ROSEA_LIBRARY_DIR` swaps the folder, for the e2e build only.
|
||||
*/
|
||||
const LIBRARY_DIR = resolve(fileURLToPath(new URL('../..', import.meta.url)), process.env['ROSEA_LIBRARY_DIR'] ?? 'content/library');
|
||||
|
||||
function hopeLibrary(): Plugin {
|
||||
const id = 'virtual:rosea-library';
|
||||
const resolved = `\0${id}`;
|
||||
return {
|
||||
name: 'rosea-library',
|
||||
resolveId: (source) => (source === id ? resolved : undefined),
|
||||
load(source) {
|
||||
if (source !== resolved) return undefined;
|
||||
const entries: unknown[] = [];
|
||||
for (const file of readdirSync(LIBRARY_DIR).filter((f) => f.endsWith('.json')).sort()) {
|
||||
const path = join(LIBRARY_DIR, file);
|
||||
this.addWatchFile(path);
|
||||
const data: unknown = JSON.parse(readFileSync(path, 'utf8'));
|
||||
if (!Array.isArray(data)) throw new Error(`${path}: must be an array of entries`);
|
||||
entries.push(...data);
|
||||
}
|
||||
return `export default ${JSON.stringify(entries)};`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Nothing binds to anything but 127.0.0.1 (CLAUDE.md §5.7).
|
||||
export default defineConfig({
|
||||
base: BASE,
|
||||
plugins: [
|
||||
svelte(),
|
||||
contentSecurityPolicy(),
|
||||
VitePWA({
|
||||
strategies: 'generateSW',
|
||||
// Never swap a running app silently. A new worker waits until the player
|
||||
// is offered a calm refresh control (CLAUDE.md §8, GAP_ANALYSIS G0.10).
|
||||
registerType: 'prompt',
|
||||
// The app registers the worker itself through virtual:pwa-register, so it hears
|
||||
// when a new version is waiting (calm-refresh.md U1). Bundled, not inline: the
|
||||
// CSP has no 'unsafe-inline' for scripts.
|
||||
injectRegister: false,
|
||||
manifest: {
|
||||
// The web manifest: one of the three places the name lives, built from
|
||||
// the constants in @rosea/schema so the strings exist only there.
|
||||
name: PRODUCT_NAME,
|
||||
short_name: PRODUCT_SHORT_NAME,
|
||||
description: 'A rose to tend, a fox to befriend, and the time we give to people.',
|
||||
id: BASE,
|
||||
start_url: BASE,
|
||||
scope: BASE,
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
background_color: '#fbf6f1',
|
||||
theme_color: '#b4485e',
|
||||
icons: [{ src: 'icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' }]
|
||||
},
|
||||
workbox: {
|
||||
// The cache name never contains the build hash; Workbox invalidates
|
||||
// per entry from the precache manifest's revisions.
|
||||
cacheId: 'rosea',
|
||||
globPatterns: ['**/*.{js,css,html,svg,webmanifest}'],
|
||||
navigateFallback: 'index.html',
|
||||
// No runtime caching: the app makes no request it was not asked to make.
|
||||
runtimeCaching: [],
|
||||
cleanupOutdatedCaches: true,
|
||||
// The first worker controls the page that registered it, so a player who
|
||||
// opens the link once and loses signal still has the app.
|
||||
clientsClaim: true,
|
||||
skipWaiting: false
|
||||
},
|
||||
devOptions: { enabled: false }
|
||||
})
|
||||
],
|
||||
server: { host: '127.0.0.1', strictPort: true },
|
||||
preview: { host: '127.0.0.1', strictPort: true },
|
||||
build: { target: 'es2022', sourcemap: true }
|
||||
export default defineConfig(({ mode }) => {
|
||||
const shell: Shell = mode === 'tauri' ? 'tauri' : 'web';
|
||||
const BASE = baseFor(shell);
|
||||
return {
|
||||
base: BASE,
|
||||
// The one way the game knows which shell it is in, read in App.svelte only (CLAUDE.md §2).
|
||||
define: { __ROSEA_SHELL__: JSON.stringify(shell) },
|
||||
plugins: [
|
||||
svelte(),
|
||||
...(shell === 'web' ? [contentSecurityPolicy()] : []),
|
||||
hopeLibrary(),
|
||||
VitePWA({
|
||||
// Off in the shell: `virtual:pwa-register` then gives a registerSW that does nothing,
|
||||
// and no worker, manifest or register script is emitted (tauri-platforms.md D2).
|
||||
disable: shell === 'tauri',
|
||||
strategies: 'generateSW',
|
||||
// Never swap a running app silently. A new worker waits until the player
|
||||
// is offered a calm refresh control (CLAUDE.md §8, GAP_ANALYSIS G0.10).
|
||||
registerType: 'prompt',
|
||||
// The app registers the worker itself through virtual:pwa-register, so it hears
|
||||
// when a new version is waiting (calm-refresh.md U1). Bundled, not inline: the
|
||||
// CSP has no 'unsafe-inline' for scripts.
|
||||
injectRegister: false,
|
||||
manifest: {
|
||||
// The web manifest: one of the three places the name lives, built from
|
||||
// the constants in @rosea/schema so the strings exist only there.
|
||||
name: PRODUCT_NAME,
|
||||
short_name: PRODUCT_SHORT_NAME,
|
||||
description: 'A rose to tend, a fox to befriend, and the time we give to people.',
|
||||
id: BASE,
|
||||
start_url: BASE,
|
||||
scope: BASE,
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
background_color: '#fbf6f1',
|
||||
theme_color: '#b4485e',
|
||||
icons: [{ src: 'icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' }]
|
||||
},
|
||||
workbox: {
|
||||
// The cache name never contains the build hash; Workbox invalidates
|
||||
// per entry from the precache manifest's revisions.
|
||||
cacheId: 'rosea',
|
||||
globPatterns: ['**/*.{js,css,html,svg,webmanifest}'],
|
||||
navigateFallback: 'index.html',
|
||||
// No runtime caching: the app makes no request it was not asked to make.
|
||||
runtimeCaching: [],
|
||||
cleanupOutdatedCaches: true,
|
||||
// The first worker controls the page that registered it, so a player who
|
||||
// opens the link once and loses signal still has the app.
|
||||
clientsClaim: true,
|
||||
skipWaiting: false
|
||||
},
|
||||
devOptions: { enabled: false }
|
||||
})
|
||||
],
|
||||
server: { host: '127.0.0.1', strictPort: true },
|
||||
preview: { host: '127.0.0.1', strictPort: true },
|
||||
// The shell's copy has no source maps: they would ship inside every installer and APK.
|
||||
build: { target: 'es2022', sourcemap: shell === 'web', outDir: shell === 'tauri' ? 'dist-tauri' : 'dist' }
|
||||
};
|
||||
});
|
||||
|
||||
@@ -13,6 +13,22 @@ A picture that is off-style goes back for another try. It is never shipped.
|
||||
> **The fox and the Phase 2–3 pictures** (F1–F4 in §0, §3a, the new rows in §2 and §4, review
|
||||
> points 8–9) were added later the same day and **approved by Mark** with one change: the fox's
|
||||
> coat is a deep red-orange, not the drafted muted russet.
|
||||
>
|
||||
> **Rewritten 2026-11-07, at Mark's request.** The first `rose-sheet` came back as wet, pale
|
||||
> watercolour with a smiley face on a round ball inside the petals: a children's sticker sheet,
|
||||
> and the opposite of S1. Mark did not like it. The choices S1–S5 stand; the words that carry
|
||||
> them were too weak. §1 now leads with the look and says it positively, §3 puts the face *on*
|
||||
> the petals, and §6 makes prompts short enough for a generator to follow. The book's motifs
|
||||
> are no longer named in prompts (naming them invites them); they stay in §4 and §7, where the
|
||||
> review catches them. The picture list grew to every picture Phases 1–5 need (§4).
|
||||
>
|
||||
> **Changed by Mark, 2026-11-17: her world is a round tiny planet, and a gardener tends her.**
|
||||
> Seeing the garden as a page of buttons, he asked for a game: a planet, a character who does the
|
||||
> care with animations, gestures. He chose a **round tiny planet** (S2 below, reversed) and a
|
||||
> **human gardener, a boy or a girl, chosen and dressed by the player** (S6, new), knowing that
|
||||
> a child tending a rose on a small round planet is close to the book's most recognisable image.
|
||||
> The guards that keep them our own are in §3b, §4 and review points 10–11, and a legal check of
|
||||
> the look comes before any public release (`.agents/features/planet-garden.md` §0).
|
||||
|
||||
---
|
||||
|
||||
@@ -21,7 +37,8 @@ A picture that is off-style goes back for another try. It is never shipped.
|
||||
| # | Choice | Decided | Why |
|
||||
|:--|:--|:--|:--|
|
||||
| S1 | The medium | Matte gouache on warm paper, with soft brush outlines | It is gentle and hand-made like the rest of Domi. It is also clearly not the book's look, which is a thin pen line with loose, pale watercolour. |
|
||||
| S2 | Where the rose lives | A small garden bed on a hillside meadow, with a low dry-stone wall and a wide sky to the west | The sunset is real, so the scene needs a real horizon. It is an ordinary garden, never a tiny planet. |
|
||||
| S2 | Where the rose lives | ~~A small garden bed on a hillside meadow~~ **A round tiny planet of her own, cultivated as a garden**: meadow over it, her bed on top, a low dry-stone wall, the chair, the wild bush. *Reversed by Mark 2026-11-17.* | He wants a world of her own, as a game has. It stays a garden, never a bare rock: no volcanoes, no baobab-like trees, no single lamp post (§4). The real sky is still code behind it (S5); the in-game sunset keeps the hillside garden for its wide horizon. |
|
||||
| S6 | Who tends her | **A human gardener: a boy or a girl, chosen and dressed by the player** at the first open (skin tone, hair and its colour, clothes colour, a hat). *Decided by Mark 2026-11-17.* | The care is done by a character, with animations. The gardener is the player's own, so no two need look alike; simple work clothes and an apron, never a scarf, a long coat or cape, a green suit, a crown or a sword (§3b). |
|
||||
| S3 | The rose's face | A face in the middle of the bloom: two small eyes, often half-closed, a tiny mouth and a blush | This is the description in CLAUDE.md §1, drawn as written. |
|
||||
| S4 | The palette | §2 | It starts from the app's tokens (`--rose #b4485e`, `--paper #fbf6f1`). |
|
||||
| S5 | The sky | Drawn in code, never painted | The sun moves at the player's real time, and the stars are the real constellations. A painted sky could do neither. |
|
||||
@@ -39,17 +56,22 @@ A picture that is off-style goes back for another try. It is never shipped.
|
||||
|
||||
## 1. The system prompt (paste word for word)
|
||||
|
||||
> Soft, hand-made 2D storybook illustration painted in matte gouache with a gentle dry-brush
|
||||
> texture on warm off-white paper. Simple rounded shapes built from flat, soft colour areas with
|
||||
> two or three gentle tonal steps; no wet watercolour blooms, no thin scratchy pen line. Outlines
|
||||
> are soft, slightly irregular brush lines in deep plum-brown, never pure black, never a hard
|
||||
> vector line. Light is low and warm, as late in the day, coming from the left. The mood is
|
||||
> quiet, tender and hopeful, with generous calm space that never feels empty or bleak.
|
||||
> Characters are cute but alive, with small gentle eyes, often half-closed, and tiny mouths. No
|
||||
> text, letters or numbers anywhere in the image. No humans, no human figures, hands or faces,
|
||||
> no photographs, no logos, no brand characters. No 3D render look, no glossy highlights, no lens
|
||||
> effects, no gradients that look digital. Original artwork, not in the style of any existing
|
||||
> book, illustrator or film.
|
||||
> A hand-painted picture in opaque, matte gouache on warm off-white paper, for a quiet game made
|
||||
> for grown-ups. Flat, chalky areas of colour with visible dry-brush strokes and the grain of the
|
||||
> paper showing through; two or three soft tonal steps in each shape, no smooth blending.
|
||||
> Every form is edged with a soft brush line in deep plum-brown that swells and thins, slightly
|
||||
> uneven, as a painter's line does. Simple, confident shapes with a clear silhouette that still
|
||||
> reads when the picture is small. Low, warm evening light from the left: each form has a warm
|
||||
> lit side and a cooler, slightly violet shaded side. A restrained palette of dusty rose, sage,
|
||||
> moss green, honey and warm umber; amber gold and coral appear only in evening light. The mood is
|
||||
> calm, tender and quietly hopeful, with a little dry humour, like a page from a finely printed
|
||||
> book for adults: understated, never sugary, never a children's sticker or a cute mascot.
|
||||
> Characters are alive but small-featured: their faces are a few tiny marks painted directly on
|
||||
> them, with eyes as small dark dots or crescents, often half-closed. No text, letters or numbers
|
||||
> anywhere. No people, hands or human faces, except the player's gardener where the picture names
|
||||
> them. Not watercolour: no wet washes, bleeding edges, blooms or
|
||||
> pale tints. Not digital: no 3D rendering, gloss, airbrush gradients or lens effects. An
|
||||
> original design, in the manner of no existing artist, book or film.
|
||||
|
||||
---
|
||||
|
||||
@@ -94,10 +116,16 @@ The rose is the only character in Phase 1. Every rose picture follows the charac
|
||||
- **One garden rose** on a single slender stem. She is about three blooms tall, from the bloom
|
||||
down to where the stem meets the soil. She has three leaves, two low and one high, and a few
|
||||
small thorns with rounded tips. The thorns are part of her and never look threatening.
|
||||
- **The bloom is her head.** It is made of soft, layered petals in rose (`#C85A6E`) that turn
|
||||
pale petal (`#F2B5BE`) at the edges. Her face sits in the middle of the bloom: two small dark
|
||||
eyes, often half-closed, and a tiny mouth. When she is tended, a faint blush (`#E8899B`) shows
|
||||
on the petals by her cheeks.
|
||||
- **The bloom is her head.** It is a real old garden rose: cupped, many-petalled, the outer
|
||||
petals curling back, in rose (`#C85A6E`) turning pale petal (`#F2B5BE`) at the edges. It is
|
||||
her head by its posture, not by a drawn-in head.
|
||||
- **Her face is painted on the petals** at the heart of the bloom, where the inner petals fold
|
||||
together: two tiny dark eyes (dots or crescents, often half-closed) and a short mouth curve,
|
||||
the whole face no wider than a fifth of the bloom. **There is no round face, ball or bare
|
||||
patch inside the petals**: the petals curl round the face as they would round the heart of a
|
||||
real rose. When she is tended, a faint blush (`#E8899B`) warms the petals beside her eyes.
|
||||
- **Proportions:** the bloom is about as wide as a third of her height; the stem is slender but
|
||||
strong enough to hold it up proudly.
|
||||
- **A little vain.** She holds her head high and keeps her petals neat. Her leaves move like
|
||||
small arms: one raised when she speaks, both lowered when she is thirsty.
|
||||
- **Stages:** a tight bud, an opening bud, a half bloom and a full bloom. Each stage has the same
|
||||
@@ -106,7 +134,41 @@ The rose is the only character in Phase 1. Every rose picture follows the charac
|
||||
closed a little, eyes looking down. She is never wilted, broken, crying, dead or losing
|
||||
petals in pain. Fallen petals are a care task, not damage.
|
||||
- **Expressions:** content, sleepy, blushing, speaking, thirsty, too much water, windblown,
|
||||
waiting. Never angry, crying hard, frightened or hurt.
|
||||
waiting, tickled (a touch), and *gently* (a rush of touches: one leaf raised, calm, never
|
||||
cross — thorns.md). Never angry, crying hard, frightened or hurt.
|
||||
|
||||
---
|
||||
|
||||
## 3b. The gardener (S6, decided by Mark 2026-11-17)
|
||||
|
||||
The player's own gardener: a boy or a girl of about ten, chosen and dressed at the first open.
|
||||
Every gardener picture follows `gardener-sheet`.
|
||||
|
||||
- **Simple work clothes:** a plain short-sleeved shirt (the boy, with trousers) or tunic (the girl,
|
||||
with bare legs), a cream canvas apron with one pocket, small sturdy boots. Hands small and simple.
|
||||
- **A face like the others':** a few tiny painted marks, eyes often half-closed, calm and kind.
|
||||
- **The choices the player makes** (skin tone, hair style and colour, clothes colour, straw hat,
|
||||
cap or none) are the app's (`gardener.schema.json`). The board paints **the first look** (the girl:
|
||||
braids, brown hair, sage clothes, straw hat; and the boy, short hair, the same colours) so the
|
||||
character can be judged.
|
||||
- **Every look is stacked from painted layers** (decided by Mark 2026-11-17: *layered parts*, not a
|
||||
few painted looks, not colours tinted in code). The app stacks five transparent layers, back to
|
||||
front: **body** (skin, with the face, and a plain cream vest and shorts), **clothes** (the girl's
|
||||
tunic or the boy's shirt and trousers), **apron and boots**, **hair**, **hat**. Each layer is a
|
||||
sprite sheet with the same eight poses as `gardener-poses-sheet`, **the guide**: the girl in the
|
||||
first look, whole, never shown in the app. A layer is painted over the guide in register — only
|
||||
its part, exactly where it sits on the guide's figure, everything else transparent — and always
|
||||
as a whole sheet: one picture at a time would not line up. `pnpm art:accept` refuses a layer
|
||||
whose part strays more than 8 % of its cell outside the guide's figure, and any layer before the
|
||||
guide is accepted. The layers never hold the watering can or the windbreak: the game draws them.
|
||||
- **How many:** one layer sheet for each value the player can choose — 6 bodies (skin), 10 clothes
|
||||
(girl and boy in 5 colours), 1 apron, 36 hairs (6 styles in 6 colours), 2 hats (no hat needs
|
||||
none): **55 layer sheets** of 8 pictures, all listed by `art/manifest.json` (`layers`). The seven
|
||||
that stack the two first looks come first on the board; until a look's layers are all accepted,
|
||||
the app keeps its code drawing for that look.
|
||||
- **Never:** a scarf, a long coat or cape, a suit with epaulettes, a crown, a sword, golden curls
|
||||
with a green outfit, or anything that recreates the book's boy. He or she is a gardener at work.
|
||||
- **Size:** standing, a little taller than the rose.
|
||||
|
||||
---
|
||||
|
||||
@@ -157,7 +219,23 @@ The fox is the second character. Every fox picture follows the character sheet `
|
||||
- **Paths and lanterns (Phase 3, F4):** a path through the meadow grows from paw prints, to a
|
||||
trodden trail, to a soft earth road edged with stones. A lantern is a small iron-and-glass
|
||||
hand lantern hanging from a shepherd's-crook post, never a street lamp.
|
||||
- No flags, religious symbols, buildings, vehicles or people.
|
||||
- **The planets (Phase 2, drafts).** Each lonely grown-up has a small place of their own: a
|
||||
grassy hilltop seen from the side, its edge dropping away below — never a ball or a sphere.
|
||||
**The grown-up is never drawn**; the place shows who lives there, and the emptiness is the
|
||||
point. The pictures are drafts until each planet's feature doc decides it. The sixth
|
||||
grown-up's place is left out on purpose until its feature doc decides how it can be shown
|
||||
gently.
|
||||
- **Visitors and mementos (Phase 2):** small garden creatures that come by (a hedgehog, a robin
|
||||
at dawn, a snail, a moth, a ladybird, a small owl) and the small things they leave.
|
||||
- **The shared sky (Phase 4):** the sky is code; only small lights and the lamps of the
|
||||
sunset wave are pictures.
|
||||
- **The share frame (Phase 5):** a border of meadow round an empty middle where the player's
|
||||
sky is drawn.
|
||||
- **Her home planet (S2, reversed 2026-11-17):** a small round world seen whole, covered in meadow,
|
||||
with her round garden bed on top, a low dry-stone wall curving behind it, the wooden chair on its
|
||||
shoulder and a few meadow flowers. Everything outside the planet is transparent: the sky is code.
|
||||
**Never** volcanoes, baobab-like trees or a lone lamp post on it: it is a garden, not a rock.
|
||||
- No flags, religious symbols, buildings or vehicles. No people except the player's gardener.
|
||||
|
||||
---
|
||||
|
||||
@@ -185,15 +263,22 @@ of those sizes.
|
||||
The art board writes every prompt. Nobody types them by hand. Each prompt is §1, then:
|
||||
|
||||
```
|
||||
Asset: <id>
|
||||
Purpose: <where it appears and what it must say, in one sentence>
|
||||
Subject: <who or what, with the character sheet to attach>
|
||||
Setting / Canvas / Layout: <by kind: see §5 and §9>
|
||||
Size: <made at W × H px, background>
|
||||
Must include: <…>
|
||||
Must avoid: <the picture's own list, then the list every picture shares (§4)>
|
||||
Make: <what kind of image, in one plain sentence>
|
||||
Reference: <the character sheet to attach, and to match exactly> (character pictures only)
|
||||
Subject: <who or what, and the character's look>
|
||||
Setting / Layout: <the scene, or the grid in words: columns, rows, gaps>
|
||||
Canvas: <W × H px, background>
|
||||
Include: <…>
|
||||
Avoid: <a short list: the picture's own, then the few every picture shares>
|
||||
Board id: <id>
|
||||
```
|
||||
|
||||
Why this shape (2026-11-07): generators follow the first lines and drift on the rest. So the
|
||||
look comes first (§1), the picture second, and nothing a generator cannot use: no pixel
|
||||
coordinates (the board's cutting overlay and `art:accept` keep those), and no long lists of
|
||||
things not to draw. Naming a motif, even to forbid it, makes it likelier; the book's motifs are
|
||||
therefore checked in review (§4, §7), not written into prompts.
|
||||
|
||||
`tools/art-prep` builds the prompts from `art/manifest.json` (`pnpm art:board`), and a test
|
||||
checks that each one starts with §1 word for word.
|
||||
|
||||
@@ -204,7 +289,8 @@ checks that each one starts with §1 word for word.
|
||||
The board shows these under each card, and Claude's review checks them. Mark doesn't have to
|
||||
tick them: *Accept* is one tap.
|
||||
|
||||
0. It reads as one living garden rose with a soft face in her bloom: small eyes, a tiny mouth.
|
||||
0. It reads as one living garden rose, her face a few tiny marks painted on her inner petals,
|
||||
with no round ball face, and calm enough for grown-ups, not a sticker.
|
||||
1. She matches `rose-sheet`: the same bloom, petal colours, three leaves and rounded thorns.
|
||||
2. The colours stay within §2, with soft plum-brown outlines, in matte gouache, not wet watercolour.
|
||||
3. Nothing from the book: no glass dome, screen, tiny planet, desert, child or scarf, and no
|
||||
@@ -216,6 +302,12 @@ tick them: *Accept* is one tap.
|
||||
8. It reads as one young red-orange fox with a cream mask and a ringed tail, shy and gentle, and
|
||||
nothing like the book's sandy, long-eared fox.
|
||||
9. He matches `fox-sheet`: the same mask, ears, leg colour, tail rings and size.
|
||||
10. The gardener is a child at garden work, matching `gardener-sheet`: plain shirt or tunic, an
|
||||
apron, boots; no scarf, long coat, cape, suit, crown or sword, and nothing like the book's boy.
|
||||
11. Her planet is a cultivated garden world: meadow, her bed, the wall, the chair; no volcanoes,
|
||||
no baobab-like trees, no lone lamp post, and not the look of the book's little planet.
|
||||
12. A gardener layer holds only its part, in register with the guide: stacked with the other
|
||||
layers of a look, it makes one child, with nothing doubled, missing or shifted.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||
<!-- Stand-in for app-icon-maskable (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<rect width="1024" height="1024" fill="#e9846a"/><rect y="512" width="1024" height="512" fill="#f2b860" opacity=".6"/> <circle cx="512" cy="512" r="307.2" fill="none" stroke="#fbf6f1" stroke-width="4" stroke-dasharray="16 12"/> <svg x="256" y="225.28" width="512" height="573.44" viewBox="0 30 200 230"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M103 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M93 142 q7 7 14 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><circle cx="82" cy="138" r="8" fill="#e8899b"/><circle cx="118" cy="138" r="8" fill="#e8899b"/></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for care-props-more-sheet (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="768" height="512" viewBox="0 0 768 512"><g transform="translate(204.8 76.8) scale(1.7920)"><ellipse cx="100" cy="160" rx="80" ry="22" fill="#8a6248" opacity=".85"/><path d="M70 160 l-14 -40 l12 10 l2 -22 l8 18 l10 -16 l-4 44z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M100 160 l-14 -50 l12 10 l2 -27 l8 18 l10 -16 l-4 52z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M130 160 l-14 -60 l12 10 l2 -32 l8 18 l10 -16 l-4 60z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></svg><svg x="768" y="0" width="768" height="512" viewBox="0 0 768 512"><g transform="translate(204.8 76.8) scale(1.7920)"><g transform="rotate(24 100 110)"><rect x="70" y="80" width="90" height="80" rx="18" fill="#7fa07a" stroke="#3a2730" stroke-width="5"/><path d="M80 80 q35 -55 70 0" fill="none" stroke="#3a2730" stroke-width="7"/><path d="M72 110 L32 70" stroke="#3a2730" stroke-width="10" stroke-linecap="round"/></g><path d="M24 66 q-6 40 -4 90" fill="none" stroke="#9cc3d8" stroke-width="6" stroke-linecap="round"/><circle cx="16" cy="170" r="5" fill="#9cc3d8" stroke="#3a2730" stroke-width="2"/><circle cx="30" cy="182" r="5" fill="#9cc3d8" stroke="#3a2730" stroke-width="2"/></g></svg><svg x="0" y="512" width="768" height="512" viewBox="0 0 768 512"><g transform="translate(204.8 76.8) scale(1.7920)"><path d="M20 60 q60 -30 110 0 t60 -10" fill="none" stroke="#f2b5be" stroke-width="10" stroke-linecap="round"/><path d="M20 100 q60 -30 110 0 t60 -10" fill="none" stroke="#f3e3c8" stroke-width="10" stroke-linecap="round"/><path d="M20 140 q60 -30 110 0 t60 -10" fill="none" stroke="#f2b5be" stroke-width="10" stroke-linecap="round"/><ellipse cx="150" cy="70" rx="16" ry="7" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 150 70)"/><ellipse cx="80" cy="150" rx="14" ry="6" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(20 80 150)"/></g></svg><svg x="768" y="512" width="768" height="512" viewBox="0 0 768 512"><g transform="translate(204.8 76.8) scale(1.7920)"><path d="M70 57.599999999999994 q14 22.400000000000002 0 36.4 q-14 -14 0 -36.4z" fill="#9cc3d8" stroke="#3a2730" stroke-width="3"/><path d="M120 54 q10 16 0 26 q-10 -10 0 -26z" fill="#9cc3d8" stroke="#3a2730" stroke-width="3"/><path d="M100 94.4 q16 25.6 0 41.6 q-16 -16 0 -41.6z" fill="#9cc3d8" stroke="#3a2730" stroke-width="3"/><path d="M140 115.6 q9 14.4 0 23.400000000000002 q-9 -9 0 -23.400000000000002z" fill="#9cc3d8" stroke="#3a2730" stroke-width="3"/><path d="M60 127.2 q8 12.8 0 20.8 q-8 -8 0 -20.8z" fill="#9cc3d8" stroke="#3a2730" stroke-width="3"/></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||
<!-- Stand-in for favicon-mark (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<rect width="1024" height="1024" fill="#f2b860"/><circle cx="686.1" cy="512.0" r="174.08" fill="#c85a6e" stroke="#3a2730" stroke-width="12"/><circle cx="599.0" cy="662.8" r="174.08" fill="#c85a6e" stroke="#3a2730" stroke-width="12"/><circle cx="425.0" cy="662.8" r="174.08" fill="#c85a6e" stroke="#3a2730" stroke-width="12"/><circle cx="337.9" cy="512.0" r="174.08" fill="#c85a6e" stroke="#3a2730" stroke-width="12"/><circle cx="425.0" cy="361.2" r="174.08" fill="#c85a6e" stroke="#3a2730" stroke-width="12"/><circle cx="599.0" cy="361.2" r="174.08" fill="#c85a6e" stroke="#3a2730" stroke-width="12"/><circle cx="512" cy="512" r="163.84" fill="#f2b5be" stroke="#3a2730" stroke-width="12"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 919 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for foxes-meeting (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(409.6 153.6) scale(3.5840)"><svg x="0" y="50" width="200" height="100" viewBox="0 0 600 260"><g transform="translate(300 0) scale(-1 1)"><path d="M185 215 Q 250 205 240 150" fill="none" stroke="#3a2730" stroke-width="38" stroke-linecap="round"/><path d="M185 215 Q 250 205 240 150" fill="none" stroke="#bc4a22" stroke-width="30" stroke-linecap="round"/><path d="M185 215 Q 250 205 240 150" fill="none" stroke="#5a3a33" stroke-width="32" stroke-dasharray="6 26" opacity=".45"/><ellipse cx="160" cy="150" rx="50" ry="64" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/><ellipse cx="148" cy="160" rx="24" ry="38" fill="#f3e3c8"/><path d="M140 175 V 225" stroke="#5a3a33" stroke-width="14" stroke-linecap="round"/><path d="M168 175 V 225" stroke="#5a3a33" stroke-width="14" stroke-linecap="round"/><path d="M112.1 49.2 l12 -34.2 l12 34.2z" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/><path d="M146.3 49.2 l12 -34.2 l12 34.2z" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/><g transform="rotate(0 145 72)"><circle cx="145" cy="72" r="38" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/> <ellipse cx="122.5" cy="85.3" rx="20.900000000000002" ry="14.44" fill="#f3e3c8" stroke="#3a2730" stroke-width="4"/> <circle cx="133" cy="54.9" r="5" fill="#f3e3c8"/><circle cx="155" cy="54.9" r="5" fill="#f3e3c8"/> <path d="M126 68 q6 4 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M148 68 q6 4 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><circle cx="110.5" cy="83.4" r="5" fill="#3a2730"/> </g></g><g transform="translate(300 0)"><path d="M185 215 Q 250 205 240 150" fill="none" stroke="#3a2730" stroke-width="38" stroke-linecap="round"/><path d="M185 215 Q 250 205 240 150" fill="none" stroke="#bc4a22" stroke-width="30" stroke-linecap="round"/><path d="M185 215 Q 250 205 240 150" fill="none" stroke="#5a3a33" stroke-width="32" stroke-dasharray="6 26" opacity=".45"/><ellipse cx="160" cy="150" rx="50" ry="64" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/><ellipse cx="148" cy="160" rx="24" ry="38" fill="#f3e3c8"/><path d="M140 175 V 225" stroke="#5a3a33" stroke-width="14" stroke-linecap="round"/><path d="M168 175 V 225" stroke="#5a3a33" stroke-width="14" stroke-linecap="round"/><path d="M112.1 49.2 l12 -34.2 l12 34.2z" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/><path d="M146.3 49.2 l12 -34.2 l12 34.2z" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/><g transform="rotate(0 145 72)"><circle cx="145" cy="72" r="38" fill="#bc4a22" stroke="#3a2730" stroke-width="4"/> <ellipse cx="122.5" cy="85.3" rx="20.900000000000002" ry="14.44" fill="#f3e3c8" stroke="#3a2730" stroke-width="4"/> <circle cx="133" cy="54.9" r="5" fill="#f3e3c8"/><circle cx="155" cy="54.9" r="5" fill="#f3e3c8"/> <path d="M126 68 q6 4 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M148 68 q6 4 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><circle cx="110.5" cy="83.4" r="5" fill="#3a2730"/> </g></g></svg></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for gardener-apron (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="384" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(4 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="768" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(10 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="1152" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(28 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="0" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(18 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="384" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="768" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(14 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg><svg x="1152" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/></g></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="384" height="512">
|
||||
<!-- Stand-in for gardener-carry (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#cf9a72" stroke-width="10" stroke-linecap="round"/><path d="M44 198 h18 M64 198 h18" stroke="#3a2730" stroke-width="7" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M44 98 l -8 40" stroke="#cf9a72" stroke-width="9" stroke-linecap="round"/> <g transform="rotate(-80 78 98)"><path d="M78 98 l 4 40" stroke="#cf9a72" stroke-width="9" stroke-linecap="round"/></g> <circle cx="61" cy="66" r="20" fill="#cf9a72" stroke="#3a2730" stroke-width="4"/> <circle cx="66" cy="66" r="2.5" fill="#3a2730"/><circle cx="74" cy="66" r="2.5" fill="#3a2730"/><path d="M66 76 q 4 3 8 0" fill="none" stroke="#3a2730" stroke-width="2.5"/><path d="M44 92 Q 36 136 34 156 H 88 Q 86 136 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M50 100 H 72 V 146 Q 61 152 50 146 Z" fill="#efe4d2" stroke="#3a2730" stroke-width="3"/><path d="M41 62 Q 61 36 81 62 Q 61 52 41 62 Z" fill="#7a4b2e" stroke="#3a2730" stroke-width="2"/><path d="M44 58 v 30" stroke="#7a4b2e" stroke-width="7" fill="none" stroke-linecap="round"/><path d="M78 58 v 30" stroke="#7a4b2e" stroke-width="7" fill="none" stroke-linecap="round"/><ellipse cx="61" cy="50" rx="34" ry="7" fill="#e6c98a" stroke="#3a2730" stroke-width="3"/><path d="M47 50 Q 61 28 75 50 Z" fill="#e6c98a" stroke="#3a2730" stroke-width="3"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for gardener-clothes-boy-dusk (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(4 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(10 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(28 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="0" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(18 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#5b6fa6" stroke-width="14" stroke-linecap="round"/><g transform="rotate(14 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 160 h26 v34 M62 160 h26 v34" stroke="#5b6fa6" stroke-width="16" fill="none" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#5b6fa6" stroke="#3a2730" stroke-width="4"/></g></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for gardener-clothes-boy-honey (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(4 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(10 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(28 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="0" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(18 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#b98a5a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(14 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 160 h26 v34 M62 160 h26 v34" stroke="#b98a5a" stroke-width="16" fill="none" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#b98a5a" stroke="#3a2730" stroke-width="4"/></g></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for gardener-clothes-boy-plum (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(4 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(10 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(28 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="0" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(18 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7a4f6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(14 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 160 h26 v34 M62 160 h26 v34" stroke="#7a4f6e" stroke-width="16" fill="none" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7a4f6e" stroke="#3a2730" stroke-width="4"/></g></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for gardener-clothes-boy-rose (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(4 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(10 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(28 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="0" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(18 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#c85a6e" stroke-width="14" stroke-linecap="round"/><g transform="rotate(14 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 160 h26 v34 M62 160 h26 v34" stroke="#c85a6e" stroke-width="16" fill="none" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#c85a6e" stroke="#3a2730" stroke-width="4"/></g></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for gardener-clothes-boy-sage (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(4 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(10 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="0" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(28 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="0" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(18 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="384" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(6 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="768" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 196 V 150 M70 196 V 150" stroke="#7fa07a" stroke-width="14" stroke-linecap="round"/><g transform="rotate(14 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg><svg x="1152" y="512" width="384" height="512" viewBox="0 0 384 512"><g transform="translate(75.3 61.4) scale(1.9456)"><path d="M52 160 h26 v34 M62 160 h26 v34" stroke="#7fa07a" stroke-width="16" fill="none" stroke-linecap="round"/><g transform="rotate(0 61 150)"><path d="M44 92 Q 42 130 46 152 H 76 Q 80 130 78 92 Z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |