Skip to content

A refused cell edit in the builder stays on screen and blocks the rest of the row, and a later save says "Saved" #514

Closed

Description

@richshaw

What happens

On the Build tab, if the server refuses a value typed into a slot, the builder keeps showing it, and every later edit to that row fails too.

  • Example trigger: pasting more than 200 characters into a text cell. Builder text fields are created with maxLength 200 (InlineFieldForm.tsx), but the slot editor's input (SlotEditor.tsx, FIELD_VALUE_INPUTS.text in fieldTypes.ts) has no maxLength. A date before the earliest allowed year is another trigger: the min attribute doesn't stop typing.
  • editCell in src/components/build-shared/useBuildState.ts updates the row optimistically, then saves. On failure withSave only marks an error; nothing rolls the cell back.
  • saveRowValues PATCHes every value in the row, and updateSlot checks them all. So once one value is bad, an edit to any other field in that row is refused too.
  • setCapacity sends only { capacity }, so it succeeds and the rail switches to Saved, hiding the earlier error.

The result: the organizer sees their edits on screen and "Saved" on the rail, but after a reload the bad value and the other edits made after it are gone.

The sibling renameGroup, in the same file, already does it right: it puts each refused row back to its old value.

Fix, in outline

  • In editCell, when the save fails, put the row back to its last server-accepted values (track them per row, or refetch the slot), as renameGroup does. Then one bad value can't block the rest of the row.
  • Give the text input maxLength from the field's config.maxLength in SlotEditor and the text group header, so the usual trigger can't be typed at all.

Watch for

Done when

  • A hook test: a refused editCell puts the old value back; a following edit to another field in the row saves; status is error until something actually saves.
  • The text input in the slot editor stops at the field's maxLength.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test pass.

Found by the pipeline's bugs scout in the builder (src/components/build-shared, build-wysiwyg), at 82a180f. Checked by a hook test with a fetch mock that refuses values over 200 characters: the bad value stayed, the next edit in the row was refused, and a capacity change then reported saved. https://claude.ai/code/session_014HtUS4AnW9zrtSroCVsxmB

Activity

  1. added
    bug
    pipeline:ux
    pipeline:working
    and removed
    pipeline:working
    on Oct 20, 2026
  2. removed
    pipeline:ux
    on Oct 23, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions