Skip to content

Default names in forms#306

Merged
cristian-tamblay merged 40 commits into
developfrom
feature/default-names-2
Sep 24, 2025
Merged

Default names in forms#306
cristian-tamblay merged 40 commits into
developfrom
feature/default-names-2

Conversation

@Creylay
Copy link
Copy Markdown
Collaborator

@Creylay Creylay commented Sep 23, 2025

Summary

  • Implement automatic sequential name generation across multiple modules
  • Add generateSequentialName utility function for consistent naming patterns
  • Update dataset, notebook, experiment, prediction, pipeline, and generative modules to use default names
  • Enhance user experience by providing meaningful default names that avoid conflicts
  • Add validation and error handling for name input fields

Type of change

  • Front end new feature.
  • Refactoring.

Changes

Core Functionality

  • New nameGenerator.js utility: Created a reusable function generateSequentialName() that generates sequential names (e.g., "Dataset_1", "Dataset_2") based on existing items to avoid naming conflicts.

Module Updates

  • Dataset Creation: Added default name generation in DataloaderConfiguration and SaveDatasetModal components
  • Notebook Creation: Implemented auto-naming in CreateNotebookModal and UploadNotebookSteps components
  • Experiment Module: Added sequential naming in NewExperimentModal and model configuration steps
  • Prediction Module: Enhanced SelectModelStep with default prediction names and validation
  • Pipeline Module: Implemented name generation in NewPipeline with validation and error handling
  • Generative Module: Added session name generation in SelectModelMenu component

Enhanced User Experience

  • Validation: Added proper name validation with error messages across all modules
  • Conflict Prevention: Automatic detection and prevention of duplicate names
  • Smart Defaults: Pre-populated meaningful names that users can modify if needed
  • Consistent UX: Standardized naming pattern across all modules

How to Test

Dataset Module

  1. Navigate to Datasets page
  2. Click "New Dataset" - verify default name "Dataset_1" appears
  3. Create dataset and try again - verify incremental naming (Dataset_2, etc.)
  4. Try creating multiple datasets and verify no name conflicts occur

Notebook Module

  1. Go to Datasets → Create Notebook
  2. Verify default name "Notebook_1" is pre-populated
  3. Create notebook and repeat - verify sequential numbering

Experiment Module

  1. Navigate to Experiments page
  2. Click "New Experiment"
  3. Verify default name "Experiment_1" appears in first step
  4. In model configuration, select a model and verify default model name appears
  5. Create experiment and repeat to test sequential numbering

Prediction Module

  1. Go to Models → Make Prediction
  2. Select a model and verify default prediction name is generated
  3. Test name validation (minimum 4 characters, alphanumeric)

Pipeline Module

  1. Navigate to Pipelines → New Pipeline
  2. Verify default name "Pipeline_1" appears in toolbar
  3. Test name validation and error messages
  4. Create pipeline and verify sequential naming for new ones

Generative Module

  1. Go to Generative → Start new session
  2. Verify default session name generation
  3. Test with multiple sessions to verify sequential naming

Notes

  • The generateSequentialName function is highly configurable with options for:
    • Custom base names
    • Filtering criteria
    • File extension handling
    • Starting numbers
  • All name inputs now have proper validation with clear error messages
  • The naming system respects existing items to prevent conflicts
  • Users can always override default names with their custom choices
  • The implementation maintains backward compatibility with existing data

…iments, models, notebooks, and predictions to consolidate naming logic
…ponents for improved clarity and consistency

Remove state NewDataset in UploadDatasetSteps and manage state locally in SelectDataloaderStep and ConfigureAndUploadDatasetStep

