Skip to content

feat: add warning callback to workspace progress steps#1507

Open
vinokurig wants to merge 3 commits intomainfrom
CRW-10219
Open

feat: add warning callback to workspace progress steps#1507
vinokurig wants to merge 3 commits intomainfrom
CRW-10219

Conversation

@vinokurig
Copy link
Copy Markdown
Contributor

@vinokurig vinokurig commented Mar 30, 2026

Assisted-by: Claude Sonnet 4.5

What does this PR do?

Refactor workspace progress step components to use a dedicated onWarning callback instead of directly showing alerts for non-fatal warnings. This provides consistent warning handling across all progress steps and allows the parent component to manage warning display alongside errors.

Changes include:

  • Add onWarning prop to ProgressStep base class and all step implementations
  • Add warning display when devfile fetch fails and falls back to default devfile
  • Update all test files to include mockOnWarning callback

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://redhat.atlassian.net/browse/CRW-10219

Is it tested? How?

  1. Start a workspace from a private repo without necessary credentials
  2. See: the Warning appears on Fetch Devfile step, workspace starts from the default devfile:
image

Release Notes

Docs PR

@che-bot
Copy link
Copy Markdown
Contributor

che-bot commented Mar 30, 2026

Click here to review and test in web IDE: Contribute

Refactor workspace progress step components to use a dedicated onWarning callback instead of directly showing alerts for non-fatal warnings. This provides consistent warning handling across all progress steps and allows the parent component to manage warning display alongside errors.

Changes include:
- Add onWarning prop to ProgressStep base class and all step implementations
- Replace direct appAlerts.showAlert() calls with handleWarning() in StartWorkspace step
- Add warning display when devfile fetch fails and falls back to default devfile
- Update all test files to include mockOnWarning callback

Assisted-by: Claude Sonnet 4.5

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1507 (linux/amd64, linux/arm64)

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1507", name: che-dashboard}]}}]"

@vinokurig
Copy link
Copy Markdown
Contributor Author

/retest

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.26%. Comparing base (6797295) to head (0ac0fc4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
+ Coverage   92.24%   92.26%   +0.02%     
==========================================
  Files         562      562              
  Lines       54906    55038     +132     
  Branches     4082     4106      +24     
==========================================
+ Hits        50646    50783     +137     
+ Misses       4213     4208       -5     
  Partials       47       47              

☔ View full report in Codecov by Sentry.
📢 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.

@olexii4
Copy link
Copy Markdown
Contributor

olexii4 commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 60.52632% with 15 lines in your changes missing coverage. Please review. ✅ Project coverage is 92.21%. Comparing base (6797295) to head (20cf4c2).

Files with missing lines Patch % Lines
...rontend/src/components/WorkspaceProgress/index.tsx 51.85% 13 Missing ⚠️
.../src/components/WorkspaceProgress/ProgressStep.tsx 60.00% 2 Missing ⚠️
Additional details and impacted files

@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
- Coverage   92.24%   92.21%   -0.03%     
==========================================
  Files         562      562              
  Lines       54906    54944      +38     
  Branches     4082     4082              
==========================================
+ Hits        50646    50669      +23     
- Misses       4213     4228      +15     
  Partials       47       47              

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

🚀 New features to boost your workflow:

@vinokurig could you fix it?

Add comprehensive test coverage for the onWarning callback in WorkspaceProgress component, including tests for active step warnings, non-active step handling, and duplicate warning prevention.

Assisted-by: Claude Sonnet 4.5

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1507 (linux/amd64, linux/arm64)

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1507", name: che-dashboard}]}}]"

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 1, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, vinokurig

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Co-authored-by: Oleksii Kurinnyi <okurinny@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm label Apr 1, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 1, 2026

New changes are detected. LGTM label has been removed.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1507 (linux/amd64, linux/arm64)

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1507", name: che-dashboard}]}}]"

@svor svor requested a review from olkornii April 1, 2026 14:57
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.

4 participants