nextlevelbuilder/ui-ux-pro-max-skill · error · Error

Unknown or missing style status: ${status || "<empty>"}

Error message

Unknown or missing style status: ${status || "<empty>"}

What it means

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.

Source

Thrown at gallery/lib/parseStyles.ts:84

  const lines = splitCSVRecords(csvContent);
  if (lines.length < 2) return [];

  const headers = parseCSVLine(lines[0]);
  const column = new Map(headers.map((header, index) => [header, index]));
  const value = (fields: string[], header: string): string => {
    const index = column.get(header);
    return index === undefined ? "" : fields[index] || "";
  };

  const dataLines = lines.slice(1);
  return dataLines.map((line) => {
    const f = parseCSVLine(line);
    const primaryColors = value(f, "Primary Colors");
    const secondaryColors = value(f, "Secondary Colors");
    const cssTechnicalKeywords = value(f, "CSS/Technical Keywords");
    const status = value(f, "Status");
    if (!(["active", "supplemental", "deprecated"] as string[]).includes(status)) {
      throw new Error(`Unknown or missing style status: ${status || "<empty>"}`);
    }

    return {
      no: parseInt(value(f, "No")) || 0,
      styleId: value(f, "Style ID"),
      styleCategory: value(f, "Style Category"),
      aliases: value(f, "Aliases").split("|").map((alias) => alias.trim()).filter(Boolean),
      status: status as StyleData["status"],
      parentStyleId: value(f, "Parent Style ID"),
      replacementDomain: value(f, "Replacement Domain"),
      replacementId: value(f, "Replacement ID"),
      preferredMode: (value(f, "Preferred Mode") || "auto") as StyleData["preferredMode"],
      type: value(f, "Type"),
      keywords: value(f, "Keywords"),
      primaryColors,
      secondaryColors,
      effectsAnimation: value(f, "Effects & Animation"),
      bestFor: value(f, "Best For"),

View on GitHub (pinned to a38d04c3d5)

Solutions

  1. Inspect the failing row (message shows the bad value) and set Status to active, supplemental, or deprecated exactly, lowercase.
  2. Check the header row still contains a column literally named 'Status' at the right offset.
  3. Count commas in the failing line — an extra/missing comma shifts Status into another field.
  4. Re-sync from src/ui-ux-pro-max/data/styles.csv (`cd cli && npm run sync:assets`) if the gallery copy drifted.

Example fix

# before
new-style,Minimal Dark,,,
# after
new-style,Minimal Dark,,,active
Defensive patterns

Strategy: validation

Validate before calling

const VALID_STATUSES = new Set(['active', 'supplemental', 'deprecated']);

// check header before parsing any rows
const headers = parseCSVLine(lines[0]);
const statusIdx = headers.indexOf('Status');
if (statusIdx === -1) {
  throw new Error('styles.csv is missing the Status column header');
}

function rowHasValidStatus(fields: string[]): boolean {
  return VALID_STATUSES.has((fields[statusIdx] || '').trim());
}

Type guard

function isStyleStatus(v: string): v is 'active' | 'supplemental' | 'deprecated' {
  return v === 'active' || v === 'supplemental' || v === 'deprecated';
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14). Data as JSON: /api/errors/d1e8bf5aef2d94f7. Report an issue: GitHub.