Other small tweaks: remove unused params and variables
@Creylay Creylay requested a review from Copilot September 23, 2025 18:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements automatic sequential name generation across multiple modules in the DashAI front-end application to enhance user experience. The implementation adds a centralized utility function and updates dataset, notebook, experiment, prediction, pipeline, and generative modules to provide meaningful default names that automatically avoid naming conflicts.

  • New nameGenerator.js utility: Creates a reusable generateSequentialName() function for consistent naming patterns
  • Module-wide default naming: Implements auto-naming in datasets, notebooks, experiments, predictions, pipelines, and generative sessions
  • Enhanced validation: Adds proper name validation with error messages and conflict prevention across all modules

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
DashAI/front/src/utils/nameGenerator.js New utility function for sequential name generation
DashAI/front/src/pages/predictions/PredictionPage.jsx Adds prediction data fetching and passes existing predictions to modal
DashAI/front/src/pages/pipelines/NewPipeline.jsx Integrates name validation props for pipeline creation
DashAI/front/src/pages/generative/Generative.jsx Passes existing sessions to model selection menu
DashAI/front/src/pages/experiments/Experiments.jsx Updates to fetch and manage experiments data for name generation
DashAI/front/src/pages/datasets/Datasets.jsx Passes existing datasets/notebooks to creation components
DashAI/front/src/hooks/usePipelineState.js Implements pipeline name generation and validation logic
DashAI/front/src/hooks/useFormSchema.js Merges default values with initial values for better form handling
DashAI/front/src/components/shared/FormSchemaRenderFields.jsx Removes unused React import
DashAI/front/src/components/shared/FormSchemaButtonGroup.jsx Removes unused imports
DashAI/front/src/components/shared/FormSchema.jsx Removes unused React import and cleans formatting
DashAI/front/src/components/predictions/SelectModelStep.jsx Adds default prediction name handling and validation
DashAI/front/src/components/predictions/PredictionTable.jsx Refactors to use predictions prop instead of internal state
DashAI/front/src/components/predictions/PredictionModal.jsx Implements default prediction name generation
DashAI/front/src/components/pipelines/PipelineToolbar.jsx Adds name validation error display
Multiple notebook components Add default name generation for notebook creation flows
Multiple experiment components Implement default experiment and model naming
Multiple dataset components Add default dataset naming in creation flows
DashAI/front/src/components/generative/SelectModelMenu.jsx Adds default session name generation
DashAI/back/dataloaders/classes/*.py Updates schema to make name field required instead of optional
DashAI/back/api/api_v1/endpoints/explainers.py Makes run_id parameter optional for explainer endpoints
Comments suppressed due to low confidence (1)

DashAI/front/src/hooks/usePipelineState.js:1

  • The dependency formSubmitRef.current in the useCallback will cause the callback to recreate whenever the ref changes, but refs don't trigger re-renders. This should be formSubmitRef instead, or the dependency should be removed since refs are stable.
import { useState, useEffect, useMemo } from "react";

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread DashAI/front/src/hooks/usePipelineState.js Outdated
Comment thread DashAI/front/src/hooks/usePipelineState.js Outdated
Comment thread DashAI/front/src/hooks/usePipelineState.js Outdated
@Creylay Creylay changed the title Feature/default names 2 Default names in forms Sep 23, 2025
@Creylay Creylay requested a review from Copilot September 23, 2025 18:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 8 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread DashAI/front/src/components/predictions/SelectModelStep.jsx Outdated
Comment thread DashAI/front/src/components/notebooks/notebookCreation/UploadNotebookSteps.jsx Outdated
Comment thread DashAI/front/src/components/generative/SelectModelMenu.jsx Outdated
Comment thread DashAI/front/src/components/experiments/SetNameAndTaskStep.jsx
Comment thread DashAI/front/src/components/experiments/ConfigureModelsStep.jsx Outdated
Comment thread DashAI/front/src/hooks/usePipelineState.js
Comment thread DashAI/front/src/components/predictions/PredictionTable.jsx
Comment thread DashAI/back/dataloaders/classes/csv_dataloader.py
@Creylay Creylay requested a review from Copilot September 24, 2025 02:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 5 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread DashAI/front/src/hooks/useFormSchema.js
Comment thread DashAI/front/src/components/predictions/PredictionTable.jsx
Comment thread DashAI/front/src/components/experiments/ConfigureModelsStep.jsx
Comment thread DashAI/front/src/components/generative/SelectModelMenu.jsx
@cristian-tamblay cristian-tamblay merged commit 124ced4 into develop Sep 24, 2025
5 checks passed
@cristian-tamblay cristian-tamblay deleted the feature/default-names-2 branch September 24, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants