Skip to content

feat: surface validation errors and recommendations in the editor#46

Merged
kmturley merged 2 commits into
mainfrom
feature/editor-inline-validation
Jul 20, 2026
Merged

feat: surface validation errors and recommendations in the editor#46
kmturley merged 2 commits into
mainfrom
feature/editor-inline-validation

Conversation

@kmturley

Copy link
Copy Markdown
Member

Summary

The core library already computes rich validation feedback (packageErrors — Zod schema violations — and packageRecommendations — non-blocking suggestions like missing arm64 support), but the site's metadata editor never surfaced it. Authors could submit a package via GitHub with no idea it would fail registry validation, or miss easy improvements.

  • Wires both into Editor, rendering two inline lists below the YAML editor: errors (red) and recommendations (amber).
  • Gated behind a "touched" check: warnings only appear after the user changes a value (editing a field or the YAML directly). A freshly loaded or blank form shows nothing, and loading a different template resets the baseline so its own warnings don't show until edited again.
  • Purely advisory — Copy / Download / Submit via GitHub are unaffected either way, matching how packageErrors/packageRecommendations already behave everywhere else (they don't throw; only Package.addVersion does, server-side).

Test plan

  • npm run lint — clean
  • npm run build — compiles, type-checks, static export succeeds
  • npm test — 1/1 passing
  • Verified via dev server + curl: blank form renders no error/recommendation blocks pre-edit

🤖 Generated with Claude Code

kmturley and others added 2 commits July 19, 2026 22:16
Wire packageErrors/packageRecommendations from @open-audio-stack/core
into the metadata editor as inline warnings, so authors see schema
issues and non-blocking recommendations before submitting.

- Errors and recommendations only appear once the user actually
  changes a value (edits a field or the YAML directly), not on
  initial/blank load, so a freshly loaded form isn't immediately
  flooded with warnings. Loading a different template resets the
  baseline used for this comparison.
- Nothing is blocked - Copy/Download/Submit via GitHub remain usable
  regardless of errors or recommendations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kmturley
kmturley merged commit 4d68ebb into main Jul 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant