{"record":{"id":"2aab0cb9ed9c7e32","repo":"charmbracelet/vhs","slug":"windowbar-is-not-a-valid-bar-style","errorCode":null,"errorMessage":"${windowBar} is not a valid bar style.","messagePattern":"(.+?) is not a valid bar style\\.","errorType":"validation","errorClass":"parser.Error","httpStatus":null,"severity":"error","filePath":"parser/parser.go","lineNumber":493,"sourceCode":"\t\tp.nextToken()\n\t\t// Allow TypingSpeed to have bare units (e.g. 10ms)\n\t\t// Set TypingSpeed 10ms\n\t\tif p.peek.Type == token.MILLISECONDS ||\n\t\t\tp.peek.Type == token.SECONDS {\n\t\t\tcmd.Args += p.peek.Literal\n\t\t\tp.nextToken()\n\t\t} else if cmd.Options == \"TypingSpeed\" {\n\t\t\tcmd.Args += \"s\"\n\t\t}\n\tcase token.WINDOW_BAR:\n\t\tcmd.Args = p.peek.Literal\n\t\tp.nextToken()\n\n\t\twindowBar := p.cur.Literal\n\t\tif !isValidWindowBar(windowBar) {\n\t\t\tp.errors = append(\n\t\t\t\tp.errors,\n\t\t\t\tNewError(p.cur, windowBar+\" is not a valid bar style.\"),\n\t\t\t)\n\t\t}\n\tcase token.MARGIN_FILL:\n\t\tcmd.Args = p.peek.Literal\n\t\tp.nextToken()\n\n\t\tmarginFill := p.cur.Literal\n\n\t\t// Check if margin color is a valid hex string\n\t\tif strings.HasPrefix(marginFill, \"#\") {\n\t\t\t_, err := strconv.ParseUint(marginFill[1:], 16, 64)\n\n\t\t\tif err != nil || len(marginFill) != 7 {\n\t\t\t\tp.errors = append(\n\t\t\t\t\tp.errors,\n\t\t\t\t\tNewError(\n\t\t\t\t\t\tp.cur,\n\t\t\t\t\t\t\"\\\"\"+marginFill+\"\\\" is not a valid color.\",","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/charmbracelet/vhs/blob/c073383b5de0b1f57bf514113029c306bc986539/parser/parser.go#L475-L511","documentation":"Fires in parseSet when the value for the WindowBar setting is not one of the styles accepted by isValidWindowBar. The value is still assigned to cmd.Args; only validity checking fails. This is a guard over the fixed set of bar styles (e.g. '' / dot styles supported by ttyd).","triggerScenarios":"Thrown at parser/parser.go:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid bar style such as an empty value, or one of the supported names (e.g. ' ' for space style)","Check the valid style list in the codebase (isValidWindowBar) for accepted values","Remove the WindowBar setting to use the default"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c073383b5de0b1f57bf514113029c306bc986539","analyzedAt":"2026-09-02T01:53:05.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}