Feat/error messages parser - #12
Merged
Merged
Conversation
…type errors The "Unknown component type" error now suggests the closest match using normalized comparison and Levenshtein distance, and always lists all valid types (including custom schemas). This helps users quickly fix typos like "frm" → "form" or separator mismatches like "approval_gate" → "approval-gate". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…render only 1 instead 3
memorte03
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Improves parser and validator error messages, adds new validation rules, and refactors the validator demo for clarity. The main changes:
expected-componentsrule — Verifies the LLM generated the expected components with correct types, form fields, table columns, and action references. Only checks components present in the current message, making it safe for multi-turn flows.type:and nearbyid:to flag unfenced MDMA YAML, reducing false positives on documentation text.binding-resolutionandunreferenced-componentssince components and their bindings are never in the same message.ValidatorView.tsx(715 lines) into 8 focused files undervalidator/directory.---stripping, multi-component split), all new rules, and the thinking block auto-fix.Type of Change
Packages Affected
@mobile-reality/mdma-validatorChecklist
pnpm formatandpnpm lintpass).pnpm test).pnpm typecheck).pnpm changeset) if this change affects published packages.sensitive: truewhere appropriate.How to Test
pnpm test— 190 tests should pass across parser and validatorpnpm build --filter=@mobile-reality/mdma-validator && pnpm build --filter=@mobile-reality/mdma-cli