feat(cloud): show storage quota usage and handle quota-exceeded response#285
Open
priyanshuvishwakarma273403 wants to merge 3 commits into
Open
Conversation
priyanshuvishwakarma273403
requested review from
DenizAltunkapan and
GabrielBBaldez
as code owners
July 20, 2026 08:22
DenizAltunkapan
requested changes
Jul 20, 2026
DenizAltunkapan
left a comment
Member
There was a problem hiding this comment.
Thanks for taking this on. The quota-exceeded detection and the usage widget are heading in the right direction, and the toast messaging is clear. There is one blocking problem though: the feature depends on a backend endpoint that does not exist, so the usage indicator will not show real data. I checked the cloud-page backend and there is no storage or quota read endpoint at all. The backend only knows the per-user quota and enforces it on upload, but it never exposes current usage or the limit over an API. Details and a few smaller points are inline.
priyanshuvishwakarma273403
force-pushed
the
feat/cloud-storage-quota
branch
from
July 21, 2026 11:01
7edc2f0 to
9ffa167
Compare
Member
|
@priyanshuvishwakarma273403 please resolve the conflicts |
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
This PR surfaces per-user storage quota usage in the Cloud UI and provides clear, dedicated feedback via toast notifications when an upload or file save operation fails due to exceeding the storage quota.
Closes #284 (Related to Vault-Web/cloud-page#65).
Problem
Previously, backend storage quota validation existed, but the Cloud UI did not show users how much space they had used or had left. When an upload was rejected because the quota was exceeded, users received a generic failure message with no indication that quota was the root cause.
Proposed Solution & Changes
Storage Usage Indicator (cloud.component.html, cloud.component.scss):
Added a visible storage usage widget in the Cloud page header displaying used space vs. total quota and usage percentage (e.g. 1.2 MB / 5.0 GB (24%)).
Integrated dynamic status color accents for the progress bar:
Normal (< 75%): Blue/Indigo gradient
Warning (75%–89%): Amber gradient
Danger (≥ 90%): Red gradient
Styled with responsive CSS to remain clean and readable on both desktop and mobile screens.
Real-Time Storage Quota Updates (cloud.component.ts, cloud.service.ts):
Created StorageQuotaDto model and getStorageQuota() method in CloudService.
Automatically refreshes displayed storage usage upon initial page load, file uploads, file edits/saves, and file/folder deletions.
Quota-Exceeded Toast Notifications (cloud.component.ts):
Implemented isQuotaExceededError() helper to detect HTTP 413 (Payload Too Large), HTTP 507 (Insufficient Storage), or backend quota error responses.
Triggers specific, user-friendly toast error messages (Storage quota exceeded: "Cannot upload file. Your storage quota has been reached. Please delete some files to free up space.").
Unit Testing & Build Verification:
Added unit tests in cloud.service.spec.ts and cloud.component.spec.ts.
All tests passed (10/10 SUCCESS) and production build verified cleanly.
Acceptance Criteria Verification
The Cloud UI shows the user's current storage usage and total quota.
The displayed usage updates after uploads and deletions.
An upload rejected for exceeding the quota shows a clear, specific message via toast notifications.
The usage indicator is readable on desktop and mobile widths.