Skip to content

fix: history tab throws runtime error for multi-source Applications - #282

Merged
keithchong merged 1 commit into
redhat-developer:mainfrom
aali309:GITOPS-10933
Sep 1, 2026
Merged

fix: history tab throws runtime error for multi-source Applications#282
keithchong merged 1 commit into
redhat-developer:mainfrom
aali309:GITOPS-10933

Conversation

@aali309

@aali309 aali309 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

@openshift-ci
openshift-ci Bot requested review from keithchong and wtam2018 August 31, 2026 17:59
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a3b4a20-6867-46a8-9008-facd5e245aa9

📥 Commits

Reviewing files that changed from the base of the PR and between 2da6a8f and 475c9e2.

📒 Files selected for processing (2)
  • src/gitops/components/application/History/History.tsx
  • src/gitops/models/ApplicationModel.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved application history display when source information is missing or varies between revisions.
    • Correctly displays OCI repository URLs and provides external links for other repository URLs.
    • Added a fallback to application-level source details when revision-specific sources are unavailable.

Walkthrough

The application history model now supports optional source fields and per-revision source collections. History rows use shared repository URL rendering for missing, OCI, and external repository URLs.

Changes

History source rendering

Layer / File(s) Summary
Revision source display
src/gitops/models/ApplicationModel.ts, src/gitops/components/application/History/History.tsx
ApplicationHistory supports optional source and sources fields. History rows resolve per-revision sources with a fallback and render repository URLs consistently. Optional source fields are handled safely.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 475c9

This PR fixes a runtime error affecting the history tab for multi-source Applications; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: keithchong, wtam2018

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the runtime error in the History tab and its multi-source Application scope.
Description check ✅ Passed The description references the related GITOPS-10933 issue, which matches the stated fix for multi-source Applications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.


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

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.34%. Comparing base (3bd1dab) to head (475c9e2).
⚠️ Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
.../gitops/components/application/History/History.tsx 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   11.30%   12.34%   +1.03%     
==========================================
  Files         169      171       +2     
  Lines        6679     6838     +159     
  Branches     2235     2257      +22     
==========================================
+ Hits          755      844      +89     
- Misses       5923     5993      +70     
  Partials        1        1              
Flag Coverage Δ
unit-tests 12.34% <0.00%> (+1.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@keithchong keithchong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approve for merge.

)}
<span style={{ marginLeft: '5px' }}>
{'('}
{renderRepoUrl(source?.repoURL)}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I tested this out and it looks good. For the next release, pull out the style properties (marginLeft, style, etc) in this change to the current history.scss file.

@keithchong

Copy link
Copy Markdown
Collaborator
Screenshot 2026-09-01 at 5 30 31 PM

@keithchong
keithchong merged commit 91a5f1e into redhat-developer:main Sep 1, 2026
5 checks passed
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.

3 participants