87 lines
7.4 KiB
Markdown
87 lines
7.4 KiB
Markdown
# R4 J2: device acceptance of the Rust export
|
||
|
||
Plan `.claude/tasks/plans/2026-10-17-rust-r4-pdf-core.md` §B.7 (R4.6 "your
|
||
phone check of L") and the owner's R4.6 brief. The export of the application
|
||
runs on the core's session since R4.6 (`docs/development/RUST.md` §10.8):
|
||
the browser draws each view the core asks for, the core writes the file as
|
||
the rasters arrive; the TypeScript engine left the repository at R4.8
|
||
(§10.10), so the build under test holds no other writer. Headless runs in
|
||
Chromium, Firefox and WebKit are recorded in RUST.md §10.8 and §10.11 (the
|
||
R4.9 memory bench); nothing below is validated until it has run on the
|
||
owner's devices (plan OD-6: a device or browser not run is reported as not
|
||
run, never as validated). The J1 recette (import, `R4_J1.md`) stays due on
|
||
Safari iOS before any R4 merge; J2 can run in the same session.
|
||
|
||
## 1. Serve the build on the LAN (owner's machine)
|
||
|
||
As for J1, on the DEV origin (`scripts/dev-env.sh`, `FAUNOSTEO_DEV_HOST`):
|
||
|
||
1. `pnpm dev:offline` (the local tool), `http://<FAUNOSTEO_DEV_HOST>:5173`.
|
||
2. The production build behind the DEPLOY CSP: `pnpm build:preview` then
|
||
`. scripts/dev-env.sh && node scripts/browser/serve.mjs --host "$FAUNOSTEO_DEV_HOST" --port 4173` (the server refuses an empty or unspecified address),
|
||
reachable from the devices only once the owner opened port 4173 to the
|
||
private subnet for the session (`ENVIRONMENTS.md` §3, the 4173 row:
|
||
one `ufw allow` rule, deleted afterwards),
|
||
`http://<FAUNOSTEO_DEV_HOST>:4173`. Surface 2 is the one that matters for
|
||
the memory items and the CSP.
|
||
|
||
## 2. The kit
|
||
|
||
`node scripts/r4-j2-kit.mjs [dir]` writes a folder (about 3 MB, synthetic
|
||
data only) with `ATTENDU.md`:
|
||
|
||
- `1-reference/`: the R3 exports of the TypeScript engine (demo FR and EN
|
||
with logos, demo FR without, v2full, v2unresolved, the store path, the
|
||
real-raster export). Import one, export it again: the two files show the
|
||
same bilan.
|
||
- `2-large/`: `L.fr.logos.pdf` (60 observations, 120 views, 377 KB) and
|
||
`CAP.fr.logos.pdf` (500 observations, 1,000 views, 1.5 MB), archives the
|
||
Rust session wrote with 2 × 1 stub rasters: the device draws the real
|
||
views when it exports them.
|
||
|
||
Copy the folder to the devices (AirDrop, a share, a USB key); on iPhone pick
|
||
from Files. To compare two PDFs on a phone, open them side by side in the
|
||
viewer; on a computer, `pdftoppm -r 72` on both and flip between the pages,
|
||
or any viewer with two tabs.
|
||
|
||
## 3. Checks per device (computer, iPhone, low-end Android: the OD-6 list)
|
||
|
||
Devices and browsers (plan OD-6, the exact list): the computer with Chrome
|
||
and with Firefox; the iPhone with Safari iOS; the low-end Android phone
|
||
with its browser. Safari iOS stays NON TESTÉ until the owner reports
|
||
results from the real iPhone: an iPhone simulator never stands for it and
|
||
is never a memory proof (owner, 2026-10-21). Record the device, the
|
||
browser and its version, the surface (1 or 2), and for J2.6 the time from
|
||
the tap to the download sheet and whether the tab survived.
|
||
|
||
| # | Check | Expected |
|
||
|---|---|---|
|
||
| J2.1 | FR export: import `1-reference/r3-demo.fr.logos.pdf`, tap « Exporter en PDF » | a download named `bilan-<animal>-<date>.pdf`; opened, 7 pages identical to the imported file: the same texts, the four logos (header, footer, ZenQuality, the partner drawing), the anatomy views with the observation's zones highlighted in the accent colour, the severity pill, the conclusion page, the pagination « n / 7 » |
|
||
| J2.2 | EN export: switch the language to English in the editor, export again | the same pages in English (« GENERAL VIEW », « FINDINGS — », « Powered by »); the animal and practitioner names unchanged |
|
||
| J2.3 | Archive without logos: import `r3-demo.fr.nologos.pdf` (its archived branding has the four logo slots empty), export | the exported file carries the application's current branding, the four logos as in J2.1 (header, footer, ZenQuality, the partner drawing), not the archive's empty slots; no alert. Owner decision 2026-10-21 (RUST.md §10.12): a new export from the editor is a new document with the current branding; the archive keeps its own data for a faithful reproduction by the tool (`export_from_envelope`) |
|
||
| J2.4 | Links: in the exported file of J2.1, tap the header logo and the two footer credits | they open `faunosteo.com`, `zenquality.fr` and the partner's Instagram page |
|
||
| J2.5 | Real rasters: import `r3-real.v2full-obs1.fr.logos.pdf`, export, zoom at 400 % on the main view of the first observation | the drawing is crisp (1200 px wide raster), the highlighted zones and the halo as in the imported file |
|
||
| J2.6 | Large export on the phone (E4): import `2-large/L.fr.logos.pdf`, export | the download arrives (note the time; the development machine takes 7 s in Chromium); the tab survives, no reload, no memory warning; the file opens with 61 pages |
|
||
| J2.7 | Repetition: export the demo 6 times in a row on the same page | 6 downloads, no slowdown worth noting, the tab alive |
|
||
| J2.8 | Round trip: import the file exported at J2.1 (from the Files app) | the editor opens with the same bilan, « Restauration complète… »; export it again: identical pages |
|
||
| J2.9 | Interrupted export: on `2-large/L.fr.logos.pdf`, tap « Exporter en PDF » then leave the editor at once (« Accueil ») | no download, no alert, Home usable; a later export works |
|
||
| J2.10 | Engine unavailable: surface 2 with `--csp without`, open the editor | the degraded notice (the export button is not offered); back with the keyword, the export works |
|
||
| J2.11 | CAP on the computer only: import `2-large/CAP.fr.logos.pdf`, export | the download arrives (the development machine: Chromium about 1 min); 501 pages; the tab survives |
|
||
| J2.12 | Views and markers: on the J2.1 export, for the first observation with zones on both drawings, compare each page with the imported file | one page per view of the observation, the general view first, then the head view; every zone of the observation highlighted in the accent colour with its halo, the other markers in their category colour, none missing or added; the vertebra selection drawn on the right vertebrae |
|
||
| J2.13 | Attachment and properties: open the J2.1 export in a viewer with an attachments panel (Acrobat, Preview, the Files app on iPhone, a desktop viewer on Android) | one attachment `osteo-report.json` listed; Properties show Producer and Creator `Faunosteo`, Keywords `faunosteo-archive/1`, the title « Bilan ostéopathique… » |
|
||
| J2.14 | Archive check on the computer: `pnpm report:compare --diff 1-reference/r3-demo.fr.logos.pdf <the J2.1 export>` (first run compiles the tool, about 25 s), then `pnpm report:compare <the J2.8 re-export>` | the diff prints `identical v3 content`, exit 0; the single file prints its comparison with no `!!` line and no unresolved item |
|
||
|
||
J2.1 to J2.5 and J2.12 are the visual parity items: any difference between
|
||
the imported and the exported file (a shifted block, a missing glyph, a
|
||
wrong colour, a missing link, a marker moved) is a finding, with a
|
||
screenshot of both. J2.6 and J2.7 are the memory items of OD-2 on a device
|
||
(the headless numbers are in RUST.md §10.8 and the R4.9 bench in §10.11).
|
||
J2.13 and J2.14 are the archive items: the attachment travels with the
|
||
file and the tool reads it back as the same bilan.
|
||
|
||
## 4. Results
|
||
|
||
Fill `docs/development/R4_J2_RESULTS.md` (PASS / FAIL / NON TESTÉ per
|
||
device and check; device, browser, version, surface, times as read). The
|
||
headless runs never count as a device result.
|