Skip to content

fix(preprod): Update default artifact type and label#109194

Merged
cameroncooke merged 3 commits intomasterfrom
fix/preprod-default-artifact-type
Feb 25, 2026
Merged

fix(preprod): Update default artifact type and label#109194
cameroncooke merged 3 commits intomasterfrom
fix/preprod-default-artifact-type

Conversation

@cameroncooke
Copy link
Contributor

Change the default artifact type for new status check rules from
all_artifacts to main_artifact and rename the all_artifacts
display label from "All Artifact Types" to "Any Artifact Type" for
clarity.

  • New rules now default to main_artifact instead of all_artifacts
  • Removed the unused ALL_ARTIFACTS_ARTIFACT_TYPE constant
  • Updated the label to better reflect matching semantics

Refs LINEAR-EME-871

cameroncooke and others added 2 commits February 24, 2026 16:37
Change the default artifact type for new status check rules from
all_artifacts to main_artifact, aligning with DEFAULT_ARTIFACT_TYPE.
Remove the now-unused ALL_ARTIFACTS_ARTIFACT_TYPE constant.

Co-Authored-By: Claude <noreply@anthropic.com>
Better reflects the matching semantics of the option in the UI.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 24, 2026
@cameroncooke cameroncooke marked this pull request as ready for review February 24, 2026 16:46

const ARTIFACT_TYPE_LABELS: Record<ArtifactType, string> = {
all_artifacts: 'All Artifact Types',
all_artifacts: 'Any Artifact Type',
Copy link
Member

Choose a reason for hiding this comment

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

Are these used for display in the frontend? If so, we'll want to wrap with t(..) so they get translated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Didn't know about that.

Copy link
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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

metric: updated.metric,
measurement: updated.measurement,
artifact_type: updated.artifactType ?? 'all_artifacts',
artifact_type: updated.artifactType ?? DEFAULT_ARTIFACT_TYPE,
Copy link
Contributor

Choose a reason for hiding this comment

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

Analytics fallback misreports existing rules' artifact type

Low Severity

The analytics fallback for artifact_type changed from the literal 'all_artifacts' to DEFAULT_ARTIFACT_TYPE (which is 'main_artifact'). This fallback activates when updated.artifactType is undefined, which would happen for existing rules that predate the artifact type field. For such legacy rules, the actual backend behavior is all_artifacts, but analytics would now incorrectly report 'main_artifact'. The "default for new rules" and the "fallback for legacy rules without a value" are semantically different — coupling them via DEFAULT_ARTIFACT_TYPE conflates the two.

Fix in Cursor Fix in Web

@cameroncooke cameroncooke merged commit 1d0f212 into master Feb 25, 2026
63 checks passed
@cameroncooke cameroncooke deleted the fix/preprod-default-artifact-type branch February 25, 2026 09:32
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