Skip to content

feat(preprod): Add artifact-type filtering controls to status rule UI#108313

Merged
cameroncooke merged 6 commits intomasterfrom
codex/eme-808-frontend-artifact-type-selector
Feb 19, 2026
Merged

feat(preprod): Add artifact-type filtering controls to status rule UI#108313
cameroncooke merged 6 commits intomasterfrom
codex/eme-808-frontend-artifact-type-selector

Conversation

@cameroncooke
Copy link
Copy Markdown
Contributor

@cameroncooke cameroncooke commented Feb 16, 2026

Add frontend support for artifact-type filtering in mobile build size status check rules.

This PR adds the UI and client-side rule handling needed to configure artifact targeting for status checks and aligns frontend behavior with backend rule evaluation in #108311.

Key changes:

  • Add artifact type options to the rule editor (All, Main App, Watch App, Dynamic Feature).
  • Move the artifact type dropdown below the Artifact Type label for consistent layout.
  • Order the dropdown with All at the top.
  • Default new rules to All artifacts.
  • Preserve existing saved rules by reading missing artifact type as Main App.
  • Update rule typing and persistence logic so artifactType is round-tripped correctly.

This PR remains stacked on #108311 so backend and frontend can be deployed independently.

Screenshot 2026-02-16 at 16 18 39

Refs EME-808

@linear
Copy link
Copy Markdown

linear bot commented Feb 16, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 16, 2026
@cameroncooke cameroncooke force-pushed the codex/eme-808-frontend-artifact-type-selector branch from 6868ca0 to a98beff Compare February 16, 2026 16:41
@cameroncooke cameroncooke force-pushed the codex/eme-808-backend-artifact-rules branch from 334b6f1 to ad7fc00 Compare February 16, 2026 16:41
Copy link
Copy Markdown
Contributor Author

cameroncooke commented Feb 16, 2026

@cameroncooke cameroncooke force-pushed the codex/eme-808-frontend-artifact-type-selector branch from a98beff to 0e31f2a Compare February 16, 2026 16:46
@cameroncooke cameroncooke changed the title feat(preprod): Add artifact type options to status rule UI feat(preprod): Add artifact-type filtering controls to status rule UI Feb 16, 2026
@cameroncooke cameroncooke marked this pull request as ready for review February 16, 2026 16:58
@cameroncooke cameroncooke force-pushed the codex/eme-808-frontend-artifact-type-selector branch from 0e31f2a to af37f14 Compare February 16, 2026 17:04
{label: 'All Artifact Types', value: 'all_artifacts'},
{label: 'Main App', value: 'main_artifact'},
{label: 'Watch App', value: 'watch_artifact'},
{label: 'Android Dynamic Feature', value: 'android_dynamic_feature_artifact'},
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.

The whole file is like this and this just follows the existing pattern so we don't need to change it now however this I thing we could write better with a bit less duplication/more type safety by doing something like:

export const ALL_ARTIFACT_TYPES = [
  'main_artifact',
  'watch_artifact',
  'android_dynamic_feature_artifact',
  'all_artifacts',
] as const;

export type ArtifactType = typeof ALL_ARTIFACT_TYPES[number];

export const ARTIFACT_TYPE_LABELS: Record<ArtifactType, string> = {
  all_artifacts: 'All Artifact Types',
  main_artifact: 'Main App',
  watch_artifact: 'Watch App',
  android_dynamic_feature_artifact: 'Android Dynamic Feature',
};

export const ARTIFACT_TYPE_OPTIONS = Object.entries(ARTIFACT_TYPE_LABELS).map(
  ([value, label]) => ({ label, value: value as ArtifactType })
);

export const getSafeValue = <T>(value: unknown, validOptions: readonly T[], fallback: T): T => {
  if (validOptions.includes(value as any)) {
    return value as T;
  }
  return fallback;
};

const toArtifact = type => getSafeValue(type, VALID_ARTIFACT_TYPES, 'main_artifact');

const artifactType = toArtifact(r.artifactType as string);

Copy link
Copy Markdown
Contributor Author

@cameroncooke cameroncooke Feb 18, 2026

Choose a reason for hiding this comment

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

@chromy I've addressed this now, thanks for the tip, still learning a lot about TS and most of my learning is from existing code so it's really helpful to see patterns like this. Though if this was Swift it would be like 4 lines of code! Need to get used to all this type dancing!

Copy link
Copy Markdown
Contributor

@chromy chromy left a comment

Choose a reason for hiding this comment

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

lgtm

@cameroncooke cameroncooke force-pushed the codex/eme-808-backend-artifact-rules branch from 1de6d69 to 18cb46f Compare February 18, 2026 13:42
@cameroncooke cameroncooke force-pushed the codex/eme-808-frontend-artifact-type-selector branch from af37f14 to 55680ad Compare February 18, 2026 13:42
Base automatically changed from codex/eme-808-backend-artifact-rules to master February 18, 2026 14:28
@cameroncooke cameroncooke requested a review from a team as a code owner February 18, 2026 14:28
@cameroncooke cameroncooke force-pushed the codex/eme-808-frontend-artifact-type-selector branch from 55680ad to a84bb60 Compare February 18, 2026 16:59
Copy link
Copy Markdown
Contributor

@chromy chromy left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for cleaning those up!

@cameroncooke cameroncooke merged commit cf51fb5 into master Feb 19, 2026
63 checks passed
@cameroncooke cameroncooke deleted the codex/eme-808-frontend-artifact-type-selector branch February 19, 2026 11:31
JonasBa pushed a commit that referenced this pull request Feb 19, 2026
…#108313)

Add frontend support for artifact-type filtering in mobile build size
status check rules.

This PR adds the UI and client-side rule handling needed to configure
artifact targeting for status checks and aligns frontend behavior with
backend rule evaluation in #108311.

Key changes:
- Add artifact type options to the rule editor (All, Main App, Watch
App, Dynamic Feature).
- Move the artifact type dropdown below the Artifact Type label for
consistent layout.
- Order the dropdown with All at the top.
- Default new rules to All artifacts.
- Preserve existing saved rules by reading missing artifact type as Main
App.
- Update rule typing and persistence logic so `artifactType` is
round-tripped correctly.

This PR remains stacked on #108311 so backend and frontend can be
deployed independently.

<img width="765" height="655" alt="Screenshot 2026-02-16 at 16 18 39"
src="https://github.com/user-attachments/assets/8792ab33-4bd3-4cc4-81ac-a65e2a592672"
/>

Refs EME-808
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
…#108313)

Add frontend support for artifact-type filtering in mobile build size
status check rules.

This PR adds the UI and client-side rule handling needed to configure
artifact targeting for status checks and aligns frontend behavior with
backend rule evaluation in #108311.

Key changes:
- Add artifact type options to the rule editor (All, Main App, Watch
App, Dynamic Feature).
- Move the artifact type dropdown below the Artifact Type label for
consistent layout.
- Order the dropdown with All at the top.
- Default new rules to All artifacts.
- Preserve existing saved rules by reading missing artifact type as Main
App.
- Update rule typing and persistence logic so `artifactType` is
round-tripped correctly.

This PR remains stacked on #108311 so backend and frontend can be
deployed independently.

<img width="765" height="655" alt="Screenshot 2026-02-16 at 16 18 39"
src="https://github.com/user-attachments/assets/8792ab33-4bd3-4cc4-81ac-a65e2a592672"
/>

Refs EME-808
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

claude-code-assisted 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