Skip to content

feat(preprod): Prefer build_number_raw for display#119267

Merged
trevor-e merged 5 commits into
masterfrom
telkins/preprod-build-number-raw-frontend
Jul 9, 2026
Merged

feat(preprod): Prefer build_number_raw for display#119267
trevor-e merged 5 commits into
masterfrom
telkins/preprod-build-number-raw-frontend

Conversation

@trevor-e

@trevor-e trevor-e commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Backend now stores the raw, unparsed build identifier (build_number_raw) alongside build_number, since build_number can be a large synthesized int for Apple builds with a dotted CFBundleVersion (feat(preprod): Store raw build number for display purposes #119262). Left unhandled, that synthesized int would render directly to users.
  • Adds build_number_raw to BuildDetailsAppInfo and prefers it (build_number_raw ?? build_number) at every site that renders a build number: install header, build details header/title, builds table, build comparison item, selected-builds panel, and the base-build VCS info link.
  • Depends on feat(preprod): Store raw build number for display purposes #119262 (backend) being deployed first — until then build_number_raw is always null and this is a no-op, falling back to build_number exactly as before.

Test plan

  • New/updated unit tests in preprodBuildsTable.spec.tsx and buildDetails.spec.tsx asserting the raw value is preferred over a synthesized int
  • pnpm typecheck and pnpm lint:js passing

The backend now stores the raw, unparsed build identifier alongside
build_number, since build_number can be a large synthesized int for
Apple builds with a dotted CFBundleVersion (#119262).
Add the field to BuildDetailsAppInfo and prefer it over build_number
at every site that renders a build number to a user: the install
header, build details header/title, builds table, build comparison
item and selected-builds panel, and the base-build VCS info link.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 8, 2026
The build_number_raw ?? build_number fallback was duplicated across
7 call sites. Extract it into getBuildNumber(), colocated with
BuildDetailsAppInfo alongside the file's existing helpers
(isSizeInfoCompleted, getMainArtifactSizeMetric, etc.), so a future
call site can't forget the fallback and the precedence logic has one
place to change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@trevor-e trevor-e marked this pull request as ready for review July 9, 2026 16:34
@trevor-e trevor-e requested a review from a team as a code owner July 9, 2026 16:34
Comment thread static/app/components/preprod/preprodBuildsTableCommon.tsx
trevor-e and others added 2 commits July 9, 2026 12:44
The backend schema for build_number_raw has no minLength, so an empty
string passes validation. getBuildNumber used ?? to fall back to
build_number, which only triggers on null/undefined, not empty
string — so an empty build_number_raw would win and render as
literal empty parentheses. Switch to || in getBuildNumber, which
correctly falls through on empty string.

Also fixes the buildNumber !== null render guard in
preprodBuildsTableCommon.tsx, which had the same gap (and additionally
mishandled undefined, though that case is currently masked since the
API always serializes these fields as null rather than omitting them).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@trevor-e trevor-e merged commit 9b85bca into master Jul 9, 2026
76 checks passed
@trevor-e trevor-e deleted the telkins/preprod-build-number-raw-frontend branch July 9, 2026 17:00
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