Skip to content

Fix column requirements banner flicker - #856

Merged
cristian-tamblay merged 1 commit into
developfrom
fix/column-requirements-banner-flicker
Sep 2, 2026
Merged

Fix column requirements banner flicker#856
cristian-tamblay merged 1 commit into
developfrom
fix/column-requirements-banner-flicker

Conversation

@Creylay

@Creylay Creylay commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the input/output column requirements banner in the "Prepare Dataset" step of session creation. It used to vanish silently (no message at all) whenever Input or Output Columns was emptied, and could briefly flash an incorrect red "invalid" state right after a dataset finished loading, even when the auto-selected columns were actually valid. Cleared fields now show an inline "Required" error, and the requirements banner reflects the real validation state without flickering.


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/components/models/modelSession/PrepareDatasetStep.jsx:
    • Wired the existing (previously unused) inputError/outputError/inputHelperText/outputHelperText props on DivideDatasetColumns, so an empty Input/Output Columns field is marked red with a "Required" message instead of the whole requirements banner just disappearing.
    • Fixed the validation-controlling effect: when there are no columns selected, validationPending now resolves to false immediately (we already know the selection is invalid, no backend call needed) instead of getting stuck at true forever, which was hiding the banner permanently after a column was cleared.
    • Switched that effect from useEffect to useLayoutEffect to close a render race: when columns go from empty back to a valid selection (e.g. right after the dataset finishes loading and defaults are auto-selected), the pending flag now flips back to true synchronously before paint, instead of one commit too late, which previously caused a one-frame flash of an incorrect red "invalid" banner over already-valid columns.
    • Simplified columnsReady from a useState + useEffect pair into a plain derived value, removing an extra render cycle of lag.

Testing

  • Verified clearing the only Input/Output column now shows an inline red "Required" state on the field, while the requirements banner stays visible in its "invalid" state (instead of disappearing).

@cristian-tamblay
cristian-tamblay merged commit 83e99e2 into develop Sep 2, 2026
21 checks passed
@cristian-tamblay
cristian-tamblay deleted the fix/column-requirements-banner-flicker branch September 2, 2026 13:06
cristian-tamblay added a commit that referenced this pull request Sep 2, 2026
PrepareDatasetStep conflicted on the same expression from both sides.
#856 turned columnsReady from state into a derived value, which is the
better shape, but dropped the requiresTarget escape hatch that a task
with no output column needs. Kept the derived form with the hatch back
inside it, and moved the declaration below requiresTarget: the two are
five lines apart in the file and reading it from above would have hit
the temporal dead zone on every render.

Its new output error is now conditioned on requiresTarget too, so a
clustering session no longer paints a red "Required" over a field
DivideDatasetColumns does not render for it.
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.

2 participants