Skip to content

Bug: slot validation warnings (Levenshtein typo suggestions) silently dropped #163

@qantrepreneur

Description

@qantrepreneur

Bug

When a page provides an unknown slot name (typo), the validation computes Levenshtein-based suggestions (e.g., headr → "Did you mean header?") but these warnings are never surfaced to the developer.

Root cause

render-page.tsx:117-121 runs validateSlots() and checks validation.errors (missing required slots), but ignores validation.warnings entirely:

const validation = validateSlots({ providedSlots, extractedSlots });
if (validation.errors.length > 0) {
    throw new Error(validation.errors.map((e) => e.message).join("; "));
}
// validation.warnings is never read

Expected

In dev mode, warnings should be logged to console. The Levenshtein suggestion is computed but never shown — wasted work.

Reproduction

Create a route with slot name headr (typo for header). Get a generic 500 with "Required slot 'header' is missing" — no mention of the typo or suggestion.

Related

Test issue #156, item 18.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingready-for-reviewPR is up, CI green, needs human review

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions