# Browser setup recovery

<!-- @requirements REQ-PRODUCT-SETUP-SESSION -->

Automated scenarios: `packages/notabenda/test/pack-session.test.mjs`; website disclosure: `site/test/website-notice.test.mjs`.

- Select packs, enter unfinished public facts and exact private notes, change steps, then remount. Preserve the active view without planning incomplete input or turning a fresh draft into imported config.
- Regenerate a previously prepared plan locally, retaining its saved step and restrictive scope answers. Reopen hidden setup from the pack library.
- Preserve unfinished purpose, consent, request-page, storage and catalog fields separately from confirmed configuration. Clear review acknowledgments. Retain original proposal baselines for stale-change checks.
- Save a storage inventory change, then reopen an unfinished edit. Reload and inspect the original name, material scopes and cumulative private change-review download.
- Restore only matching installed pack/questionnaire versions. Reject malformed records, unknown fields, invalid editor structures and invalid clocks without trapping the console.
- Use an injected clock to check 24-hour semantics without waiting: edits move the deadline; reads do not. Expiry, clear and unavailable/quota-limited storage affect only the configured key. Clearing must survive queued notifications for unchanged data.
- Oversized aggregate/multibyte answers and failed writes must report unsaved changes and preserve the last recoverable copy. Independent storage instances represent independent tabs; browser duplication/session restoration remains browser behavior.
- Default components do not touch `sessionStorage`; the website explicitly opts in. Imported private metadata is excluded, no network save is installed, and cached data never grants runtime permissions.

Native browser check: on `/start/`, select packs, begin setup, enter site details and a private note, then reload through the browser. Confirm the restored step and values, saved-draft message and clear action. Check the narrow viewport for readable copy, a usable clear control and horizontal overflow. A closed-tab session cannot execute expiry cleanup; the next access enforces the deadline.
