mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-25 22:10:25 +00:00
46c91b9062
* fix(web): a lane draft whose lane no longer exists moves to Uncategorized, marked, instead of blocking Save all invisibly (BUG-3043) A lane draft is keyed by the lane it was typed in, and nothing tied that key to a lane that still exists. Delete or rename the option, retype the group field, or regroup the board, and the draft's card vanished while its text stayed in the page's map. "Save all" then either sent the dead lane value (the server refused it; the dialog could not complete, blocked by a draft the user could not see) or, where the client refused it first, read the create's null as success and deleted the text behind a toast. Lead ruling, RE-HOME: an orphaned draft shows inside the Uncategorized lane, marked "Moved from <lane>", and saves there. The lane is rendered for it even when no item is in it. Where Uncategorized cannot receive the create (the field omits a blank and a default would fill it, or it is required), the draft is kept, a notice names the lost lane, and Save all is blocked for that reason. Whether Uncategorized can receive it follows the server's validator per field type (laneDrafts.ts header). quickCreateInColumn refuses by throwing, never by returning null, and the Save-all loop (saveAllDrafts) treats a null with the identity held as a failure that keeps the text. Claude-Session: https://claude.ai/code/session_01UcaMsmoCt8u7VpJhCNxiJJ * test(items): pin the validator facts the lane-draft re-home rule mirrors (BUG-3043) draftSaveTarget decides client-side whether Uncategorized can receive a draft's create. It mirrors three facts about ValidateFields: a required select stores '' (required fires only on an absent or nil key, and '' skips the options check), a required multi_select stores [], and an omitted key takes its default or is refused as required. Pinned here so a validator change fails a Go test instead of leaving the mirror wrong in silence. Removing the select's '' exemption turns fact 1 red. Claude-Session: https://claude.ai/code/session_01UcaMsmoCt8u7VpJhCNxiJJ