Skip to content

diagram: invalid sim-spec input is silently reverted with no message #962

Open

Description

@bpowers

In the model properties drawer, typing an invalid value into Start Time, Stop Time, or dt (an empty field, or a dt of 0 or less) and then tabbing away silently puts the old value back.
Nothing says why, and screen readers get no signal at all.
The field should say what was wrong, for example "dt must be a positive number".

Example

Open the model properties drawer, set dt to 0, press Enter.
The field snaps back to the previous dt with no message.

Fix

Have resolveSimSpecDraft return a reason along with shouldCommit: false, and have SimSpecDraftField pass it as error + helperText to the shared TextField, which already wires aria-invalid and aria-describedby to its helper text.
Recommended: keep the invalid text in the field with the message until the user fixes it or presses Escape, so they can see what they typed.
Alternative: keep revert-on-blur and only flash the message, which is less code but the typed value still vanishes.

Start < stop is deliberately not checked here; the engine reports it as a model error.

Pointers

  • src/diagram/sim-spec-draft.ts (resolveSimSpecDraft)
  • src/diagram/ModelPropertiesDrawer.tsx (SimSpecDraftField)
  • src/diagram/components/TextField.tsx

Activity

  1. changed the title [-]diagram: sim-specs fields silently revert invalid input with no feedback[/-] [+]diagram: invalid sim-spec input is silently reverted with no message[/+] on Oct 12, 2026
  2. added
    frontend
    bug
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions