You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A refused cell edit in the builder stays on screen and blocks the rest of the row, and a later save says "Saved" #514
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
Debounced saves: rolling back mustn't undo a newer edit the organizer made to the same cell while the refused save was in flight.
The issue about Duplicate failing on Number fields (filed alongside this one) touches saveRowValues too.
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.
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
Merge main into claude/issue-514-refused-cell-rollback