feat: implement step two of dataset creation with comprehensive UI components and hooks#30681
Merged
CodingOnStar merged 3 commits intomainfrom Jan 9, 2026
Merged
feat: implement step two of dataset creation with comprehensive UI components and hooks#30681CodingOnStar merged 3 commits intomainfrom
CodingOnStar merged 3 commits intomainfrom
Conversation
…mponents and hooks - Added new components for general chunking options, parent-child options, preview panel, and step two footer. - Introduced hooks for document creation, indexing configuration, indexing estimation, preview state, and segmentation state. - Created types for step two props and integrated them into the components. - Implemented escape and unescape utility functions for handling special characters. - Established a structured approach for managing dataset creation workflow, enhancing user experience and functionality.
Contributor
| Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the step-two component of the dataset creation workflow by extracting logic into custom hooks and smaller components, improving maintainability and testability.
Key Changes:
- Extracted state management into 5 custom hooks (useSegmentationState, usePreviewState, useIndexingConfig, useIndexingEstimate, useDocumentCreation)
- Split monolithic component into 5 focused sub-components (GeneralChunkingOptions, ParentChildOptions, IndexingModeSection, PreviewPanel, StepTwoFooter)
- Added comprehensive test coverage with 2185 lines of tests
- Created escape/unescape utility functions for handling special characters
Reviewed changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| index.tsx | Refactored main component to use extracted hooks and sub-components |
| types.ts | Defined StepTwoProps interface |
| hooks/* | Implemented 5 custom hooks for state management and business logic |
| components/* | Created 5 focused sub-components for UI sections |
| escape.ts/unescape.ts | Utility functions for character escaping |
| index.spec.tsx | Comprehensive test suite covering hooks and components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
web/app/components/datasets/create/step-two/components/preview-panel.tsx Show resolved Hide resolved
web/app/components/datasets/create/step-two/components/parent-child-options.tsx Show resolved Hide resolved
web/app/components/datasets/create/step-two/hooks/use-document-creation.ts Outdated Show resolved Hide resolved
web/app/components/datasets/create/step-two/hooks/use-document-creation.ts Outdated Show resolved Hide resolved
web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx Show resolved Hide resolved
web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx Show resolved Hide resolved
- Updated test case to clarify handling of complex strings without backslashes. - Added new test case to document behavior for strings containing existing backslashes, highlighting the non-symmetrical nature of escape/unescape functions. - Improved code readability and understanding of string manipulation scenarios.
e782ab6 to 88db000 Compare This was referenced Jan 14, 2026
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
feat: implement step two of dataset creation with comprehensive UI components and hooks
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods