Skip to content

feat(preprod): Add auto_approved status to snapshot UI#115388

Merged
mtopo27 merged 6 commits into
masterfrom
mtopo27/auto-approval-status-frontend
May 13, 2026
Merged

feat(preprod): Add auto_approved status to snapshot UI#115388
mtopo27 merged 6 commits into
masterfrom
mtopo27/auto-approval-status-frontend

Conversation

@mtopo27

@mtopo27 mtopo27 commented May 12, 2026

Copy link
Copy Markdown
Contributor

Adds frontend support for the auto_approved snapshot approval status introduced in #115291.

Search filter: Replaces the is_approved boolean search key with approval_status, a string filter with predefined dropdown values (approved, auto_approved, requires_approval). This uses the values field definition pattern (same as artifact_type) so the search bar shows a fixed dropdown instead of hitting the trace-items values endpoint, which doesn't support derived Django-model attributes.

Column & badge: Renames the "Approval" column header to "Status" and adds an "Auto Approved" tag badge for auto-approved snapshots.

Stacked on #115291 — land that first.

CleanShot 2026-05-12 at 15 01 03@2x CleanShot 2026-05-12 at 15 01 28@2x

REFS EME-1102

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.51% 93.50% 🔴 -0.01%
Typed 135,417 135,426 🟢 +9
Untyped 9,403 9,407 🔴 +4
🔍 4 new type safety issues introduced

any-typed symbols (4 new)

File Line Detail
static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx 15 to (param(binding))
static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx 15 children (param(binding))
static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx 15 props (param(binding))
static/app/components/preprod/preprodBuildsSnapshotTable.snapshots.tsx 15 <pattern> (param)

This is informational only and does not block the PR.

@linear-code

linear-code Bot commented May 12, 2026

Copy link
Copy Markdown

EME-1102

@mtopo27 mtopo27 marked this pull request as ready for review May 12, 2026 19:02
@mtopo27 mtopo27 requested review from a team as code owners May 12, 2026 19:02
Comment thread static/app/views/explore/constants.tsx
@@ -203,7 +206,7 @@ export function PreprodBuildsSnapshotTable({
)}
<SimpleTable.HeaderCell>{t('Changes')}</SimpleTable.HeaderCell>
<SimpleTable.HeaderCell>{t('Branch')}</SimpleTable.HeaderCell>
<SimpleTable.HeaderCell>{t('Approval')}</SimpleTable.HeaderCell>
<SimpleTable.HeaderCell>{t('Status')}</SimpleTable.HeaderCell>

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.

i could see an argument for making this "Approval Status" but not a big deal

Base automatically changed from mtopo27/auto-approval-status to master May 12, 2026 21:51
@mtopo27 mtopo27 requested a review from a team as a code owner May 12, 2026 21:51
mtopo27 and others added 3 commits May 12, 2026 18:05
Replace is_approved boolean filter with approval_status string filter
supporting approved, auto_approved, and requires_approval values.
Rename the Approval column header to Status and add an Auto Approved
badge variant.

@cursor cursor Bot left a comment

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.

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

There are 2 total unresolved issues (including 1 from previous review).

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 0fcfcee. Configure here.

Comment thread static/app/views/explore/constants.tsx Outdated
'tags[artifact_type,number]',
...PREPROD_IMAGE_FIELDS,
'is_approved',
'approval_status',

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.

Bug: Adding approval_status to both SENTRY_PREPROD_STRING_TAGS and HIDDEN_PREPROD_ATTRIBUTES causes it to be filtered out from the search bar, making it invisible.
Severity: MEDIUM

Suggested Fix

Remove approval_status from the HIDDEN_PREPROD_ATTRIBUTES array. This will prevent it from being filtered out from the search bar keys while still allowing it to be available as a search tag via SENTRY_PREPROD_STRING_TAGS.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/views/explore/constants.tsx#L148

Potential issue: The new tag `approval_status` is added to both
`SENTRY_PREPROD_STRING_TAGS` and `HIDDEN_PREPROD_ATTRIBUTES`. The `PreprodSearchBar`
component uses `HIDDEN_PREPROD_ATTRIBUTES` to determine which keys to hide from the
search UI. The logic first merges the default tags from `SENTRY_PREPROD_STRING_TAGS`
(including `approval_status`) into the available attributes, and then immediately
removes any keys found in `HIDDEN_PREPROD_ATTRIBUTES`. Because `approval_status` is
present in both constants, it is added and then removed, preventing it from appearing as
a searchable filter in the UI and defeating the purpose of the change.

Did we get this right? 👍 / 👎 to inform future reviews.

@mtopo27 mtopo27 enabled auto-merge (squash) May 13, 2026 14:57
@mtopo27 mtopo27 merged commit f80efd9 into master May 13, 2026
74 of 75 checks passed
@mtopo27 mtopo27 deleted the mtopo27/auto-approval-status-frontend branch May 13, 2026 15:03
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