Skip to content

[CORRUPTED] Synthetic Benchmark PR #30617 - refactor: restructure DatasetCard component for improved readability and maintainability#205

Open
ofir-frd wants to merge 4 commits intobase_pr_30617_20260114_7454from
corrupted_pr_30617_20260114_7454
Open

[CORRUPTED] Synthetic Benchmark PR #30617 - refactor: restructure DatasetCard component for improved readability and maintainability#205
ofir-frd wants to merge 4 commits intobase_pr_30617_20260114_7454from
corrupted_pr_30617_20260114_7454

Conversation

@ofir-frd
Copy link

Benchmark PR langgenius#30617

Type: Corrupted (contains bugs)

Original PR Title: refactor: restructure DatasetCard component for improved readability and maintainability
Original PR Description: ## Summary

refactor: restructure DatasetCard component for improved readability and maintainability

  • Split DatasetCard into multiple subcomponents: CornerLabels, DatasetCardHeader, DatasetCardFooter, DatasetCardModals, Description, TagArea, and OperationsPopover.
  • Introduced a custom hook, useDatasetCardState, to manage state and modal logic.
  • Enhanced tag management and modal handling for renaming and deletion.
  • Improved code organization and reduced complexity in the main DatasetCard component.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

Original PR URL: langgenius#30617

Compliance Violation

  • Rule: Backend Code Must Pass Linting and Type Checks
  • Language: TypeScript
  • File: web/app/components/datasets/list/dataset-card/hooks/use-dataset-card-state.ts
CodingOnStar and others added 4 commits January 6, 2026 10:07
…and maintainability - Split DatasetCard into multiple subcomponents: CornerLabels, DatasetCardHeader, DatasetCardFooter, DatasetCardModals, Description, TagArea, and OperationsPopover. - Introduced a custom hook, useDatasetCardState, to manage state and modal logic. - Enhanced tag management and modal handling for renaming and deletion. - Improved code organization and reduced complexity in the main DatasetCard component.
…DatasetCardFooter - Updated error handling in useDatasetCardState to differentiate between Response and Error types for better clarity. - Removed redundant document count checks in DatasetCardFooter for cleaner code and improved readability.
…ved tag management - Modified handleExportPipeline to accept an optional boolean parameter. - Removed the custom useSyncTags hook and implemented useEffect for syncing tags directly in useDatasetCardState, enhancing clarity and reducing complexity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant