Skip to content

Extract FlagImageResolver for adaptive-pricing flag images#13401

Merged
jaynewstrom-stripe merged 1 commit into
masterfrom
jaynewstrom/checkout-flag-image-resolver
Jul 10, 2026
Merged

Extract FlagImageResolver for adaptive-pricing flag images#13401
jaynewstrom-stripe merged 1 commit into
masterfrom
jaynewstrom/checkout-flag-image-resolver

Conversation

@jaynewstrom-stripe

Copy link
Copy Markdown
Collaborator

Extract the adaptive-pricing flag-image resolution out of a standalone resolver so it can be reused and injected, and make FlagImageRepository DI-constructable via an @Inject constructor and a @DisplayDensity qualifier. FlagImageResolver caches images across mutations, reusing them when the integration and local currencies are unchanged and reporting AdaptivePricingFlagImageLoadFailed analytics on download failures.

Committed-By-Agent: claude

Summary

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

Extract the adaptive-pricing flag-image resolution out of a standalone
resolver so it can be reused and injected, and make FlagImageRepository
DI-constructable via an @Inject constructor and a @DisplayDensity
qualifier. FlagImageResolver caches images across mutations, reusing them
when the integration and local currencies are unchanged and reporting
AdaptivePricingFlagImageLoadFailed analytics on download failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
@jaynewstrom-stripe jaynewstrom-stripe force-pushed the jaynewstrom/checkout-flag-image-resolver branch from 4d7f254 to d0951d6 Compare July 10, 2026 21:14
cached = internalState.flagImages,
)
internalState = internalState
.copy(checkoutSessionResponse = response, flagImages = flagImages)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is technically new behavior. It should never really be triggered. But I want this in the new checkout controller. And it was easier to introduce it here than in one massive PR for checkout controller.

@jaynewstrom-stripe jaynewstrom-stripe marked this pull request as ready for review July 10, 2026 21:27
@jaynewstrom-stripe jaynewstrom-stripe requested review from a team as code owners July 10, 2026 21:27
@jaynewstrom-stripe jaynewstrom-stripe merged commit 0a33f59 into master Jul 10, 2026
51 checks passed
@jaynewstrom-stripe jaynewstrom-stripe deleted the jaynewstrom/checkout-flag-image-resolver branch July 10, 2026 21:52
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