Skip to content

fix(web): drive mutated/injected counters from image changeType#247

Merged
golgoth31 merged 1 commit intomainfrom
fix/images-ui-webhook-counters
May 7, 2026
Merged

fix(web): drive mutated/injected counters from image changeType#247
golgoth31 merged 1 commit intomainfrom
fix/images-ui-webhook-counters

Conversation

@golgoth31
Copy link
Copy Markdown
Owner

Summary

  • Mutated/injected button counters on the Images page were stuck at 0 even when the backend correctly classified images
  • annotateImages relied on a legacy cross-image (Source=spec, Source=pod) pair-matching, but the ImageRegistry pipeline emits every WorkloadRef with Source=spec — so no pair ever matched
  • Derive hasMutation / hasInjection (and per-workload mutated/injected flags) directly from the canonical image.changeType field emitted by the backend; remove the obsolete pair-matching and hidden-ref logic

Test plan

  • npx vitest run (web) — 136/136 pass
  • npx tsc -b (web) — clean
  • go build ./... — clean
  • Visual check: mutated/injected counters reflect actual count, cards render with amber/violet borders, per-workload badges still show correctly

🤖 Generated with Claude Code

The mutated/injected button counters on ImagesPage stayed at 0 even when
the backend correctly classified images. annotateImages relied on a
legacy spec/pod source pair-matching across images, but the
ImageRegistry pipeline now emits every WorkloadRef with Source=spec —
so no pair was ever found and hasMutation/hasInjection never triggered.

Derive hasMutation/hasInjection (and per-workload mutated/injected
flags) directly from the canonical image.changeType emitted by the
backend. Drop the obsolete pair-matching and hidden-ref logic.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@golgoth31 golgoth31 merged commit de27dd3 into main May 7, 2026
2 checks passed
@golgoth31 golgoth31 deleted the fix/images-ui-webhook-counters branch May 7, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant