anomalyco / anomalyco/opencode
Web: quota recovery can delete the project registry
@Hona is already working on this.
Since Jul 28, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The web persistence quota-recovery path evicts the largest opencode.* localStorage entries first. It does not protect opencode.global.dat:server, which stores the server list, open projects, last project, and recently closed projects.
When another persisted value hits the browser quota, recovery can delete this registry. After the next reload—especially noticeable in mobile/PWA browsers—the server is reconstructed from startup configuration, but projects disappear from the sidebar and must be added again. Replacing the registry itself can also delete the old value before a failed retry.
Reproduction
- Store a relatively large value at
opencode.global.dat:server. - Fill localStorage close to quota with another evictable
opencode.*value. - Persist a new value that triggers
QuotaExceededError. - Observe quota recovery remove the server registry as the largest candidate.
- Reload and observe the project list is gone.
Expected behavior
Quota recovery must preserve the server/project registry. If a registry replacement cannot be stored, the previous registry should remain intact.
Notes
This is an application-owned data-loss path independent of browser/OS origin-wide storage purging.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.