fix(Operation): progress in intermediate state [YTFRONT-5634]#1461
Open
SimbiozizV wants to merge 1 commit intomainfrom
Open
fix(Operation): progress in intermediate state [YTFRONT-5634]#1461SimbiozizV wants to merge 1 commit intomainfrom
SimbiozizV wants to merge 1 commit intomainfrom
Conversation
Reviewer's GuideAdjusts OperationProgress rendering logic so that stacked job-based progress is always shown while an operation is in an intermediate state, and the state-based progress bar is only used otherwise. Class diagram for OperationProgress and Progress componentsclassDiagram
class OperationProgress {
+render()
-operation
-state
-jobsProgress
-completedJobsProgress
-runningJobsProgress
}
class Operation {
+inIntermediateState() bool
}
class Progress {
+size
+value
+theme
+stack
}
OperationProgress --> Operation : uses
OperationProgress --> Progress : renders
Flow diagram for OperationProgress progressBar selection logicflowchart LR
A["Render OperationProgress"] --> B{"operation.inIntermediateState()"}
B -->|"true"| C["Set progressBar to Progress with stacked jobsProgress, completedJobsProgress, runningJobsProgress"]
B -->|"false"| D{"state"}
D -->|"completed"| E["Set progressBar to Progress with RESOLVED_PROGRESS and theme success"]
D -->|"failed"| F["Set progressBar to Progress with RESOLVED_PROGRESS and theme danger"]
D -->|"aborted"| G["Set progressBar to Progress with RESOLVED_PROGRESS and theme default"]
D -->|"other"| H["Set progressBar to Progress with PENDING_PROGRESS or 0"]
C --> I["Render progressBar"]
E --> I
F --> I
G --> I
H --> I
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
E2E-local report is ready. |
Contributor
|
Storybook is ready. |
Contributor
|
Playwright components report is ready. |
Contributor
|
Statoscope report is ready. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider extracting the
operation.inIntermediateState()rendering into a small helper (e.g.renderIntermediateProgress()) to keep the main render logic more readable and reduce nesting. - If
PENDING_PROGRESSis always defined and numeric, you can drop the|| 0fallback to avoid suggesting that it may be falsy and simplify the default case.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the `operation.inIntermediateState()` rendering into a small helper (e.g. `renderIntermediateProgress()`) to keep the main render logic more readable and reduce nesting.
- If `PENDING_PROGRESS` is always defined and numeric, you can drop the `|| 0` fallback to avoid suggesting that it may be falsy and simplify the default case.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
xexys
reviewed
Mar 16, 2026
packages/ui/src/ui/pages/operations/OperationProgress/OperationProgress.js
Outdated
Show resolved
Hide resolved
xexys
reviewed
Mar 16, 2026
packages/ui/src/ui/pages/operations/OperationProgress/OperationProgress.js
Outdated
Show resolved
Hide resolved
xexys
reviewed
Mar 16, 2026
packages/ui/src/ui/pages/operations/OperationProgress/OperationProgress.js
Outdated
Show resolved
Hide resolved
xexys
reviewed
Mar 16, 2026
| default: | ||
| progressBar = <Progress size="s" value={PENDING_PROGRESS || 0} />; | ||
| break; | ||
| if (operation.inIntermediateState()) { |
Collaborator
There was a problem hiding this comment.
Is it possible to destruct inIntermediateState as over variables?
Collaborator
Author
There was a problem hiding this comment.
calling inIntermediateState() will have an incorrect this and will break the logic.
877dbf0 to
b4bef08
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://nda.ya.ru/t/SlfKKTTf7Wsh6h
## Summary by SourceryBug Fixes: