Back to Body Journal
SOURCE / PINNED RELEASE

Made of little things.

Body Journal

Release
e8049f8da4e2…
Author-recorded commit
61c04bf0e8aa…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-6c4554844c7

Archive hash verified: 4369d778da046a8b…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

docs/persistence.md
# Reload persistence

Current update, 2026-10-26: session status is now in the header, using the current
white/off-black/reddish-orange palette. The same atomic session also saves up to
four optimized photos, free-text timing, the explicit chronic choice, fictional
example provenance and detailed reports. Keys remain separate. See
[photos-and-reports.md](photos-and-reports.md) for current limits and verification.
The dated brief and verification below describe the original persistence slice.

Build brief, 2026-10-25: keep the current adult self-report and chosen AI keys
across reloads in the same host storage scope.

- Use the existing optional NAP-STORAGE SDK get/set/remove helpers. No new
  domains, direct network, browser storage, shell code or relay escape hatch.
- Save selected provider keys with connection settings when Remember API key
  is checked. Keep them separate from case/report serialization. Restore the
  trusted bridge only for its exact saved destination; test verification and
  in-flight requests never survive reload. Saving is an explicit button action.
- Automatically restore and save one current session: profile, concerns, painted
  anchors, poses, current step/selection, synthetic attachment flag and completed
  AI report with its original case text for stale-report detection. Upgrade the
  existing saved draft in place, keeping within the host's storage quota.
- Serialize writes and coalesce edits made during a write. Finish loading before
  enabling the editor. Failed reads must not overwrite stored data; failed writes
  retain the current work and expose retry. Clearing the session waits for pending
  writes so deleted data cannot return. No unload-time persistence guarantee.
- Retain the ivory/evergreen visual direction and app-owned palette. Put a compact
  save status on the existing footer, with details/retry/clear in the session
  dialog. Support the existing small-frame notice, phone and desktop layouts.
- Describe storage accurately: host-managed browser storage, no credential-vault
  or at-rest encryption guarantee, and no cross-device/build/account guarantee.
  Missing storage leaves a usable session-only experience. No medical data or
  credentials are logged, committed, included in screenshots, or sent on reload.

Verify remembered/forgotten keys, opt-out, legacy records, case and report reload,
slow/failed storage, write ordering, clear during a write, actual hosted reload,
four frame sizes, touch, missing optional domains and the required project checks.

## Verification, 2026-10-25

- `pnpm verify`: 28 tests passed (6 guidance, 5 case, 12 AI/persistence, 5 skin),
  plus TypeScript and the single-file build.
- `pnpm test:ai:ui`: remembered and opted-out keys, saved key removal, bridge
  destination trust invalidation, report/stale-report restoration, autosave
  failure/retry and session clearing all passed. Reload sent no inference request.
- `pnpm test:prototype`: actual soyLI reload restored saved keys, latest case text,
  concerns and current step. Desktop frames 200×160, 320×560, 900×600, 1200×800,
  1600×1000; touch emulation 390×844, 360×640, 844×390; host light/dark and missing
  optional domains passed. No browser page errors. Screenshots inspected.
- `pnpm test:conformance`: 5 passed, 0 failed, 5 skipped (manifest/wire/lifecycle
  evidence not supplied). `soyli check`: passed `space-playback-6` using Chromium
  153.0.8010.12.
- Built HTML: 4,086,334 bytes, SHA-256
  `975df7e66b9be035f3b47ade648a58129710d7d77d5b85f76d301f849f2902dc`.

All inputs/keys used for testing were synthetic. No paid vendor requests, clinical
validation, public deployment, cross-device syncing or physical-phone testing.
The bridge code and encrypted transport were unchanged.