Skip to content

Redesign storage to avoid per-item quota errors #179

@pokutuna

Description

@pokutuna

The current storage layout (src/lib/config.ts) packs every user-defined function into a single functions key of chrome.storage.sync. storage.sync enforces QUOTA_BYTES_PER_ITEM = 8192, so users hit write failures once their function list grows past a handful of medium-sized functions.

Goals:

  • Split storage so a single function's size, not the total list size, governs the per-item limit (e.g. one item per function under a stable key like fn:<id>, plus an index).
  • Reconsider the storage area itself — storage.sync has tight quotas; storage.local has 10 MB and is a candidate if cross-device sync is not essential, or a hybrid (index in sync, bodies in local) is possible.
  • Provide a one-time migration from the old single-key layout.
  • Surface quota errors to the UI instead of silently failing.

This work pairs naturally with #178 (cross-browser support) — if storage access goes through a small interface, the same redesign can land on Firefox/Safari without further changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions