{"record":{"id":"b5205ea26e30eea8","repo":"chenhg5/cc-connect","slug":"config-s-mode-must-be-full-compact-or-qui","errorCode":null,"errorMessage":"config: %s.mode must be \"full\", \"compact\", or \"quiet\"","messagePattern":"config: (.+?)\\.mode must be \"full\", \"compact\", or \"quiet\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/config.go","lineNumber":1083,"sourceCode":"\t\tif err := validateUsersConfig(prefix, proj.Users); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := validateDisplayConfig(prefix+\".display\", proj.Display); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validateDisplayConfig(prefix string, display *DisplayConfig) error {\n\tif display == nil {\n\t\treturn nil\n\t}\n\tif display.Mode != nil {\n\t\tswitch *display.Mode {\n\t\tcase DisplayModeFull, DisplayModeCompact, DisplayModeQuiet:\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"config: %s.mode must be \\\"full\\\", \\\"compact\\\", or \\\"quiet\\\"\", prefix)\n\t\t}\n\t}\n\tif display.CardMode != nil {\n\t\tswitch strings.ToLower(strings.TrimSpace(*display.CardMode)) {\n\t\tcase \"legacy\", \"rich\":\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"config: %s.card_mode must be \\\"legacy\\\" or \\\"rich\\\"\", prefix)\n\t\t}\n\t}\n\tif display.HistoryMaxLen != nil && *display.HistoryMaxLen < 0 {\n\t\treturn fmt.Errorf(\"config: %s.history_max_len must be >= 0\", prefix)\n\t}\n\treturn nil\n}\n\nvar supportedReferenceAgents = map[string]struct{}{\n\t\"all\":        {},\n\t\"codex\":      {},","sourceCodeStart":1065,"sourceCodeEnd":1101,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/config/config.go#L1065-L1101","documentation":"CC-Connect validates each project's display settings at config load time. When `[projects.display].mode` is set to a string other than \"full\", \"compact\", or \"quiet\", validateDisplayConfig rejects the whole config. The error names the exact TOML path via the prefix (e.g. `config: projects.myapp.display.mode must be ...`).","triggerScenarios":"Loading config.toml where a project's `[projects.*.display] mode` value is any string other than the three accepted display modes — e.g. a typo like mode = \"minimal\", \"verbose\", or \"Full\" with wrong casing (mode is compared exactly, not case-insensitively).","commonSituations":"Copy-pasting display config from docs of another tool; guessing mode names like \"silent\" instead of \"quiet\"; hand-editing config after a version change; leaving uppercase or trailing whitespace (this field is not trimmed, unlike card_mode).","solutions":["Set mode to exactly one of \"full\", \"compact\", or \"quiet\" in the project's display section","Check casing: the value must be lowercase exactly; use \"quiet\", not \"Quiet\" or \"QUIET\"","Remove the mode line entirely if you want the default instead of an explicit value"],"exampleFix":"# before\n[[projects]]\n[projects.display]\nmode = \"minimal\"\n\n# after\n[[projects]]\n[projects.display]\nmode = \"compact\"","handlingStrategy":"validation","validationCode":"validModes := map[string]bool{\"full\": true, \"compact\": true, \"quiet\": true}\nif cfg.Projects[i].Display != nil && cfg.Projects[i].Display.Mode != nil && !validModes[*cfg.Projects[i].Display.Mode] {\n    return fmt.Errorf(\"project %d: display.mode %q is not one of full|compact|quiet\", i, *cfg.Projects[i].Display.Mode)\n}","typeGuard":"func isValidDisplayMode(m string) bool { return m == \"full\" || m == \"compact\" || m == \"quiet\" }","tryCatchPattern":null,"preventionTips":["Copy mode values from config.example.toml, never type them from memory","Validate config with `cc-connect doctor` or a config-test subcommand before restarting the daemon","Remember mode is compared exactly (case-sensitive) unlike card_mode"],"tags":["config","validation","toml"],"backgroundTag":"invalid-enum-value","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}