-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(events): Added status after deleting files in idle #684
Conversation
WalkthroughThis update focuses on enhancing the success criteria for upload operations. Changes were made to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UploaderBlock
participant EventManager
User ->> UploaderBlock: Trigger Upload
UploaderBlock ->> UploaderBlock: Process Upload (Check Conditions)
alt Successful Upload
UploaderBlock ->> EventManager: Emit COMMON_UPLOAD_SUCCESS
else Unsuccessful Upload
UploaderBlock ->> EventManager: Emit COMMON_UPLOAD_FAIL
end
Poem
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
abstract/UploaderBlock.js (1)
Line range hint
585-585
: Remove redundant double-negation.The double-negation in line 585 is unnecessary and can be removed for cleaner code.
- !!this.cfg.checkForUrlDuplicates + this.cfg.checkForUrlDuplicates
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- abstract/UploaderBlock.js (1 hunks)
- abstract/buildOutputCollectionState.js (1 hunks)
Additional context used
Biome
abstract/UploaderBlock.js
[error] 585-585: Avoid redundant double-negation.
It is not necessary to use double-negation when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant double-negation(lint/complexity/noExtraBooleanCast)
Additional comments not posted (2)
abstract/buildOutputCollectionState.js (1)
78-82
: Approved with a suggestion for clarity improvement.The updated logic in
isSuccess
now correctly checks if there are any entries before considering success. This is a good improvement for accuracy.[SUGGESTION]
Consider adding a comment above theisSuccess
method to explain why the check forstate.allEntries.length > 0
is necessary. This would improve code readability and maintainability.abstract/UploaderBlock.js (1)
433-433
: Approved but consider potential redundancy.The added condition
uploadCollection.size > 0
ensures that there are items before emitting a success event. However, this might be redundant since the equality check withloadedItems.length
implicitly covers this scenario.
Description
Checklist
Summary by CodeRabbit