{"record":{"id":"d1e8bf5aef2d94f7","repo":"nextlevelbuilder/ui-ux-pro-max-skill","slug":"unknown-or-missing-style-status-status-emp","errorCode":null,"errorMessage":"Unknown or missing style status: ${status || \"<empty>\"}","messagePattern":"Unknown or missing style status: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"gallery/lib/parseStyles.ts","lineNumber":84,"sourceCode":"  const lines = splitCSVRecords(csvContent);\n  if (lines.length < 2) return [];\n\n  const headers = parseCSVLine(lines[0]);\n  const column = new Map(headers.map((header, index) => [header, index]));\n  const value = (fields: string[], header: string): string => {\n    const index = column.get(header);\n    return index === undefined ? \"\" : fields[index] || \"\";\n  };\n\n  const dataLines = lines.slice(1);\n  return dataLines.map((line) => {\n    const f = parseCSVLine(line);\n    const primaryColors = value(f, \"Primary Colors\");\n    const secondaryColors = value(f, \"Secondary Colors\");\n    const cssTechnicalKeywords = value(f, \"CSS/Technical Keywords\");\n    const status = value(f, \"Status\");\n    if (!([\"active\", \"supplemental\", \"deprecated\"] as string[]).includes(status)) {\n      throw new Error(`Unknown or missing style status: ${status || \"<empty>\"}`);\n    }\n\n    return {\n      no: parseInt(value(f, \"No\")) || 0,\n      styleId: value(f, \"Style ID\"),\n      styleCategory: value(f, \"Style Category\"),\n      aliases: value(f, \"Aliases\").split(\"|\").map((alias) => alias.trim()).filter(Boolean),\n      status: status as StyleData[\"status\"],\n      parentStyleId: value(f, \"Parent Style ID\"),\n      replacementDomain: value(f, \"Replacement Domain\"),\n      replacementId: value(f, \"Replacement ID\"),\n      preferredMode: (value(f, \"Preferred Mode\") || \"auto\") as StyleData[\"preferredMode\"],\n      type: value(f, \"Type\"),\n      keywords: value(f, \"Keywords\"),\n      primaryColors,\n      secondaryColors,\n      effectsAnimation: value(f, \"Effects & Animation\"),\n      bestFor: value(f, \"Best For\"),","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/blob/a38d04c3d5c298c851dbe5e6ee1965ee3de42cb5/gallery/lib/parseStyles.ts#L66-L102","documentation":"parseStylesCSV() requires every row of styles.csv to carry a Status column whose value is exactly 'active', 'supplemental', or 'deprecated'. Any other value — including an empty string, shown as '<empty>' — aborts parsing of the whole catalog. This is a strict data-contract check so downstream filtering by status can rely on the enum.","triggerScenarios":"A styles.csv row with Status left blank, a value like 'Active' (capitalized), 'retired', 'experimental', or a row shifted by an extra comma so Status lands on the wrong column; header renamed so value() returns '' because 'Status' isn't found.","commonSituations":"Adding a new style row and forgetting the Status column; spreadsheet round-trips that capitalize or localize values; column insertions that shift all fields one to the right; syncing from a stale upstream CSV that predates the Status column.","solutions":["Inspect the failing row (message shows the bad value) and set Status to active, supplemental, or deprecated exactly, lowercase.","Check the header row still contains a column literally named 'Status' at the right offset.","Count commas in the failing line — an extra/missing comma shifts Status into another field.","Re-sync from src/ui-ux-pro-max/data/styles.csv (`cd cli && npm run sync:assets`) if the gallery copy drifted."],"exampleFix":"# before\nnew-style,Minimal Dark,,,\n# after\nnew-style,Minimal Dark,,,active","handlingStrategy":"validation","validationCode":"const VALID_STATUSES = new Set(['active', 'supplemental', 'deprecated']);\n\n// check header before parsing any rows\nconst headers = parseCSVLine(lines[0]);\nconst statusIdx = headers.indexOf('Status');\nif (statusIdx === -1) {\n  throw new Error('styles.csv is missing the Status column header');\n}\n\nfunction rowHasValidStatus(fields: string[]): boolean {\n  return VALID_STATUSES.has((fields[statusIdx] || '').trim());\n}","typeGuard":"function isStyleStatus(v: string): v is 'active' | 'supplemental' | 'deprecated' {\n  return v === 'active' || v === 'supplemental' || v === 'deprecated';\n}","tryCatchPattern":null,"preventionTips":["Treat Status as a required enum when authoring rows; templates should prefill 'active'.","Validate CSV field counts and status enums in CI before the gallery build.","After inserting columns, re-verify header order and per-row comma count."],"tags":["csv","validation","gallery","data-contract"],"backgroundTag":null,"analyzedSha":"a38d04c3d5c298c851dbe5e6ee1965ee3de42cb5","analyzedAt":"2026-08-14T18:51:02.321Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}