refactor: unify upload and delete task management#27
Merged
Conversation
- Consolidate separate upload and delete task managers into a unified TaskManager - Create shared task UI components (stats, panel, list, item) under components/object/task/ - Remove unused compatibility layer stores (useDeleteTaskManagerStore, useUploadTaskManagerStore) - Fix status name inconsistencies in task stores - Remove unused processing-status prop from object-task-stats component This refactoring reduces code duplication by ~1000 lines and provides a more maintainable architecture for task management across upload and delete operations.
- Add mandatory TypeScript type check (vue-tsc --noEmit) and Prettier format check (prettier --check) as required checks in AGENTS.md - Update pre-commit-check.sh to explicitly run these checks before lint - Update node-forge to 1.3.2 to fix security vulnerabilities - Add node-forge override in package.json to ensure secure version
- Add mandatory lockfile sync check to AGENTS.md - Update pre-commit hook to enforce lockfile sync before commit - Fix pnpm-lock.yaml sync issue (node-forge specifier consistency) - Ensure CI will pass by requiring lockfile sync before commit
- Add pnpm-lock.yaml to .prettierignore (auto-generated file should not be formatted) - Update AGENTS.md with instructions for installing Git pre-commit hook - Fixes CI lint failures caused by pnpm-lock.yaml formatting
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.
Summary
This PR consolidates the separate upload and delete task management systems into a unified architecture, significantly reducing code duplication (~1000 lines removed) while improving maintainability and code reusability.
Related to rustfs/rustfs#938
Changes
Core Refactoring
TaskManagerclass (lib/task-manager.ts) that handles both upload and delete operations with a shared queue and concurrency controllib/upload-task.ts- Upload task helperslib/delete-task.ts- Delete task helpersstore/tasks.tswithuseTaskManagerStorethat manages all tasks (upload and delete) in a single storeComponent Consolidation
components/object/task/:stats.vue- Task statistics and status displaypanel.vue- Task management panel with tabslist.vue- Task list componentitem.vue- Individual task item componentStore Cleanup
store/upload-tasks.tsandstore/delete-tasks.tsas they were not being used anywhere in the codebaseuseTaskManagerStoreBug Fixes
processing-statusprop fromobject-task-statscomponent usageBenefits
Technical Details
The new architecture follows a plugin-based pattern where
TaskManageraccepts task handlers for different task types. Each task type has its own lifecycle and handler implementation, while tasks share a common interface (ManagedTask) but can have type-specific properties.Testing
Files Changed
Total: 21 files changed, 1044 insertions(+), 1221 deletions(-)