Skip to content

Extract MigrationDeveloperPlatformClient interface#8109

Open
isaacroldan wants to merge 2 commits into
mainfrom
partners-cleanup/01-extract-migration-interface
Open

Extract MigrationDeveloperPlatformClient interface#8109
isaacroldan wants to merge 2 commits into
mainfrom
partners-cleanup/01-extract-migration-interface

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PartnersClient cleanup — 1 of 3. Type-only prep; no behavior change.

WHY are these changes introduced?

PartnersClient is only used in production to run the three legacy extension migrations (Flow, app module, UI extension), yet it implements the full DeveloperPlatformClient. Before it can be reduced to a migration-only client (later in the stack), the type surface has to allow a client that implements just the migration slice.

WHAT is this pull request doing?

  • Extract a narrow MigrationDeveloperPlatformClient interface (the three migrate* methods) and retype the migration call sites (migrate-flow-extension, migrate-app-module, migrate-to-ui-extension, deploy-app-version-migrations) to it.
  • Remove the three migrate* methods from DeveloperPlatformClient; AppManagementClient drops its three matching "Not implemented" stubs.
  • Narrow createUnauthorizedHandler to a TokenRefreshableClient = Pick<DeveloperPlatformClient, 'session' | 'unsafeRefreshToken'>, so a client that no longer implements the full interface can still refresh tokens.

No runtime behavior changes — this only reshapes types.

How to test your changes?

Type-only refactor. pnpm nx type-check app and the existing test suite pass; nothing changes at runtime.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

First step of the PartnersClient cleanup. The legacy extension migrations
(Flow, app module, UI extension) are the only production use of PartnersClient.
Extract a narrow MigrationDeveloperPlatformClient interface and retype the
migration call sites to it, so PartnersClient no longer needs the full
DeveloperPlatformClient surface. AppManagementClient drops its three
"Not implemented" migrate stubs. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

isaacroldan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Second step of the PartnersClient cleanup. createUnauthorizedHandler only uses a small slice of a developer platform client (session and unsafeRefreshToken), but was typed against the whole DeveloperPlatformClient. Narrow it to the minimal Pick subset it consumes so a client that no longer implements the full interface can still be passed. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@isaacroldan
isaacroldan marked this pull request as ready for review July 16, 2026 15:44
@isaacroldan
isaacroldan requested a review from a team as a code owner July 16, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant