Conversation
…-added Fixed imageview not displaying in app banner.
…isplayed-when-action-url-is-added
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="CleverPush/Source/CPAspectKeepImageView.m">
<violation number="1" location="CleverPush/Source/CPAspectKeepImageView.m:123">
P2: The code writes to the shared image cache but does not check it before initiating a download. This results in redundant network requests for images that are already cached. Add a cache lookup at the start of the method.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…-added Fixed imageview not displaying in app banner.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="CleverPush/Source/CPAspectKeepImageView.m">
<violation number="1" location="CleverPush/Source/CPAspectKeepImageView.m:94">
P2: The async block applies the cached image without checking if the `currentImageURL` has changed. If `setImageWithURL:` is called again with a different URL before this block executes (e.g., during rapid scrolling), the stale cached image will overwrite the correct image or placeholder.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…-added Fixed imageview not displaying in app banner.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="CleverPush/Source/CPAspectKeepImageView.m">
<violation number="1" location="CleverPush/Source/CPAspectKeepImageView.m:95">
P2: This logic relies on `currentImageURL` being up-to-date to filter stale cached images. However, `setImageWithURL:` does not clear `currentImageURL` when passed `nil`. If `setImageWithURL:nil` is called to clear the image (cancel loading), a pending cached image could still be applied because `currentImageURL` would match the old URL.
Consider updating `setImageWithURL:` to set `currentImageURL` to `nil` when `imageURL` is `nil` to handle cancellation correctly.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
…-added Fixed imageview not displaying in app banner.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="CleverPush/Source/CPBannerCardContainer.m">
<violation number="1" location="CleverPush/Source/CPBannerCardContainer.m:276">
P2: Use `url.absoluteString` for the cache key to ensure consistency with `CPAspectKeepImageView`. Also, restore the synchronous image assignment for cached images to prevent a visible flash while waiting for the asynchronous `setImageWithURL` callback.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…-added Fixed imageview not displaying in app banner.
Fixed imageview not displaying in app banner.
Note
Medium Risk
Touches async image loading and banner layout sizing; mistakes could lead to stale/incorrect images in reused views or height regressions, but scope is limited to app banner UI.
Overview
Fixes app banner image blocks intermittently not rendering by hardening image loading and layout updates.
CPAspectKeepImageViewnow tracks the current requested URL, serves images fromCPUtils.sharedImageCachewhen available, avoids invoking callbacks/logging for cancelled/stale requests, and clears image state when URL is nil.CPBannerCardContainernormalizes/validates image URLs before loading, ensures activity indicators and layout refresh happen consistently (including abeginUpdates/endUpdateswhen a newly-downloaded image arrives), and clamps computed banner/table heights to non-negative values to prevent invalid constraints.Written by Cursor Bugbot for commit e9f1d7d. This will update automatically on new commits. Configure here.
Summary by cubic
Fixes banner image not displaying when an action URL is added (CP-10763). Adds safe image loading with URL validation and caching, and ensures layout/height updates render the image reliably.
Written for commit e9f1d7d. Summary will update on new commits.