Skip to content

EDM-4049: Do now show sync status of RS without repositories - #661

Open
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4049-deleted-repository-rs
Open

EDM-4049: Do now show sync status of RS without repositories#661
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-4049-deleted-repository-rs

Conversation

@celdrake

@celdrake celdrake commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

If users delete the repository that a RS is associated with, the UI was still showing the Pending/Error notification about that RS status.

Since eventually the RS will fail with a condition, and the resource sync status won't change while the repository is missing, we'll hide those notifications.

  status:
    conditions:
    - lastTransitionTime: "2026-06-01T07:49:41.454211613Z"
      message: Repository of name "test-repo" not found
      reason: repository resource not found
      status: "False"
      type: Accessible

Summary by CodeRabbit

  • Bug Fixes
    • Updated the shared libs/ui-components/ ResourceSync status component.
    • Hides pending and error notifications when the referenced repository does not exist.
    • Suppresses notifications while repository data is loading or unavailable.
    • Added temporary mock data for Security Overview vulnerabilities and duplicate organization names.
  • No changes affect platform-specific apps, the Go auth proxy, container builds, E2E tests, or CI configuration.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: fbc3e0a6-d9a5-4a3a-8128-5c262f7165d8

📥 Commits

Reviewing files that changed from the base of the PR and between 5a36446 and 5e36bfc.

📒 Files selected for processing (3)
  • libs/ui-components/src/components/ResourceSync/ResourceSyncImportStatus.tsx
  • libs/ui-components/src/components/SecurityOverview/mockVulnerabilityData.ts
  • libs/ui-components/src/utils/mockOrganizationData.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


Walkthrough

The PR adds repository-aware ResourceSync filtering and mock data helpers for Security Overview vulnerability responses and organization lists.

Changes

Repository-aware ResourceSync Filtering

Layer / File(s) Summary
Repository-aware ResourceSync filtering
libs/ui-components/src/components/ResourceSync/ResourceSyncImportStatus.tsx
The component filters pending and error ResourceSync entries against fetched repositories. It displays no entries while repository data is loading or unavailable.

Security and Organization Mock Data

Layer / File(s) Summary
Vulnerability mock data APIs
libs/ui-components/src/components/SecurityOverview/mockVulnerabilityData.ts
Added representative vulnerability fixtures and helpers for device or grouped lists, severity counts, and CVE impact data.
Organization mock data API
libs/ui-components/src/utils/mockOrganizationData.ts
Added organization fixtures, including duplicate display names, and a helper that returns an OrganizationList.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to 5e36b

The change can suppress actionable ResourceSync status notifications when the repository request fails; the PR is otherwise localized, but this fallback behavior should be corrected or explicitly accepted.

Suggested labels: ui-components

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes hiding ResourceSync status when referenced repositories are missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed The PR adds only mock CVE data, public links, image references, IDs, and flags; scans found no credential assignments, embedded URL credentials, private keys, or base64-like secrets.
No-Weak-Crypto ✅ Passed The parent-to-HEAD diff adds no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto APIs, custom crypto, or secret comparisons; sha256 values are mock image-digest labels.
No-Injection-Vectors ✅ Passed The diff contains no eval/exec, dangerouslySetInnerHTML, os.system, exec.Command, or yaml.load. Dynamic URL text uses fixed mock CVE values only.
Container-Privileges ✅ Passed The PR changes only TypeScript UI files. The patch adds no container/Kubernetes manifests or privilege settings such as privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscala...
No-Sensitive-Data-In-Logs ✅ Passed The diff adds no console/logger calls or logging imports. Mock CVEs, organization IDs, and image refs are UI fixtures, not logged credentials, PII, hostnames, or customer data.
Resource-Leaks ✅ Passed The PR changes only three TypeScript/TSX files; no files under proxy/ or any Go files changed, so it introduces no flagged resource leak.
Unchecked-Errors ✅ Passed The PR changes only three TypeScript files; it introduces no Go changes under proxy, so this unchecked-errors check has no applicable failure.
Ai-Attribution ✅ Passed The pull-request commit uses the acceptable Made-with: Cursor trailer and has no AI Co-Authored-By trailer.
Generated-Files-Not-Hand-Edited ✅ Passed The PR diff changes only three ui-components source files; no files under the listed generated paths or English translation file were edited.
I18n-Compliance ✅ Passed The PR adds no user-visible strings in .tsx files; its changes are repository filtering logic, while existing alert text remains covered by t() or .
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@libs/ui-components/src/components/ResourceSync/ResourceSyncImportStatus.tsx`:
- Around line 167-180: The current memo treats repoList being undefined as “hide
all alerts”; change the logic so you only filter out RS entries when you
actually have a valid repoList—otherwise preserve the original lists. In the
React.useMemo for pendingRs/errorRs (referencing repoList, isLoadingRepos,
allPendingRs, allErrorRs, removeRsWithMissingRepositories), return { pendingRs:
allPendingRs, errorRs: allErrorRs } when repoList is undefined or loading, and
only call removeRsWithMissingRepositories when repoList is present
(non-undefined) to avoid suppressing alerts on transient fetch failures.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 301ba0e6-2832-41a0-96a9-b624ef6b60a3

📥 Commits

Reviewing files that changed from the base of the PR and between 905a256 and 69bcc42.

📒 Files selected for processing (1)
  • libs/ui-components/src/components/ResourceSync/ResourceSyncImportStatus.tsx

@celdrake
celdrake force-pushed the EDM-4049-deleted-repository-rs branch from 69bcc42 to 5e36bfc Compare August 19, 2026 11:53
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant