Skip to content

feat(ui): say why a form editor's Save is off #5261

Open

Description

@tale-code-bot

Summary

Split off #5182.

The header's Save can show a reason why it is off, but only when the editor's controller supplies one as invalidReason (packages/ui/src/components/editor/editor-actions.tsx:183-190). The contract says the reason exists so the reader "learns what blocks the save instead of meeting a dead button" (packages/ui/src/components/editor/types.ts:20-25).

Today only the automation editor supplies one (services/platform/app/features/automations/components/automation-editor.tsx:2085-2105). The form editor (useFormEditor) and the group composer (packages/ui/src/components/editor/compose-editors.ts:46-54) supply none.

So every settings page built on them shows a disabled Save with nothing to explain it whenever:

  • an edit fails the schema, and
  • the failing field shows no error yet.

With the shared form mode onTouched (packages/ui/src/components/forms/use-form.ts:33), a field's error shows only after the field is left. #5182 met this as a disabled Save with the empty vector width's error hidden.

Read at main 11aac22.

Ask

  • useFormEditor supplies an invalidReason whenever its schema fails. The reason names the field that blocks the save, or says why.
  • The group composer passes on the reason of the editor that blocks.
  • Which words to use and how to name the field are open. The automation editor's reason is the existing model.

Constraints

  • No reason over nothing to save. It shows only when invalid edits hold Save back, as EditorActions already decides. It does not show while nothing is dirty, or while a save or a load is running.
  • Where the reason shows. It appears in the tooltip on Save, or inline where the page asks for inlineReason.
  • Locales. Every shipped locale gets the new strings.

Related

Activity

  1. added
    feat
    agent-ready
    on Nov 1, 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

    agent-readyfeat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions