Surface quality warnings and warning analytics#36
Conversation
✅ Deploy Preview for launchpix ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cae5df8e1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const zip = new JSZip(); | ||
| const renderSources: Record<string, number> = {}; | ||
| const qualityFailures: Array<{ assetType: string; issues: string[] }> = []; | ||
| const qualityWarnings: QualityFailureDetail[] = []; |
There was a problem hiding this comment.
Define the quality warning detail type
qualityWarnings is annotated with QualityFailureDetail, but that type is not declared or imported anywhere in the repo, so this commit breaks the TypeScript build; I confirmed npm run typecheck fails with TS2304: Cannot find name 'QualityFailureDetail'. Add a local type/interface or import the intended quality issue type before using it here.
Useful? React with 👍 / 👎.
| const metadata = asset.metadata_json as { quality_report?: { issues?: Array<{ severity?: string; message?: string }> } } | null; | ||
| const issues = metadata?.quality_report?.issues || []; |
There was a problem hiding this comment.
Recompute warnings after asset rerenders
When a user fixes a warning by saving new copy and rerendering the asset, this display still reads the original metadata_json.quality_report; the rerender endpoint updates editable, render_source, and rerendered_at but preserves the old quality_report, so resolved warnings such as hero_headline_too_short continue to be shown after reload. Either recompute/clear the report during rerender or derive warnings from the current editable metadata before surfacing them here.
Useful? React with 👍 / 👎.
Summary
Verification