Skip to content

Introduce CheckoutController Builder, DI component, and scoped destroy()#13402

Merged
jaynewstrom-stripe merged 1 commit into
masterfrom
jaynewstrom/checkoutcontroller-builder-scaffolding
Jul 10, 2026
Merged

Introduce CheckoutController Builder, DI component, and scoped destroy()#13402
jaynewstrom-stripe merged 1 commit into
masterfrom
jaynewstrom/checkoutcontroller-builder-scaffolding

Conversation

@jaynewstrom-stripe

@jaynewstrom-stripe jaynewstrom-stripe commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Wire CheckoutController through a Dagger component so it can be constructed via a Builder. Inject a @ViewModelScope CoroutineScope and cancel it in destroy(). No state-holder or loading behavior is included.

This is ultimately how merchants will create their checkout controller.

Wire CheckoutController through a Dagger component so it can be constructed
via a Builder. Inject a @ViewModelScope CoroutineScope and cancel it in
destroy(). No state-holder or loading behavior is included.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
@jaynewstrom-stripe jaynewstrom-stripe marked this pull request as ready for review July 10, 2026 21:18
@jaynewstrom-stripe jaynewstrom-stripe requested review from a team as code owners July 10, 2026 21:18
import javax.inject.Inject
import javax.inject.Singleton

@Singleton

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why is this a singleton? I thought we could have multiple checkout controller instances for different checkout sessions: https://stripe.slack.com/archives/C0B9H95FK6F/p1783625928531009?thread_ts=1783616873.322879&cid=C0B9H95FK6F

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.

Singleton in the dagger graph. No an actual singleton concept. We'll still support multiple controller instances with this.

@jaynewstrom-stripe jaynewstrom-stripe merged commit cc67eea into master Jul 10, 2026
53 checks passed
@jaynewstrom-stripe jaynewstrom-stripe deleted the jaynewstrom/checkoutcontroller-builder-scaffolding branch July 10, 2026 21:42
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