Repository navigation
Conversation
The schema refuses a field name over 80 characters, but the box had no limit, so a longer name came back as "Some values weren't accepted." and a new field's name was lost. LABEL_MAX_LENGTH moves to slot-field-basics, which has no zod, so the box and the schema share it; save() also cuts the name to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SRqSkLjZBSL5CUnH6k
Keep both CHANGELOG entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SS5DUGFAwfk5x6sWfw
|
Merged Ran on the merged head: No tophat has run yet, so this goes back to tophat once CI is green. https://claude.ai/code/session_016YZ9SS5DUGFAwfk5x6sWfw Generated by Claude Code |
Tophat: passedSee it: https://claude.ai/artifact/YPZhuzMtgxJKtNkrNUjdmh
Worth a look: the box stops silently, mid-word if it has to ("…and what time will you arrive?" became "…and wha"). It shows no count or hint, unlike the list picker's choices. That's fine for a rare case, but a counter near the limit could be a follow-up. Not checked: a before/after screenshot pair for the rename. The base's refusal was confirmed by its message and the 400, and the add-field pair shows the same thing. Ran 2f5a471 against 96fc00f locally, Chromium at 1280×900 and 390×844, made-up data. https://claude.ai/code/session_016YZ9SV9meXottD7XRQySLX Generated by Claude Code |
Fixes #1149.
Session: https://claude.ai/code/session_016YZ9SRqSkLjZBSL5CUnH6k
The problem
The server refuses a field name over 80 characters (
LABEL_MAX_LENGTH, which was private tosrc/schemas/slot-fields.ts). The Build tab's field-name box had no limit. A longer name was refused with "Some values weren't accepted.", and when adding a field, the typed name was lost along with it, because the Fields popover closes the form before the save returns.The fix
LABEL_MAX_LENGTHmoves tosrc/schemas/slot-field-basics.ts, which has no zod in it, besideMAX_CHOICESandCHOICE_MAX_LENGTH.slot-fields.tsimports it from there forLabelSchema, so the schema's limit is unchanged and Magic Compose'sprompt.tskeeps the sameLabelSchema.InlineFieldForm's name input getsmaxLength={LABEL_MAX_LENGTH}. The same form both adds and renames fields, so this covers both.save()cuts the name to the limit as a safety net, the wayupdateSignupMetacuts the title. It covers a value set some other way, such as by a script.affected-articles.mjsnames no help article.Tests
In
InlineFieldForm.test.tsx, in both create and edit mode:maxLengthequalsLABEL_MAX_LENGTHAll four tests failed before the fix.
Ran and passed:
pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test(3909 passed, 1 expected fail), thenpnpm build && pnpm budgetswith CI'sNEXT_PUBLIC_*values. The Build page measures 152.0 kB against its 152 kB budget, so it is within budget.Generated by Claude Code