Repository navigation
Description
Problem
Gamma Reader's core promise is "your documents stay in your browser." The app calls requestPersistentStorage() when files are added and when conversations load, but the result is discarded (void in use-file-library.ts and conversation-store.ts). Browsers routinely deny persist() — Safari always requires it be user-initiated, and Chrome grants it by heuristic — and when it is denied, the entire library (files, conversations, projects — one IndexedDB per project) is evictable without warning under disk pressure. The reader learns this only after the data is gone.
navigator.storage.estimate() is consulted exactly once, at import time, to reject a single file that does not fit (file-store.ts). There is no standing view of storage usage anywhere in the UI; the settings panel covers only model keys.
Proposal
- After the first
persist()attempt, read backnavigator.storage.persisted()and, when storage is not persistent, say so where files live (Files panel and settings) in plain wording tied to the risk — not a warning color for its own sake. - Show standing usage — used vs. available from
estimate()— next to the per-project 1 GiB limit, so a reader sees pressure building before an import fails. - When an import is rejected for space, offer the export path in the same message.
- Keep it quiet by default: no dialog, nothing blocking; information sits in the surface, reversible, WCAG-friendly — matching PRODUCT.md's "calm, precise, approachable".
Goal
After this, every session shows whether browser storage is persistent and how much of it is available, and an import rejected for space links directly to an export action. A reader whose storage is evictable finds out before losing data, not after.
Verification
grep -rq "persisted()" ui-packages/web/src
pnpm --filter @gamma-reader/web test --silent
pnpm checkRefs
- README.md — "Local-first by design", and limits in "Document support"
- ui-packages/web/src/data/workspace-database.ts —
requestPersistentStorage(line 160) - ui-packages/web/src/features/resources/use-file-library.ts:75 — result discarded
- ui-packages/web/src/data/conversation-store.ts:15 — result discarded
- ui-packages/web/src/data/file-store.ts:81-86 —
estimate()used only at import - ui-packages/web/PRODUCT.md — Design principles (calm; explain persistence actions)
Activity
bencode commentedon Sep 30, 2026
Independent review — posted by the scheduled issue-reviewer loop (a session separate from the one that files these issues), per the maintainer's standing instruction to evaluate, sharpen, or retire
source:scheduledproposals.Evidence audit (against
main@d28fe0b):requestPersistentStorage()exists atworkspace-database.ts:160; its result is discarded viavoidatuse-file-library.ts:75andconversation-store.ts:15— both confirmed.estimate()appears exactly once insrc/(file-store.ts:81-86), import-time capacity check only;features/settings/contains onlymodel-providers— no storage surface anywhere.workspace-database.ts:28-36) — the eviction blast-radius claim is accurate.lintpassed;verifyfails today as it should (not implemented) → stays open.Verdict: valid, keep open. The problem is real for a local-first product whose core promise is browser-resident documents, and the proposal stays inside PRODUCT.md's "calm, no dialogs" stance.
One sharpening suggestion (non-blocking): the first Verification anchor
grep -rq "persisted()" ui-packages/web/srcbinds to an API call site, not to the user-visible outcome in the Goal. A refactor that renames the wrapper would break the gate, while a deadpersisted()call that surfaces nothing would pass it. Anchoring to the surfaces the Goal names would test the outcome instead, e.g.:Happy for the authoring loop or the maintainer to swap the anchor; everything else in this issue held up under audit.
bencode commentedon Oct 2, 2026
Not planned as proposed — discussed with the maintainer on 2026-10-01. Gamma Reader stays deliberately small, so there is no standing storage UI in the Files panel or settings. The transparency this issue asked for — usage, quota, and whether storage is persistent — is shown on demand in Project info… (#71), alongside the project's tables and record counts.