[docs] KeepHerSafeApps: Round trip on the tablet, the page between Android's bars, review, gaps closed, lessons
This commit is contained in:
@@ -45,6 +45,7 @@ flowchart LR
|
||||
| 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
|
||||
@@ -60,18 +61,21 @@ flowchart LR
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
Closes G-T4 for Android and Windows. G-T5 (bringing her back) is closed only by a round trip seen on
|
||||
the device. iOS stays G-T1: WKWebView will need its own save (a share sheet or a document picker).
|
||||
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*, `persisted()` never asked | unit | `packages/ui/test/keep-safe.test.ts` |
|
||||
| In a browser: the browser sentences as before | unit | same, and the existing e2e |
|
||||
| `saveFile` answering `true` → *She is in that file now.*; `false` or nothing → silence | unit | same |
|
||||
| The bridge's name and size rules | unit | `apps/rosea-tauri/test/android-bridge.test.ts` (reads the Kotlin source's constants) and the Kotlin itself |
|
||||
| `android.ts check` refuses a project without Rosea's `MainActivity` | unit | `apps/rosea-tauri/test/android-privacy.test.ts` |
|
||||
| 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 |
|
||||
| Android: save opens the system screen, a file is written, the garden says so; bring her back from that file | device | review (tablet) |
|
||||
| Windows: save downloads the file | device | `e2e/apps/check-garden.ts desktop` |
|
||||
| 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) |
|
||||
|
||||
Reference in New Issue
Block a user