Skip to content

Conversation

@dashed
Copy link
Member

@dashed dashed commented Jan 25, 2026

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

  • 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

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
@linear
Copy link

linear bot commented Jan 25, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants