Skip to content

StepperCommandDialog miscounts conditional steps #120

Description

@woksin

Describe the bug

This issue promotes a previously recorded upstream item from a production Cratis consumer. The complete evidence and requested fix follow.

Status: Open upstream defect · filing in progress 2026-08-10
Product: Components — StepperCommandDialog
Type: Correctness / navigation

Symptom and Ada cost

StepperCommandDialog derives its step count through React.Children.count, which counts a falsy conditional
child as a slot. A normal {showStep && <StepperPanel />} therefore produces a step count that differs from the
rendered panels and breaks Next/Previous/Submit navigation. Ada's command-dialog skill has to forbid conditional
steps and require consumers to drop to a manual dialog and PrimeReact Stepper.

Requested fix

Count React.Children.toArray(children) after filtering non-elements, and add navigation coverage with false,
null, fragments and arrays. The visible step list must be the single source for current/last-step calculations.

Honest limits

The behavior is source-read and encoded in Ada's corpus; no Components runtime reproduction was run in this pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions