Skip to content

feat: persist state in browser LocalStorage #9

Description

@pskillen

Problem

State is currently held in memory only (with the small exception of the Mapbox API key). Once users can write/modify/export CPS data, losing everything on refresh is unacceptable.

Intended outcome

Persist the working CPS state (internal data models) to browser LocalStorage so it survives reloads.

  • Save/restore the internal models on load.
  • Sensible handling of clearing/replacing state on a new import.
  • Keep within LocalStorage size constraints; document limits.

Affected tool(s)

  • Shared state/storage layer consumed by tools/.

Notes

  • Privacy: never commit operator codeplugs; storage is browser-local only. Mapbox token stays in LocalStorage only, never in the repo.
  • Depends on the internal data models (genericise-import) and pairs with the CRUD tickets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions