BigPizzaV3/CodexPlusPlus · error · anyhow::Error

invalid Dream Skin style preset

Error message

invalid Dream Skin style preset

What it means

Validation guard in validate_theme_draft: style_preset, when provided, must pass valid_theme_id (1-64 chars, starting alphanumeric, only lowercase letters/digits/'-'/'_'). Fires on a preset name that is malformed or not a registered preset identifier; empty string is allowed (means no preset).

Source

Thrown at crates/codex-plus-core/src/dream_skin_library.rs:524

    }
    remove_known_theme_directory(&directory)
}

fn validate_theme_draft(draft: &DreamSkinThemeDraft) -> anyhow::Result<()> {
    if draft.builtin {
        bail!("built-in Dream Skin theme is read-only");
    }
    if !valid_theme_id(&draft.config.id) {
        bail!("invalid Dream Skin theme id");
    }
    if draft.config.schema_version != 1 {
        bail!("unsupported Dream Skin theme schema");
    }
    if draft.config.name.trim().is_empty() {
        bail!("Dream Skin theme name is empty");
    }
    if !draft.config.style_preset.is_empty() && !valid_theme_id(&draft.config.style_preset) {
        bail!("invalid Dream Skin style preset");
    }
    if let Some(colors) = &draft.config.colors {
        for color in [
            &colors.background,
            &colors.panel,
            &colors.panel_alt,
            &colors.accent,
            &colors.accent_alt,
            &colors.secondary,
            &colors.highlight,
            &colors.text,
            &colors.muted,
            &colors.line,
        ] {
            if !valid_css_color(color) {
                bail!("invalid Dream Skin theme color: {color}");
            }
        }

View on GitHub (pinned to f2074595a2)

Solutions

  1. Use one of the recognized style preset ids
  2. Clear style_preset to empty string if no preset is intended
  3. Fix the preset id to match the [a-z0-9_-] id format
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/codex-plus-core/src/dream_skin_library.rs:524 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/94c66d7f5c0bae93. Report an issue: GitHub.