Repository navigation
refactor(core): name the CF quota unlimited sentinel - #5644
Merged
norman-abramovitz merged 1 commit intoJul 18, 2026
Merged
norman-abramovitz merged 1 commit into
norman-abramovitz merged 1 commit into
Conversation
CF quota APIs encode 'unlimited' as -1. Replace the bare === -1 comparisons and the two private UNLIMITED re-declarations with one exported CF_QUOTA_UNLIMITED constant and an isUnlimited() guard in core (same shape as PAGE_SIZE_ALL), consumed by the pipes, utils, cards, unlimited-input, quota tabs, and app-wall memory columns. The profile-settings -1 is a different sentinel (size undetermined) and deliberately stays out. Part of cloudfoundry#5613 (step 3).
4 tasks
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.
CF quota APIs encode 'unlimited' as -1, and twelve call sites compared against the bare literal — two of them re-declaring their own private
UNLIMITED = -1constant.This adds one exported
CF_QUOTA_UNLIMITEDconstant and anisUnlimited()guard in core (following the existingPAGE_SIZE_ALLshape inpage-size.types.ts) and converts all twelve sites: the infinity/byte-formatter pipes,UtilsService, the status/metric cards,UnlimitedInputComponent, the org and space quota tabs, and the app-wall memory columns. The shared write path (toNumberin the quota actions) uses the constant too, so org and space quotas are both covered.The
-1in profile-settings is deliberately untouched — there it means "size could not be determined", a different sentinel that must not be folded into the unlimited constant.All sites are read-only comparisons, so the change is mechanical with no behavior change. Part of the sentinel-hardening work in #5613 (step 3).