{"record":{"id":"7a8863bf1ce9aa55","repo":"gastownhall/beads","slug":"title-must-be-500-characters-or-less","errorCode":null,"errorMessage":"title must be 500 characters or less","messagePattern":"title must be 500 characters or less","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"cmd/bd/create_form.go","lineNumber":287,"sourceCode":"\t\thuh.NewOption(\"P2 - Medium (default)\", \"2\"),\n\t\thuh.NewOption(\"P3 - Low\", \"3\"),\n\t\thuh.NewOption(\"P4 - Backlog\", \"4\"),\n\t}\n\n\t// Build the form\n\tform := huh.NewForm(\n\t\thuh.NewGroup(\n\t\t\thuh.NewInput().\n\t\t\t\tTitle(\"Title\").\n\t\t\t\tDescription(\"Brief summary of the issue (required)\").\n\t\t\t\tPlaceholder(\"e.g., Fix authentication bug in login handler\").\n\t\t\t\tValue(&raw.Title).\n\t\t\t\tValidate(func(s string) error {\n\t\t\t\t\tif strings.TrimSpace(s) == \"\" {\n\t\t\t\t\t\treturn fmt.Errorf(\"title is required\")\n\t\t\t\t\t}\n\t\t\t\t\tif len(s) > 500 {\n\t\t\t\t\t\treturn fmt.Errorf(\"title must be 500 characters or less\")\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t}),\n\n\t\t\thuh.NewText().\n\t\t\t\tTitle(\"Description\").\n\t\t\t\tDescription(\"Detailed context about the issue\").\n\t\t\t\tPlaceholder(\"Explain why this issue exists and what needs to be done...\").\n\t\t\t\tCharLimit(5000).\n\t\t\t\tValue(&raw.Description),\n\n\t\t\thuh.NewSelect[string]().\n\t\t\t\tTitle(\"Type\").\n\t\t\t\tDescription(\"Categorize the kind of work\").\n\t\t\t\tOptions(typeOptions...).\n\t\t\t\tValue(&raw.IssueType),\n\n\t\t\thuh.NewSelect[string]().","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/create_form.go#L269-L305","documentation":"Inline huh form validation error: the Title exceeds 500 characters (len(s) > 500, bytes). The form re-prompts for a shorter title.","triggerScenarios":"Submitting the create-form Title field with a string longer than 500 bytes (note: multi-byte UTF-8 characters count per byte via len).","commonSituations":"Pasting a long commit message or sentence as the title; CJK/emoji titles hitting the byte limit sooner than expected.","solutions":["Shorten the title to under 500 characters","Move detail into the Description field instead of the title","Beware multi-byte characters — byte length, not rune length, is checked"],"exampleFix":"// before\ntitle := \"Fix authentication bug in login handler \" + strings.Repeat(\"detail \", 90)\n// after\ntitle := \"Fix authentication bug in login handler\" // detail goes in Description","handlingStrategy":"validation","validationCode":"if len(title) > 500 { return fmt.Errorf(\"title is %d bytes; must be <= 500\", len(title)) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check byte length (len) of titles containing multi-byte characters","Move long content into Description","Truncate titles programmatically before form submission"],"tags":["validation","form","title","length-limit"],"backgroundTag":"input-length-exceeded","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}