Skip to content

Minor fix#291

Merged
cristian-tamblay merged 27 commits into
productionfrom
develop
Sep 8, 2025
Merged

Minor fix#291
cristian-tamblay merged 27 commits into
productionfrom
develop

Conversation

@cristian-tamblay
Copy link
Copy Markdown
Member

Summary

Added some UX changes and fixed supervised converters

Irozuku and others added 27 commits August 28, 2025 16:05
fix: refactor DashAIDataset creation for imbalanced converter
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 UX improvements including item editing functionality and fixes for supervised converters. The changes add inline editing for datasets and notebooks, improve the data handling for converter scopes and targets, and enhance visual consistency across the application.

Key changes:

  • Added inline editing functionality for datasets and notebooks with keyboard and mouse interaction handling
  • Fixed supervised converter parameter handling by updating target and scope data structures
  • Enhanced UI consistency by updating colors, sizing, and adding informational note boxes

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
setup.py Version bump from 0.2.3 to 0.2.4
DashAI/front/src/pages/datasets/Datasets.jsx Added edit handlers for datasets and notebooks with API integration
DashAI/front/src/components/threeSectionLayout/ItemMenu.jsx Added edit menu option with icon and handler
DashAI/front/src/components/threeSectionLayout/ItemBox.jsx Implemented inline editing with TextField and keyboard/blur event handling
DashAI/front/src/components/threeSectionLayout/CollapsibleList.jsx Added edit prop passing and updated icon colors
DashAI/front/src/components/notebooks/utils.js Fixed column name extraction for scope formatting
DashAI/front/src/components/notebooks/notebookCreation/UploadNotebookSteps.jsx Added informational note box
DashAI/front/src/components/notebooks/notebookCreation/CreateNotebookModal.jsx Added informational note box
DashAI/front/src/components/notebooks/notebook/NotebookView.jsx Fixed row item height
DashAI/front/src/components/notebooks/notebook/DatasetPreviewNotebook.jsx Updated button styling and text
DashAI/front/src/components/notebooks/explorer/visualizations/TabularVisualizer.jsx Updated pagination settings and removed scrollbar hiding
DashAI/front/src/components/notebooks/explorer/ExplorerBox.jsx Updated styling to use theme colors
DashAI/front/src/components/notebooks/datasetCreation/SaveDatasetModal.jsx Added informational note box
DashAI/front/src/components/notebooks/dataset/DatasetVisualization.jsx Increased initial page size
DashAI/front/src/components/notebooks/dataset/DatasetTable.jsx Added initial state for pagination model
DashAI/front/src/components/notebooks/converterCreation/ScopeStepConverter.jsx Fixed column and target data structure handling
DashAI/front/src/components/notebooks/converterCreation/FormConverterSection.jsx Updated target parameter name
DashAI/front/src/components/notebooks/converterCreation/ConverterTargetColumnModal.jsx Updated target column selection logic
DashAI/front/src/components/notebooks/converter/ConverterBox.jsx Updated parameter display and styling
DashAI/front/src/components/notebooks/NoteBox.jsx New component for informational messages
DashAI/front/src/components/notebooks/LeftBar.jsx Added edit handlers and improved item descriptions
DashAI/front/src/api/notebook.ts Added updateNotebook API function
DashAI/back/job/dataset_job.py Updated dataset creation with UUID-based folder names
DashAI/back/job/converter_job.py Fixed target column handling for supervised converters
DashAI/back/converters/imbalanced_learn_wrapper.py Simplified dataset creation by removing features parameter
DashAI/back/api/api_v1/schemas/notebook_params.py Added NotebookUpdateParams schema
DashAI/back/api/api_v1/schemas/datasets_params.py Removed columns field from DatasetUpdateParams
DashAI/back/api/api_v1/schemas/converter_params.py Updated converter parameters schema for new data structures
DashAI/back/api/api_v1/endpoints/notebook.py Added update_notebook endpoint
DashAI/back/api/api_v1/endpoints/datasets.py Simplified dataset update logic

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

if (e.key === "Enter") {
setIsEditing(false);
if (editedName.trim() !== name && editedName.trim() !== "") {
onEdit(editedName);
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

The onEdit callback should be called with the trimmed name, but it's being called with the untrimmed editedName. This could result in saving names with leading/trailing whitespace.

Suggested change
onEdit(editedName);
onEdit(editedName.trim());

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +35
noRowsOverlay: {
style: { height: "100%" },
},
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

The noRowsOverlay property should be placed inside the slotProps object, not as a top-level property in the DataGrid configuration.

Copilot uses AI. Check for mistakes.
dataset_path = f"{converter_list.notebook.file_path}/dataset"
loaded_dataset = load_dataset(dataset_path)
target_column_index = converter_list.parameters.pop("target_index")
print("Pre target column")
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code. Use proper logging with the existing log object instead.

Suggested change
print("Pre target column")
log.debug("Pre target column")

Copilot uses AI. Check for mistakes.
Comment on lines +214 to +221
print("Pre target column")
params = converter_list.parameters or {}
target_column_index = (
params["target"].get("idx")
if params.get("target") is not None
else None
)
print(target_column_index)
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code. Use proper logging with the existing log object instead.

Suggested change
print("Pre target column")
params = converter_list.parameters or {}
target_column_index = (
params["target"].get("idx")
if params.get("target") is not None
else None
)
print(target_column_index)
log.debug("Pre target column")
params = converter_list.parameters or {}
target_column_index = (
params["target"].get("idx")
if params.get("target") is not None
else None
)
log.debug(f"Target column index: {target_column_index}")

Copilot uses AI. Check for mistakes.
)
if not params.name or params.name == notebook.name:
raise HTTPException(
status_code=status.HTTP_304_NOT_MODIFIED,
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

HTTP 304 Not Modified is semantically incorrect here as it's for conditional requests. Use HTTP 400 Bad Request or return the existing notebook with HTTP 200 instead.

Suggested change
status_code=status.HTTP_304_NOT_MODIFIED,
status_code=status.HTTP_400_BAD_REQUEST,

Copilot uses AI. Check for mistakes.
id: number,
formData: object,
): Promise<INotebook> => {
console.log("updating notebook with id:", id, "and formData:", formData);
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

Console.log statements should be removed from production code as they can leak sensitive information and clutter the console.

Suggested change
console.log("updating notebook with id:", id, "and formData:", formData);

Copilot uses AI. Check for mistakes.
@cristian-tamblay cristian-tamblay merged commit dfc5535 into production Sep 8, 2025
6 checks passed
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.

4 participants