Skip to content

feat(preprod): Add snapshot types and path helper#113955

Merged
NicoHinderling merged 3 commits intomasterfrom
04-24-feat_preprod_add_snapshot_types_and_path_helper
Apr 24, 2026
Merged

feat(preprod): Add snapshot types and path helper#113955
NicoHinderling merged 3 commits intomasterfrom
04-24-feat_preprod_add_snapshot_types_and_path_helper

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

@NicoHinderling NicoHinderling commented Apr 24, 2026

Groundwork for the snapshot viewer redesign: contract updates for SnapshotDetailsApiResponse and a simpler getSnapshotPath helper.

Bottom of the 5-PR frontend stack for the snapshot viewer redesign. Backend counterpart is #113960.

snapshotId: string;
}): string {
const {organizationSlug, snapshotId} = params;
return `/organizations/${organizationSlug}/preprod/snapshots/${snapshotId}/`;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i'm pretty sure we don't need to include the org slug, hence why im removing it. cleaner URLs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nevermind, there's a caveat for self hosted i guess lol

have to leave this in

height: number;
key: string;
width: number;
content_hash?: string | null;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this field is already provided by the backend , we just didnt formally type it on the FE

@NicoHinderling NicoHinderling force-pushed the 04-24-feat_preprod_add_snapshot_types_and_path_helper branch from 8dbc16a to 5ac4232 Compare April 24, 2026 18:03
@NicoHinderling NicoHinderling marked this pull request as ready for review April 24, 2026 18:03
@NicoHinderling NicoHinderling requested a review from a team as a code owner April 24, 2026 18:03
@NicoHinderling NicoHinderling changed the base branch from master to graphite-base/113955 April 24, 2026 18:36
@NicoHinderling NicoHinderling force-pushed the 04-24-feat_preprod_add_snapshot_types_and_path_helper branch from 5ac4232 to 14a6040 Compare April 24, 2026 18:36
@NicoHinderling NicoHinderling changed the base branch from graphite-base/113955 to 04-24-ref_preprod_remove_hash_keyed_manifest_fallback April 24, 2026 18:36
Comment thread static/app/views/preprod/types/snapshotTypes.ts Outdated
Comment thread static/app/views/preprod/utils/buildLinkUtils.ts Outdated
Comment thread static/app/views/preprod/types/snapshotTypes.ts
Base automatically changed from 04-24-ref_preprod_remove_hash_keyed_manifest_fallback to master April 24, 2026 19:56
@NicoHinderling NicoHinderling force-pushed the 04-24-feat_preprod_add_snapshot_types_and_path_helper branch from 14a6040 to faa7586 Compare April 24, 2026 19:57
Comment thread static/app/views/preprod/utils/buildLinkUtils.ts
Comment thread static/app/views/preprod/types/snapshotTypes.ts Outdated
Comment thread static/app/views/preprod/utils/buildLinkUtils.ts
The prior path was a bare /preprod/snapshots/:id/. That route is only
registered on customer domains (via withOrgPath), so rows that link
through the helper 404 on localhost and single-tenant deploys. Prefix
with /organizations/:slug/ so the scraps Link's normalizeUrl can strip
it on customer domains — matching getBaseBuildPath and getCompareBuildPath.
The backend model stores app_id with a default of None; match that
on the frontend type so consumers handle the missing-field case.
@NicoHinderling NicoHinderling force-pushed the 04-24-feat_preprod_add_snapshot_types_and_path_helper branch from f4a7a8c to 550de20 Compare April 24, 2026 20:22
@NicoHinderling NicoHinderling enabled auto-merge (squash) April 24, 2026 20:31
@NicoHinderling NicoHinderling merged commit 513130f into master Apr 24, 2026
66 checks passed
@NicoHinderling NicoHinderling deleted the 04-24-feat_preprod_add_snapshot_types_and_path_helper branch April 24, 2026 20:32
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 550de20. Configure here.

Comment thread static/app/views/preprod/utils/buildLinkUtils.ts
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: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants