refactor(console): reland oapiClient view-layer migration (supersedes #241)#269
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-base1683f7e0).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.tsxconsole/src/components/media-manager/MediaManager.tsxconsole/src/lib/path-suggestions.tsconsole/src/validation/settings/api-key-dialog.tsconsole/src/views/campaign/CampaignVariableContext.tsxconsole/src/views/campaign/template/mail/editor/hooks/useSendTestEmail.tsconsole/src/views/campaign/template/text/useSendTestSMS.tsconsole/src/views/journey/JourneyUserSelectionModal.tsxconsole/src/views/journey/JourneyVariableContext.tsxconsole/src/views/project/GettingStarted.tsxconsole/src/views/project/ProjectOnboardingGettingStarted.tsxconsole/src/views/project/ProjectOnboardingIntegration.tsxconsole/src/views/project/ProjectOnboardingUsers.tsxconsole/src/views/project/Projects.tsxconsole/src/views/settings/EventSchemas.tsxconsole/src/views/settings/Locales.tsxconsole/src/views/settings/ProjectSettings.tsxconsole/src/views/users/UserDetailJourneys.tsxconsole/src/views/users/UserDetailSubscriptions.tsxconsole/src/views/users/rules/RuleBuilder.tsxVerification
Verified tsc-clean against main's baseline:
origin/main,tsc -p tsconfig.app.json --noEmit): 125 pre-existing errors.MediaManager.tsxSearchResult<Image>.data).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.tsand the generated OpenAPI symbols). On main's legacytypes.ts, #241's casts/assignments toTemplate/User/Journey/Campaign/List/Project/JourneyStepMapno longer overlap, producing newTS2352/TS2322/TS2345errors. 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.tsxconsole/src/views/campaign/template/Content.tsxconsole/src/views/campaign/template/Review.tsxconsole/src/views/campaign/template/Template.tsxconsole/src/views/campaign/template/UserSelection.tsxconsole/src/views/campaign/template/mail/editor/hooks/useTemplatePersistence.tsconsole/src/views/journey/components/JourneyEditorToolbar.tsxconsole/src/views/journey/editor/JourneyEditor.tsxconsole/src/views/journey/hooks/useJourneyPersistence.tsconsole/src/views/journey/steps/Campaign.tsxconsole/src/views/users/ListDetail.tsxconsole/src/views/users/UserLookup.tsxSupersedes #241.