Skip to content

feat(preprod): Add app_info to snapshot response with prefetch#113960

Merged
NicoHinderling merged 2 commits intomasterfrom
04-24-feat_preprod_add_app_info_to_snapshot_response_with_prefetch
Apr 24, 2026
Merged

feat(preprod): Add app_info to snapshot response with prefetch#113960
NicoHinderling merged 2 commits intomasterfrom
04-24-feat_preprod_add_app_info_to_snapshot_response_with_prefetch

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

@NicoHinderling NicoHinderling commented Apr 24, 2026

Expose the artifact's app_id on the snapshot details response.

The frontend snapshot viewer needs this to display app identifier context in the header alongside commit and PR info. app_id is already on PreprodArtifact, so this is just a passthrough — no extra queries, no new serializer.

Ships independently alongside a 6-PR frontend stack for the snapshot viewer redesign — frontend and backend don't deploy atomically.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 24, 2026
@NicoHinderling NicoHinderling marked this pull request as ready for review April 24, 2026 17:37
@NicoHinderling NicoHinderling requested a review from a team as a code owner April 24, 2026 17:37
id=snapshot_id, project__organization_id=organization.id
artifact = (
PreprodArtifact.objects.select_related("commit_comparison", "build_configuration")
.prefetch_related("mobile_app_info")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's "mobile_app_info" I thought we abstracted away everything to do with "mobile" bc snapshots can be anything?

Replace the nested app_info object on the snapshot response with a
top-level app_id string. app_id is a column on PreprodArtifact, so we
can drop the mobile_app_info prefetch and the build_configuration join
that were added to populate the full BuildDetailsAppInfo payload.

Co-Authored-By: Claude <noreply@anthropic.com>
@NicoHinderling NicoHinderling merged commit 29a88ca into master Apr 24, 2026
58 checks passed
@NicoHinderling NicoHinderling deleted the 04-24-feat_preprod_add_app_info_to_snapshot_response_with_prefetch branch April 24, 2026 18:04
NicoHinderling added a commit that referenced this pull request Apr 24, 2026
Groundwork for the snapshot viewer redesign: contract updates for
`SnapshotDetailsApiResponse` and a simpler `getSnapshotPath` helper.

- Add `app_id?: string | null` to match the backend addition in #113960.
- Add `content_hash: string` to `SnapshotImage` so the frontend can
dedupe or reference image bytes.
- Drop `SidebarItemBase.badge` — unused after the sidebar rewrite that
lands later in the stack.
- Simplify `getSnapshotPath` to take only `{snapshotId}` (no org slug).
The router handles org scoping for this route.

Bottom of the 5-PR frontend stack for the snapshot viewer redesign.
Backend counterpart is #113960.
NicoHinderling added a commit that referenced this pull request Apr 29, 2026
Redesigned snapshot header: single-row content plus the right-side
actions dropdown.

**`snapshotHeaderContent.tsx`**
- Single wrapping flex row: title → project `IdBadge` → commit short-sha
→ PR number → branch → `IconCode` + monospace `app_id` (consumes the new
field added in #113960 / #113955).
- Drops the old multi-row header and the "Comparing: Head vs Base" pill
row. The Head/Base toggle now lives in the content toolbar (handled by
the redesign in #113958).

**`snapshotHeaderActions.tsx`**
- Right-side actions group: approval `Tag` + `AvatarList` of approvers +
`...` dropdown.
- Dropdown items: "Go to Base Build" (via `getSnapshotPath` from
#113955, disabled when no base exists), "Rerun Status Checks", "Delete
Snapshots", and an admin-only "Re-run comparison" entry for Sentry
employees.
- `ConfirmDelete` now requires typing `delete` rather than the opaque
head artifact ID — safer UX for a destructive action.

Top of the 5-PR frontend stack for the snapshot viewer redesign.
cleptric pushed a commit that referenced this pull request May 5, 2026
Redesigned snapshot header: single-row content plus the right-side
actions dropdown.

**`snapshotHeaderContent.tsx`**
- Single wrapping flex row: title → project `IdBadge` → commit short-sha
→ PR number → branch → `IconCode` + monospace `app_id` (consumes the new
field added in #113960 / #113955).
- Drops the old multi-row header and the "Comparing: Head vs Base" pill
row. The Head/Base toggle now lives in the content toolbar (handled by
the redesign in #113958).

**`snapshotHeaderActions.tsx`**
- Right-side actions group: approval `Tag` + `AvatarList` of approvers +
`...` dropdown.
- Dropdown items: "Go to Base Build" (via `getSnapshotPath` from
#113955, disabled when no base exists), "Rerun Status Checks", "Delete
Snapshots", and an admin-only "Re-run comparison" entry for Sentry
employees.
- `ConfirmDelete` now requires typing `delete` rather than the opaque
head artifact ID — safer UX for a destructive action.

Top of the 5-PR frontend stack for the snapshot viewer redesign.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants