Skip to content

refactor(console): reland oapiClient view-layer migration (supersedes #241)#269

Merged
jeroenrinzema merged 1 commit into
mainfrom
feat/console-oapi-view-migration
Jun 24, 2026
Merged

refactor(console): reland oapiClient view-layer migration (supersedes #241)#269
jeroenrinzema merged 1 commit into
mainfrom
feat/console-oapi-view-migration

Conversation

@jeroenrinzema

Copy link
Copy Markdown
Contributor

Summary

This relands the salvageable part of #241. Most of #241's diff already landed on main via other PRs; merging #241 as-is would revert main's Access/clients feature and resurrect deleted files. The genuinely useful net delta is the view-layer migration from the legacy API client to the generated OpenAPI client (oapiClient) on files that main has not touched since #241 forked (merge-base 1683f7e0).

For those files, taking #241's version applies only the client migration with zero conflict. This PR relands exactly that subset.

Files relanded (20)

These were migrated only by #241; main still runs them on the legacy client:

  • console/src/components/locale/select.tsx
  • console/src/components/media-manager/MediaManager.tsx
  • console/src/lib/path-suggestions.ts
  • console/src/validation/settings/api-key-dialog.ts
  • console/src/views/campaign/CampaignVariableContext.tsx
  • console/src/views/campaign/template/mail/editor/hooks/useSendTestEmail.ts
  • console/src/views/campaign/template/text/useSendTestSMS.ts
  • console/src/views/journey/JourneyUserSelectionModal.tsx
  • console/src/views/journey/JourneyVariableContext.tsx
  • console/src/views/project/GettingStarted.tsx
  • console/src/views/project/ProjectOnboardingGettingStarted.tsx
  • console/src/views/project/ProjectOnboardingIntegration.tsx
  • console/src/views/project/ProjectOnboardingUsers.tsx
  • console/src/views/project/Projects.tsx
  • console/src/views/settings/EventSchemas.tsx
  • console/src/views/settings/Locales.tsx
  • console/src/views/settings/ProjectSettings.tsx
  • console/src/views/users/UserDetailJourneys.tsx
  • console/src/views/users/UserDetailSubscriptions.tsx
  • console/src/views/users/rules/RuleBuilder.tsx

Verification

Verified tsc-clean against main's baseline:

  • Baseline (origin/main, tsc -p tsconfig.app.json --noEmit): 125 pre-existing errors.
  • With this reland: 124 errors. Zero new type errors introduced; this reland actually fixes one pre-existing error (MediaManager.tsx SearchResult<Image>.data).
  • ESLint on the 20 relanded files: clean (no errors, no new warnings).

Files that could NOT be cleanly relanded (dropped, 12)

These were part of #241's view migration but depend on #241's version of deferred/conflict files (notably the migrated console/src/types.ts and the generated OpenAPI symbols). On main's legacy types.ts, #241's casts/assignments to Template / User / Journey / Campaign / List / Project / JourneyStepMap no longer overlap, producing new TS2352/TS2322/TS2345 errors. They were reverted to main's version to keep this PR tsc-clean and need a manual re-migration on top of main:

  • console/src/components/app-sidebar.tsx
  • console/src/views/campaign/template/Content.tsx
  • console/src/views/campaign/template/Review.tsx
  • console/src/views/campaign/template/Template.tsx
  • console/src/views/campaign/template/UserSelection.tsx
  • console/src/views/campaign/template/mail/editor/hooks/useTemplatePersistence.ts
  • console/src/views/journey/components/JourneyEditorToolbar.tsx
  • console/src/views/journey/editor/JourneyEditor.tsx
  • console/src/views/journey/hooks/useJourneyPersistence.ts
  • console/src/views/journey/steps/Campaign.tsx
  • console/src/views/users/ListDetail.tsx
  • console/src/views/users/UserLookup.tsx

Supersedes #241.

…241)

Relands the view-layer files that only PR #241 had migrated from the
legacy API client to the generated OpenAPI client (oapiClient). main has
not touched these files since #241 forked, so applying #241's version
applies only the client migration with no conflict.

Files that #241 and main both changed in parallel are NOT included here;
they need a manual re-migration on top of main and are tracked separately.

Verified tsc-clean: console typecheck (tsc -p tsconfig.app.json --noEmit)
produces zero new type errors versus main's baseline.
@jeroenrinzema jeroenrinzema merged commit ffb25c4 into main Jun 24, 2026
6 checks passed
@jeroenrinzema jeroenrinzema deleted the feat/console-oapi-view-migration branch June 24, 2026 10:38
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.

1 participant