Storage usage & clear (media cache, search index, crypto store) — keep it to one tile #120

Closed
opened 2026-09-17 15:21:21 -04:00 by jared · 1 comment
Owner

One tile, not a dashboard. Settings → General (or Account → Data): shows total local usage from navigator.storage.estimate() with a breakdown only where it is cheap to know (Cache Storage = media, the encrypted search index IndexedDB, the crypto store), plus two actions.

Scope

  • Clear media cache — evicts Cache Storage / browser cache entries for media; nothing else. Safe at any time.
  • Clear search index — already exists in the search settings; link to it instead of duplicating.
  • Never a "clear everything" button here: the crypto store must not be clearable casually (that is the storage-eviction E2EE failure mode from LOTUS_TODO KE-1). Show its size, with a one-line note on why it is not clearable, and whether navigator.storage.persisted() is granted (green/amber) — that last bit is genuinely useful for diagnosing the KE-1 cluster.
  • If storage.estimate() is unavailable (older WebView/Safari), hide the tile entirely rather than showing zeros.
One tile, not a dashboard. Settings → General (or Account → Data): shows total local usage from `navigator.storage.estimate()` with a breakdown only where it is cheap to know (Cache Storage = media, the encrypted search index IndexedDB, the crypto store), plus two actions. ### Scope - **Clear media cache** — evicts Cache Storage / browser cache entries for media; nothing else. Safe at any time. - **Clear search index** — already exists in the search settings; link to it instead of duplicating. - Never a "clear everything" button here: the crypto store must not be clearable casually (that is the storage-eviction E2EE failure mode from LOTUS_TODO KE-1). Show its size, with a one-line note on why it is not clearable, and whether `navigator.storage.persisted()` is granted (green/amber) — that last bit is genuinely useful for diagnosing the KE-1 cluster. - If `storage.estimate()` is unavailable (older WebView/Safari), hide the tile entirely rather than showing zeros.
jared added this to the Features 2026-Q4 milestone 2026-09-17 15:21:21 -04:00
jared added the enhancementpriority: lowarea: settings labels 2026-09-17 15:21:21 -04:00
jared self-assigned this 2026-09-17 15:21:21 -04:00
Author
Owner

Done in c6c2e88d — one tile, Settings → General → Storage.

  • Total from navigator.storage.estimate() vs quota; Chromium's usageDetails breakdown when present (IndexedDB = sync cache + encryption keys + search index; Cache Storage = offline app files). Hidden entirely when estimate() is unavailable.
  • navigator.storage.persisted() shown as Protected (green) / May be evicted (amber) with a "Keep my data" button → storage.persist(). This is the KE-1 diagnostic.
  • No clear buttons, on purpose: media is in the browser's own HTTP cache (the SW fetches with cache: 'default'; not in the estimate and not clearable from a page — the tile says so), the crypto store is never clearable here (the text explains why), and the search-index clear already lives in Message Search (linked in the text). The About page's "Clear Cache & Reload" now warns it deletes this device's encryption keys as well.

tile

Done in c6c2e88d — one tile, Settings → General → Storage. - Total from `navigator.storage.estimate()` vs quota; Chromium's `usageDetails` breakdown when present (IndexedDB = sync cache + encryption keys + search index; Cache Storage = offline app files). Hidden entirely when `estimate()` is unavailable. - `navigator.storage.persisted()` shown as **Protected** (green) / **May be evicted** (amber) with a "Keep my data" button → `storage.persist()`. This is the KE-1 diagnostic. - No clear buttons, on purpose: media is in the browser's own HTTP cache (the SW fetches with `cache: 'default'`; not in the estimate and not clearable from a page — the tile says so), the crypto store is never clearable here (the text explains why), and the search-index clear already lives in Message Search (linked in the text). The About page's "Clear Cache & Reload" now warns it deletes this device's encryption keys as well. ![tile](https://code.lotusguild.org/attachments/c3f9544a-e3cc-4de0-817b-8a0f33c3e247)
jared closed this issue 2026-09-20 14:54:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#120