feat(condo): Doma-13376 self service for unified flow - #7879
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR adds combined billing and acquiring onboarding, integration metadata and GraphQL contracts, setup-state tab gating, recipient query updates, related UI and translations, migrations, assets, and subproject revisions. ChangesCombined billing and acquiring setup
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a001497ed6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 10
🧹 Nitpick comments (4)
apps/condo/domains/acquiring/hooks/useIntegrationContexts.ts (1)
18-20: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winSkip the query before
orgIdis available.
AcquiringIntegrationContext.useObjects()passes the second arg directly to Apollo, so add{ skip: !orgId }here instead of sendingorganization: { id: undefined }to the server whileuseOrganization()is still loading.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/condo/domains/acquiring/hooks/useIntegrationContexts.ts` around lines 18 - 20, Update the AcquiringIntegrationContext.useObjects call to pass a second-options argument with skip: !orgId, preventing the query until useOrganization() provides orgId while preserving the existing where filter.apps/condo/domains/billing/components/OnBoarding/SetupAcquiringCombinedFlow.tsx (1)
91-129: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftVerification-gate UI duplicates
SetupAcquiring.tsx.This block (SBBOL verification prompt, constants like
AUTH_BUTTON_GUTTER/CERTIFICATES_INFO_LINK/CONNECT_EMAIL, and the finalB2BAppFramerender) closely mirrors the existing verification UI inSetupAcquiring.tsx(still present per the stack's "Repository pointers and support edits" layer). Consider extracting a sharedVerificationRequiredPrompt/AcquiringSetupFramecomponent consumed by both flows to avoid maintaining two copies of the same UI and constants.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/condo/domains/billing/components/OnBoarding/SetupAcquiringCombinedFlow.tsx` around lines 91 - 129, Extract the duplicated SBBOL verification prompt and acquiring setup frame from SetupAcquiringCombinedFlow and SetupAcquiring into shared components, such as VerificationRequiredPrompt and AcquiringSetupFrame. Move shared constants and UI behavior, including the skip action, certificate messaging, redirect handling, and B2BAppFrame configuration, into those components, then update both flows to consume them while preserving their existing behavior.apps/condo/pages/billing/setup.tsx (1)
27-39: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winData queries fire before feature/role gating, wasting requests for denied users. Both
setup.tsxandBillingOnboardingCombinedFlowPage.tsxrun GraphQL queries unconditionally and only check the corresponding gate (feature flag / role) after the fetch has already been issued and awaited.
apps/condo/pages/billing/setup.tsx#L27-L39: addskip: !isCombinedFlowto theBillingContext.useObjects/AcquiringContext.useObjectscalls so orgs without the flag don't fetch.apps/condo/pages/billing/setup.tsx#L51-L62: once queries are skipped, checkisCombinedFlowfirst (or keep as-is once skip is applied, since loading will be false immediately).apps/condo/domains/billing/components/OnBoarding/BillingOnboardingCombinedFlowPage.tsx#L55-L58: addskip: !canManageIntegrationstoAcquiringIntegration.useObjectsso unauthorized users don't trigger the query.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/condo/pages/billing/setup.tsx` around lines 27 - 39, Add skip: !isCombinedFlow to both BillingContext.useObjects and AcquiringContext.useObjects in apps/condo/pages/billing/setup.tsx#L27-L39, and ensure the related setup gating at apps/condo/pages/billing/setup.tsx#L51-L62 checks isCombinedFlow before query-dependent handling. Add skip: !canManageIntegrations to AcquiringIntegration.useObjects in apps/condo/domains/billing/components/OnBoarding/BillingOnboardingCombinedFlowPage.tsx#L55-L58.apps/condo/domains/billing/components/BillingPageContent/SetupTab.tsx (1)
1-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRestore the required import grouping.
This mixes internal
@appimports with externalnext/reactand@open-condoimports. Separate and order them as external →@open-condo→ internal.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/condo/domains/billing/components/BillingPageContent/SetupTab.tsx` around lines 1 - 10, Reorder the imports in SetupTab.tsx into three groups: external next/react imports first, `@open-condo` imports second, and internal `@app/`@condo imports last. Preserve all existing imports and their symbols while restoring blank-line separation between groups.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/condo/domains/acquiring/gql.js`:
- Line 15: Update ACQUIRING_INTEGRATION_FIELDS to include displayPriority in the
selected AcquiringIntegration fields, preserving the existing selection and
interpolation of COMMON_FIELDS.
In `@apps/condo/domains/acquiring/schema/AcquiringIntegration.js`:
- Line 97: Update the hostUrl field configuration in the AcquiringIntegration
schema to require a value for online-processing integrations, while permitting
omission only for external-import integrations if that distinction is already
supported by the schema’s validation patterns.
In
`@apps/condo/domains/billing/components/BillingPageContent/CombinedMainContent.tsx`:
- Around line 160-165: Update the availableTabs useMemo to include SETUP_TAB_KEY
only when both setup is incomplete and canManageIntegrations is true, matching
the rendering condition in the setup tab content. Add canManageIntegrations to
the memo dependencies while preserving the existing conditions for payment,
accrual, and extension tabs.
In `@apps/condo/domains/billing/components/BillingPageContent/index.tsx`:
- Around line 37-39: Update the isSetupCompleted useMemo in BillingPageContent
to use the existing status-based setup completion predicate for
acquiringContexts and billingContexts instead of checking only array lengths.
Reuse the same predicate used by CombinedMainContent so in-progress and
verification contexts do not mark setup as complete.
In
`@apps/condo/domains/billing/components/OnBoarding/BillingDescriptionModalContent.tsx`:
- Line 78: Update the fallback in BillingDescriptionModalContent so
DEFAULT_BILLING_BANNER_IMAGE_PATH is used only for billing integrations; when
rendered with INTEGRATION_TYPE_B2B_APP and no bannerPromoImageUrl, use the
established neutral/B2B fallback instead.
In `@apps/condo/domains/billing/components/OnBoarding/ChooseChannels.tsx`:
- Around line 41-54: Update AcquiringCard’s Checkbox to invoke the provided
onClick handler directly through its change/click callback, matching
BillingCard’s Radio wiring. Keep AppCard’s existing onClick unchanged so both
the checkbox and card respond consistently.
In `@apps/condo/domains/billing/components/OnBoarding/SetupBilling.tsx`:
- Around line 138-146: Update SetupBilling’s current-context error handling so a
failed context query does not leave the user on the infinite Loader: allow the
existing step-0 redirect to run when currentCtxError is present, and render the
error feedback path used by Verification.tsx instead of treating the error state
as loading. Preserve the loader for genuinely loading or unresolved non-error
states.
In `@apps/condo/domains/billing/queries/BillingRecipient.graphql`:
- Around line 6-7: Remove the manual deletedAt filter from the BillingRecipient
query while keeping the status constraint unchanged, allowing the soft-delete
plugin to inject its filter for nested entities. Regenerate the generated
GraphQL index represented by apps/condo/gql/index.ts afterward.
In `@apps/condo/lang/es/es.json`:
- Around line 1995-1998: Translate the values for
pages.billing.setup.chooseChannels.title,
pages.billing.setup.chooseChannels.chooseChannels.title, and
pages.billing.setup.chooseChannels.integrtion.setup.title in the Spanish
translation file into natural Spanish, preserving the existing keys and JSON
structure.
In
`@apps/condo/migrations/20260722191116-0545_acquiringintegration_displaypriority_and_more.js`:
- Line 78: Make the downgrade migration data-safe before the ALTER TABLE
statement: validate or backfill existing NULL values in
AcquiringIntegration.hostUrl, or apply a coordinated write restriction that
prevents new NULLs during rollback. Then restore the NOT NULL constraint only
after the table satisfies it, preserving transactional downgrade behavior.
---
Nitpick comments:
In `@apps/condo/domains/acquiring/hooks/useIntegrationContexts.ts`:
- Around line 18-20: Update the AcquiringIntegrationContext.useObjects call to
pass a second-options argument with skip: !orgId, preventing the query until
useOrganization() provides orgId while preserving the existing where filter.
In `@apps/condo/domains/billing/components/BillingPageContent/SetupTab.tsx`:
- Around line 1-10: Reorder the imports in SetupTab.tsx into three groups:
external next/react imports first, `@open-condo` imports second, and internal
`@app/`@condo imports last. Preserve all existing imports and their symbols while
restoring blank-line separation between groups.
In
`@apps/condo/domains/billing/components/OnBoarding/SetupAcquiringCombinedFlow.tsx`:
- Around line 91-129: Extract the duplicated SBBOL verification prompt and
acquiring setup frame from SetupAcquiringCombinedFlow and SetupAcquiring into
shared components, such as VerificationRequiredPrompt and AcquiringSetupFrame.
Move shared constants and UI behavior, including the skip action, certificate
messaging, redirect handling, and B2BAppFrame configuration, into those
components, then update both flows to consume them while preserving their
existing behavior.
In `@apps/condo/pages/billing/setup.tsx`:
- Around line 27-39: Add skip: !isCombinedFlow to both BillingContext.useObjects
and AcquiringContext.useObjects in apps/condo/pages/billing/setup.tsx#L27-L39,
and ensure the related setup gating at
apps/condo/pages/billing/setup.tsx#L51-L62 checks isCombinedFlow before
query-dependent handling. Add skip: !canManageIntegrations to
AcquiringIntegration.useObjects in
apps/condo/domains/billing/components/OnBoarding/BillingOnboardingCombinedFlowPage.tsx#L55-L58.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: fe819e92-6f91-411e-b6f8-c24468ce5565
⛔ Files ignored due to path filters (3)
apps/condo/public/billing/banner.pngis excluded by!**/*.pngapps/condo/public/global-hints/billing/promo/rc.pngis excluded by!**/*.pngyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (55)
apps/billing-connectorapps/condo/domains/acquiring/gql.jsapps/condo/domains/acquiring/hooks/useIntegrationContexts.tsapps/condo/domains/acquiring/schema/AcquiringIntegration.jsapps/condo/domains/acquiring/schema/fields/common.jsapps/condo/domains/billing/components/BillingPageContent/BillingSettingsModal.module.cssapps/condo/domains/billing/components/BillingPageContent/BillingSettingsModal.tsxapps/condo/domains/billing/components/BillingPageContent/CombinedMainContent.tsxapps/condo/domains/billing/components/BillingPageContent/EmptyContent.tsxapps/condo/domains/billing/components/BillingPageContent/MainContent.tsxapps/condo/domains/billing/components/BillingPageContent/SetupTab.tsxapps/condo/domains/billing/components/BillingPageContent/index.tsxapps/condo/domains/billing/components/OnBoarding/BillingDescriptionModalContent.module.cssapps/condo/domains/billing/components/OnBoarding/BillingDescriptionModalContent.tsxapps/condo/domains/billing/components/OnBoarding/BillingOnboardingCombinedFlowPage.tsxapps/condo/domains/billing/components/OnBoarding/ChooseChannels.module.cssapps/condo/domains/billing/components/OnBoarding/ChooseChannels.tsxapps/condo/domains/billing/components/OnBoarding/SetupAcquiring.tsxapps/condo/domains/billing/components/OnBoarding/SetupAcquiringCombinedFlow.tsxapps/condo/domains/billing/components/OnBoarding/SetupBilling.tsxapps/condo/domains/billing/components/OnBoarding/Verification.tsxapps/condo/domains/billing/components/OnBoarding/index.module.cssapps/condo/domains/billing/constants/constants.jsapps/condo/domains/billing/gql.jsapps/condo/domains/billing/hooks/useBillingSettingsIntegrationParameters.tsapps/condo/domains/billing/hooks/useIntegrationContext.tsapps/condo/domains/billing/hooks/useOnboardingProgress.tsapps/condo/domains/billing/hooks/useRecipientDetails.tsapps/condo/domains/billing/hooks/useSelectBillingPromoBanner.tsxapps/condo/domains/billing/queries/BillingRecipient.graphqlapps/condo/domains/billing/schema/BillingIntegration.jsapps/condo/domains/billing/schema/SendNewReceiptMessagesToResidentScopesService.test.jsapps/condo/domains/billing/schema/fields/common.jsapps/condo/domains/billing/utils/testSchema/mixins/acquiring.jsapps/condo/domains/billing/utils/testSchema/mixins/b2bApp.jsapps/condo/domains/billing/utils/testSchema/mixins/organization.jsapps/condo/domains/billing/utils/testSchema/testUtils.jsapps/condo/domains/common/components/EmptyListContent.tsxapps/condo/domains/common/components/containers/BaseLayout/Footer.tsxapps/condo/domains/miniapp/components/AppCard.tsxapps/condo/gql/index.tsapps/condo/gql/operation.types.tsapps/condo/lang/en/en.jsonapps/condo/lang/es/es.jsonapps/condo/lang/ru/ru.jsonapps/condo/migrations/20260722191116-0545_acquiringintegration_displaypriority_and_more.jsapps/condo/pages/billing/index.tsxapps/condo/pages/billing/setup.tsxapps/condo/public/billing/banner.webpapps/condo/public/global-hints/billing/promo/rc-cheque.webpapps/condo/public/global-hints/billing/promo/rc-plane.webpapps/condo/schema.graphqlapps/condo/schema.tsapps/rbapps/registry-importer
💤 Files with no reviewable changes (2)
- apps/condo/domains/billing/schema/SendNewReceiptMessagesToResidentScopesService.test.js
- apps/condo/domains/billing/utils/testSchema/mixins/acquiring.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/condo/domains/billing/components/BillingPageContent/index.tsx`:
- Around line 17-18: Reorder the imports in the BillingPageContent module to
satisfy the project’s import-order rules: place the billing constants import
before useBillingHeaderTags and the acquiring constants import before
ContextProvider, without changing their symbols or behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a68f5744-9ef2-4ac6-97e9-de87637793a7
📒 Files selected for processing (9)
apps/condo/domains/acquiring/constants/errors.jsapps/condo/domains/acquiring/gql.jsapps/condo/domains/acquiring/schema/AcquiringIntegration.jsapps/condo/domains/billing/components/BillingPageContent/CombinedMainContent.tsxapps/condo/domains/billing/components/BillingPageContent/index.tsxapps/condo/domains/billing/components/OnBoarding/BillingDescriptionModalContent.tsxapps/condo/domains/billing/components/OnBoarding/ChooseChannels.tsxapps/condo/domains/billing/queries/BillingRecipient.graphqlapps/condo/domains/common/components/containers/BaseLayout/Footer.tsx
💤 Files with no reviewable changes (1)
- apps/condo/domains/billing/queries/BillingRecipient.graphql
🚧 Files skipped from review as they are similar to previous changes (6)
- apps/condo/domains/acquiring/gql.js
- apps/condo/domains/billing/components/OnBoarding/BillingDescriptionModalContent.tsx
- apps/condo/domains/common/components/containers/BaseLayout/Footer.tsx
- apps/condo/domains/acquiring/schema/AcquiringIntegration.js
- apps/condo/domains/billing/components/OnBoarding/ChooseChannels.tsx
- apps/condo/domains/billing/components/BillingPageContent/CombinedMainContent.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.helm:
- Line 1: Update the .helm submodule pin from the unreachable revision to a
reachable commit in the chart repository, then run git submodule sync
--recursive to refresh the submodule configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 66bed7b8-4397-4623-afb0-41e9406ba354
📒 Files selected for processing (2)
.helmapps/billing-connector
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/billing-connector
37c3953 to
84990c7
Compare
|



Summary by CodeRabbit