feat(admin): add unit formatting for emerge categories in admin provisioning#106941
Merged
feat(admin): add unit formatting for emerge categories in admin provisioning#106941
Conversation
5366a6b to
e9b67bf
Compare
e9b67bf to
82ed4b7
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Add utility functions for emerge data categories (SIZE_ANALYSIS, INSTALLABLE_BUILD) to support unit formatting in admin UI. - isEmergeCategory(): identifies emerge billing categories - getCategoryUnitSuffix(): returns appropriate unit suffix for all category types (GB, hours, builds, installs) Includes comprehensive tests for both functions. BIL-1928
Fix naming inconsistencies in BILLED_DATA_CATEGORY_INFO: - SIZE_ANALYSIS: "upload" → "build" - INSTALLABLE_BUILD: "distribution" → "install" BIL-1928
Replace inline isByteCategory check with getCategoryUnitSuffix helper to support unit suffixes for all category types including emerge categories (builds, installs). BIL-1928
Add unit formatting support for emerge categories in the gift events admin modal: - Add isEmergeCategory check in getLabel() for proper labeling - Add SIZE_ANALYSIS handling with "build/builds" suffix - Add INSTALLABLE_BUILD handling with "install/installs" suffix BIL-1928
Revert to only adding "(in GB)" suffix for byte categories in the provision subscription modal. The previous change to use getCategoryUnitSuffix() added redundant suffixes for categories whose display names already include the unit (e.g., "Continuous Profile Hours (in hours)", "Size Analysis Builds (in builds)").
Remove the getCategoryUnitSuffix function and its tests. This helper was added but its usage was reverted in c91934e because it caused redundant suffixes (e.g., "Size Analysis Builds (in builds)") when category display names already include the unit. The isEmergeCategory helper is kept as it's actively used in addGiftEventsAction.tsx.
82ed4b7 to
4ed7831
Compare
jaydgoss
pushed a commit
that referenced
this pull request
Feb 12, 2026
…sioning (#106941) Closes https://linear.app/getsentry/issue/BIL-1928/add-formatting-for-admin-provisioning ## Summary Adds unit formatting for emerge data categories (SIZE_ANALYSIS, INSTALLABLE_BUILD) in the admin provisioning UI: - Add `isEmergeCategory()` and `getCategoryUnitSuffix()` helper functions in `dataCategory.tsx` - Fix `shortenedUnitName` values: "upload" → "build", "distribution" → "install" - Update provision subscription modal to use new helper for all category unit suffixes - Add emerge category handling in gift events modal with proper unit labels ## Test plan - [x] Unit tests added for `isEmergeCategory()` and `getCategoryUnitSuffix()` - [ ] Verify admin provisioning modal shows "(in builds)" suffix for SIZE_ANALYSIS - [ ] Verify admin provisioning modal shows "(in installs)" suffix for INSTALLABLE_BUILD - [ ] Verify gift events modal shows correct unit in label/help for emerge categories
This was referenced Feb 17, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes https://linear.app/getsentry/issue/BIL-1928/add-formatting-for-admin-provisioning
Summary
Adds unit formatting for emerge data categories (SIZE_ANALYSIS, INSTALLABLE_BUILD) in the admin provisioning UI:
isEmergeCategory()andgetCategoryUnitSuffix()helper functions indataCategory.tsxshortenedUnitNamevalues: "upload" → "build", "distribution" → "install"Test plan
isEmergeCategory()andgetCategoryUnitSuffix()