Skip to content

hotfix/cp-10763-banner-image-element-not-displayed-when-action-url-is-added#360

Merged
gbhrdt-cp merged 6 commits intomasterfrom
hotfix/cp-10763-banner-image-element-not-displayed-when-action-url-is-added
Feb 16, 2026
Merged

hotfix/cp-10763-banner-image-element-not-displayed-when-action-url-is-added#360
gbhrdt-cp merged 6 commits intomasterfrom
hotfix/cp-10763-banner-image-element-not-displayed-when-action-url-is-added

Conversation

@cpandya25
Copy link
Copy Markdown
Contributor

@cpandya25 cpandya25 commented Feb 4, 2026

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.

CPAspectKeepImageView now tracks the current requested URL, serves images from CPUtils.sharedImageCache when available, avoids invoking callbacks/logging for cancelled/stale requests, and clears image state when URL is nil.

CPBannerCardContainer normalizes/validates image URLs before loading, ensures activity indicators and layout refresh happen consistently (including a beginUpdates/endUpdates when 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.

  • Bug Fixes
    • Normalize and validate image URLs; skip invalid/empty values and bad URLs.
    • Track the current image URL to prevent stale responses from overwriting the image; handle cancelled requests.
    • Use shared image cache before network; update image and layout without animation; stop the activity indicator on completion.
    • Clamp banner height to non-negative and adjust for carousel/close button; refresh table layout to display the image.

Written for commit e9f1d7d. Summary will update on new commits.

cpandya25 added 2 commits February 4, 2026 20:41
…-added

Fixed imageview not displaying in app banner.
Comment thread CleverPush/Source/CPAspectKeepImageView.m
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread CleverPush/Source/CPAspectKeepImageView.m
…-added

Fixed imageview not displaying in app banner.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread CleverPush/Source/CPAspectKeepImageView.m
Comment thread CleverPush/Source/CPAspectKeepImageView.m
…-added

Fixed imageview not displaying in app banner.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread CleverPush/Source/CPAspectKeepImageView.m
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread CleverPush/Source/CPBannerCardContainer.m
…-added

Fixed imageview not displaying in app banner.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread CleverPush/Source/CPBannerCardContainer.m Outdated
…-added

Fixed imageview not displaying in app banner.
@gbhrdt-cp gbhrdt-cp merged commit 12d72dd into master Feb 16, 2026
5 checks passed
@gbhrdt-cp gbhrdt-cp deleted the hotfix/cp-10763-banner-image-element-not-displayed-when-action-url-is-added branch February 16, 2026 14:24
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.

2 participants