Fix mobile Results layout and review fallbacks - #47
Conversation
Greptile SummaryThis PR adjusts mobile Results presentation and review payload fallback handling.
Confidence Score: 3/5The PR should not merge until non-empty malformed review objects can no longer shadow a valid fallback review. The new selection predicate treats every object with a key as valid, so a metadata-only or otherwise malformed Files Needing Attention: src/reviewPresentation.js, src/reviewPresentation.test.js Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
src/reviewPresentation.js:274
**Malformed objects block valid reviews**
When `bundleReview` is a non-empty malformed object such as `{ metadata: {} }`, this predicate selects it solely because it has a key and never reaches a valid `overallReview`, causing the valid score, summary, and findings to be omitted or replaced with fallback presentation values.
Reviews (1): Last reviewed commit: "fix: handle mobile results and review fa..." | Re-trigger Greptile |
| root.review, | ||
| ] | ||
| .map(toObject) | ||
| .find((candidate) => Object.keys(candidate).length) || {}; |
There was a problem hiding this comment.
Malformed objects block valid reviews
When bundleReview is a non-empty malformed object such as { metadata: {} }, this predicate selects it solely because it has a key and never reaches a valid overallReview, causing the valid score, summary, and findings to be omitted or replaced with fallback presentation values.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/reviewPresentation.js
Line: 274
Comment:
**Malformed objects block valid reviews**
When `bundleReview` is a non-empty malformed object such as `{ metadata: {} }`, this predicate selects it solely because it has a key and never reaches a valid `overallReview`, causing the valid score, summary, and findings to be omitted or replaced with fallback presentation values.
How can I resolve this? If you propose a fix, please make it concise.
Summary
bundleReviewvalues when a validoverallReviewis availableVerification
npm test(78 passed)npm run buildgit diff --check