Skip to content

Conversation

@viva-jinyi
Copy link
Member

@viva-jinyi viva-jinyi commented Oct 22, 2025

Summary

  • Implement asset deletion for media assets
  • Add delete confirmation dialog
  • Support both cloud and internal asset deletion
  • Refresh assets list after successful deletion

Changes

  • Add delete button to MediaAssetActions component
  • Implement deleteAsset method in useMediaAssetActions
  • Add confirmation dialog before deletion
  • Handle asset-deleted event to refresh the list
  • Refactor to use QueueStore.tasks for proper grouping

Test plan

  • Delete output assets in internal mode
  • Delete input/output assets in cloud mode
  • Verify confirmation dialog appears
  • Check assets list refreshes after deletion
  • Test folder view functionality
screen-capture.3.webm

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 10/27/2025, 11:58:51 AM UTC

📈 Summary

  • Total Tests: 498
  • Passed: 464 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 31 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 455 / ❌ 0 / ⚠️ 3 / ⏭️ 31
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@viva-jinyi viva-jinyi force-pushed the feature/job-detail-view branch from 492116b to 75c865c Compare October 23, 2025 11:44
Base automatically changed from feature/job-detail-view to feature/media-asset-sidebar-tab October 23, 2025 14:56
@viva-jinyi viva-jinyi force-pushed the feature/media-asset-sidebar-tab branch 3 times, most recently from 21df448 to 4eac455 Compare October 24, 2025 05:41
@viva-jinyi viva-jinyi force-pushed the feature/asset-delete branch from 446bf86 to 3b812a2 Compare October 24, 2025 07:32
@viva-jinyi viva-jinyi added the claude-review Add to trigger a PR code review from Claude Code label Oct 24, 2025
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Comprehensive PR Review

This review is generated by Claude. It may not always be accurate, as with human reviewers. If you believe that any of the comments are invalid or incorrect, please state why for each. For others, please implement the changes in one way or another.

Review Summary

PR: feat: implement asset deletion functionality (#6203)
Impact: 185 additions, 19 deletions across 7 files

Issue Distribution

  • Critical: 0
  • High: 2
  • Medium: 7
  • Low: 1

Category Breakdown

  • Architecture: 2 issues
  • Security: 0 issues
  • Performance: 1 issue
  • Code Quality: 7 issues

Key Findings

Architecture & Design

The PR successfully implements a comprehensive asset deletion system that handles both cloud and desktop environments appropriately. However, there are some architectural concerns:

  • Function signature changes: The deleteAsset function now returns boolean success indicators, but not all calling patterns may handle this properly
  • Error handling patterns: Mix of exception throwing and return value patterns could lead to inconsistent error handling

Security Considerations

No significant security vulnerabilities identified. The implementation correctly:

  • Validates environment context before allowing input file deletion
  • Uses proper API endpoints for asset deletion
  • Maintains appropriate permission boundaries between cloud and desktop modes

Performance Impact

The implementation includes proper async operations with store updates, but could benefit from:

  • Loading state indicators during potentially long-running operations
  • Optimistic updates with rollback to improve perceived performance

Integration Points

Good integration with existing systems:

  • Proper use of dialog system for confirmation
  • Correct store update patterns after deletion
  • Event-driven architecture with asset-deleted events

Positive Observations

  • Comprehensive deletion logic: Handles different asset types appropriately (input vs output)
  • Environment awareness: Correctly restricts input file deletion to cloud environments
  • User experience: Adds confirmation dialogs and proper success/error feedback
  • Event-driven design: Uses proper event emission for UI updates
  • Translation integration: Attempts to use i18n system (though with some inconsistencies)

References

Next Steps

  1. Address high priority issues around error handling before merge
  2. Standardize i18n usage for all user-facing strings
  3. Consider adding loading states for better UX
  4. Remove unreachable code and improve null safety

This is a comprehensive automated review. For architectural decisions requiring human judgment, please request additional manual review.

@github-actions github-actions bot removed the claude-review Add to trigger a PR code review from Claude Code label Oct 24, 2025
@viva-jinyi viva-jinyi marked this pull request as ready for review October 24, 2025 13:29
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 24, 2025
@benceruleanlu benceruleanlu self-requested a review October 24, 2025 16:45
@benceruleanlu
Copy link
Member

how come we don't support deleting local output assets yet? the delete button isn't gated for cloud so it might be confusing for users to have different experiences

@benceruleanlu
Copy link
Member

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@christian-byrne
Copy link
Contributor

On local, it's not really deleting right? Just removing that task from the history - but the underlying asset is still in ComfyUI/output

@viva-jinyi
Copy link
Member Author

Yes, it only deletes from history. On local environments, we're only removing the task from the execution history, not deleting the actual files from the filesystem.

  - Extract duplicate dialog logic into confirmDelete method
  - Only emit 'asset-deleted' event on successful deletion
  - Add missing i18n translation keys for delete messages
  - Remove unreachable code and improve null safety
@viva-jinyi viva-jinyi force-pushed the feature/asset-delete branch from 957a610 to 685fc88 Compare October 27, 2025 11:42
@viva-jinyi viva-jinyi merged commit d578518 into feature/media-asset-sidebar-tab Oct 27, 2025
20 checks passed
@viva-jinyi viva-jinyi deleted the feature/asset-delete branch October 27, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants