Skip to content

Fix mobile Results layout and review fallbacks - #47

Merged
sgardoll merged 1 commit into
mainfrom
agent/redesign-generation-results
Jul 26, 2026
Merged

Fix mobile Results layout and review fallbacks#47
sgardoll merged 1 commit into
mainfrom
agent/redesign-generation-results

Conversation

@sgardoll

Copy link
Copy Markdown
Owner

Summary

  • hide the full-height prompting sidebar when Results is active at mobile widths so the review starts at the top
  • ignore empty or malformed bundleReview values when a valid overallReview is available
  • add regression coverage for both behaviors

Verification

  • npm test (78 passed)
  • npm run build
  • git diff --check

@sgardoll
sgardoll merged commit c5e8d3c into main Jul 26, 2026
4 checks passed
@sgardoll
sgardoll deleted the agent/redesign-generation-results branch July 26, 2026 01:46
@greptile-apps

greptile-apps Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adjusts mobile Results presentation and review payload fallback handling.

  • Hides the prompting sidebar while Results is active at mobile widths.
  • Selects the first non-empty object among supported overall-review fields.
  • Adds regression tests for the responsive CSS and empty/non-object fallback cases.

Confidence Score: 3/5

The 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 bundleReview can still prevent valid overallReview data from reaching the presentation.

Files Needing Attention: src/reviewPresentation.js, src/reviewPresentation.test.js

Important Files Changed

Filename Overview
index.html Adds a mobile media rule that hides the sidebar while the full-screen Results state is active.
src/resultsLayout.test.js Adds a source-level assertion covering the new mobile sidebar CSS rule.
src/reviewPresentation.js Improves fallback past empty or non-object values, but still lets non-empty malformed objects shadow valid later reviews.
src/reviewPresentation.test.js Covers empty-object and string fallbacks but omits malformed objects containing irrelevant keys.
Prompt To Fix All With AI
Fix 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

Comment thread src/reviewPresentation.js
root.review,
]
.map(toObject)
.find((candidate) => Object.keys(candidate).length) || {};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

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