Add snapshot quota meter + "local is free" hint to the Storage section#80
Merged
Merged
Conversation
The Profile-tab Storage section showed bytes for documents + logs but had no sign of the snapshot count quota (free 5 / plus 10 / premium 20 / pro 50), so users couldn't see how close they were to the limit before a save was rejected. - Add a count-based meter for "Lap snapshots" beneath the byte meters, fetched from the snapshot_usage RPC (best-effort, doesn't hide the byte meters if it fails). - Add inline "Local storage is always free." subtext next to the Storage label so the byte+count limits read as cloud-only. https://claude.ai/code/session_01L9h3QDcyTEXmVe6tWMio6T
Coverage SummaryLines: 35.5% (2397/6752) · Statements: 34.53% · Functions: 28.92% · Branches: 36.07% Per-file coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Profile → Storage section showed byte meters for documents + logs but had no visible indicator for the snapshot count quota (free 5 / plus 10 / premium 20 / pro 50). Users couldn't tell how close they were to the limit until a save was rejected. Also, with byte + count limits sitting side by side, it wasn't obvious that none of them apply on-device.
Changes
used / limit), backed by the existingsnapshot_usage()RPC viafetchSnapshotUsage(). Fetch is best-effort — a failure doesn't hide the documents/logs meters above.CountMetercomponent alongside the existing byteMeter(snapshots are a count quota, not bytes).Files
src/plugins/cloud-sync/StoragePanel.tsx.Test plan
npm run lint,npm run typecheck,npm run test:run(737 passing),npm run buildall green5 / 5filled but not over; if quota is ever exceeded the bar + counter go destructivehttps://claude.ai/code/session_01L9h3QDcyTEXmVe6tWMio6T
Generated by Claude Code