Files
faunosteo/docs/development/R4_J2.md
T

5.0 KiB
Raw Blame History

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. Headless runs in Chromium, Firefox and WebKit are recorded in RUST.md §10.8; nothing below is validated until it has run on the owner's devices. 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 node scripts/browser/serve.mjs --host "$FAUNOSTEO_DEV_HOST" --port 4173, 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)

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 Without logos: import r3-demo.fr.nologos.pdf, export the header shows the site name as text, the footer the credit texts (« zenquality.fr », « @paws.iin.harmony ») in place of the logos; no alert
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.1 to J2.5 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) 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).

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.