Files
zeekayandHanzo Dev 10282c06f6 Rename the persisted keys, and carry returning visitors across
Four localStorage keys still spelled upstream's brand — papermark.email,
papermark.name, last_papermark_login, papermark-all-links-collapsed. The first
two hold a visitor's email and name and are what makes an access form
prefill on a return visit, so renaming them naively signs every returning
visitor out of their own convenience.

lib/webstorage.ts already owned web storage, so the rename lives there:

  - StorageKey names each key once. Eight call sites used to spell the string
    themselves, one of them via a local const, which is why the set had
    drifted into three different naming shapes.
  - LEGACY_KEYS maps each new key to the name it used to have. getItem falls
    back to the old key, copies the value forward and drops the old entry.
    Migrating on read means no boot hook to register and no ordering to get
    wrong; a key migrates the first time something asks for it, and only
    then. setItem and removeItem clear the legacy entry too, so a value
    cannot come back from the dead.

Six of those call sites were reaching for window.localStorage directly and
so skipped the wrapper's try/catch. They now go through it, which is what it
is for — a viewer opening a link in a third-party context with storage
blocked was throwing rather than degrading.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-04 18:58:44 -07:00
..
fix
2025-10-22 12:29:38 +02:00
2024-11-28 17:21:00 +09:00