Skip to content

refactor: centralize dataset polling and remove redundant fetchDatase…#481

Open
Creylay wants to merge 1 commit intodevelopfrom
refactor/centralize-dataset-polling
Open

refactor: centralize dataset polling and remove redundant fetchDatase…#481
Creylay wants to merge 1 commit intodevelopfrom
refactor/centralize-dataset-polling

Conversation

@Creylay
Copy link
Collaborator

@Creylay Creylay commented Mar 13, 2026

Summary

Refactored dataset status updates to use a single centralized polling flow instead of component-level polling triggers. This removes duplicated polling behavior when datasets are processing and keeps both the left dataset list and DatasetVisualization in sync from shared state.


Type of Change

Check all that apply like this [x]:

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/front/src/hooks/datasets/useDatasets.js:
    • Centralized dataset refresh behavior using job updates (subscribeJobs)
    • Made fetchDatasets stable and based on a ref-backed latest dataset snapshot
    • Removed extra fetchDatasets() call from startDatasetPolling success callback (now selection/snackbar only)
  • DashAI/front/src/components/DatasetVisualization.jsx:
    • Removed local polling trigger (setTimeout(fetchDatasets, 1000))
    • Simplified effect to react to dataset changes and fetch dataset info only
    • Removed unused fetchDatasets prop
  • DashAI/front/src/components/notebooks/dataset/DatasetsCenterContent.jsx:
    • Removed passing fetchDatasets prop into DatasetVisualization

Testing (optional)

  1. Start uploading/processing a dataset and open the dataset module.
  2. Verify dataset status updates in the left list while processing.
  3. Verify DatasetVisualization updates correctly when processing finishes.
  4. Confirm no duplicated polling behavior (fewer duplicate refreshes/requests).

@Creylay Creylay requested a review from Irozuku March 13, 2026 21:02
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.

1 participant