Skip to content

feat: implements possibility to choose custom provider#3406

Merged
stalniy merged 2 commits into
mainfrom
feat/choose-provider
Jul 10, 2026
Merged

feat: implements possibility to choose custom provider#3406
stalniy merged 2 commits into
mainfrom
feat/choose-provider

Conversation

@stalniy

@stalniy stalniy commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Why

Closes CON-350

What

Summary by CodeRabbit

  • New Features
    • Added a shared deployment flow across automatic and manual configuration.
    • Choosing a provider now safely stops autopilot and switches to manual selection.
    • Back navigation from review clears the active provider selection.
  • Bug Fixes
    • Deployment links now preserve the latest bid strategy after asynchronous updates.
    • Provider selection is available only during applicable deployment phases.
    • “Deployment not found” notifications now use a warning style.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Deployment flow refactor

Layer / File(s) Summary
Shared flow provider and screen wiring
apps/deploy-web/src/components/deployments/ConfigureDeployment/{DeploymentFlowProvider,ConfigureDeployment}/*
Centralizes trial readiness and deployment-flow initialization in DeploymentFlowProvider, which supplies shared state to the auto and manual branches.
Autopilot flow integration and stopping
apps/deploy-web/src/hooks/useAutoDeploymentFlow/*, apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/*
Consumes the shared flow, forwards resume/trial state, and stops automated provider selection and deployment before switching to manual selection.
Manual flow and review navigation
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/*
Injects the shared flow and clears the focused provider selection when navigating back from review.
Async redirect and progress-state guards
apps/deploy-web/src/components/deployments/ConfigureDeployment/useDeploymentFlow/*, apps/deploy-web/src/components/deployments/PhasedDeploymentProgress/*, apps/deploy-web/src/components/deployments/ConfigureDeployment/ResumeDeploymentGuard/*
Uses the latest bid strategy after asynchronous creation, restricts provider selection to matching or creating states, and changes missing-deployment notifications to warnings.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: ygrishajev, baktun14

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/choose-provider

Comment @coderabbitai help to get the list of available commands.

@stalniy stalniy changed the title Feat/choose provider feat: implements possibility to choose custom provider Jul 9, 2026
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.88%. Comparing base (23f29fa) to head (f213afb).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3406      +/-   ##
==========================================
- Coverage   71.51%   70.88%   -0.64%     
==========================================
  Files        1110     1061      -49     
  Lines       28131    26835    -1296     
  Branches     7013     6722     -291     
==========================================
- Hits        20119    19023    -1096     
+ Misses       7027     6848     -179     
+ Partials      985      964      -21     
Flag Coverage Δ *Carryforward flag
api 85.60% <ø> (ø) Carriedforward from 23f29fa
deploy-web 60.49% <100.00%> (+0.07%) ⬆️
notifications 91.44% <ø> (ø) Carriedforward from 23f29fa
provider-console 81.38% <ø> (ø) Carriedforward from 23f29fa
provider-inventory ?
provider-proxy 86.42% <ø> (ø) Carriedforward from 23f29fa

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...figureDeployment/AutoDeployFlow/AutoDeployFlow.tsx 100.00% <100.00%> (ø)
...oyment/ConfigureDeployment/ConfigureDeployment.tsx 100.00% <100.00%> (+3.03%) ⬆️
...onfigureDeploymentForm/ConfigureDeploymentForm.tsx 86.84% <100.00%> (+3.28%) ⬆️
.../DeploymentFlowProvider/DeploymentFlowProvider.tsx 100.00% <100.00%> (ø)
...nt/ResumeDeploymentGuard/ResumeDeploymentGuard.tsx 92.15% <ø> (ø)
...eDeployment/useDeploymentFlow/useDeploymentFlow.ts 86.66% <100.00%> (+0.18%) ⬆️
...sedDeploymentProgress/PhasedDeploymentProgress.tsx 96.55% <100.00%> (+0.25%) ⬆️
...oks/useAutoDeploymentFlow/useAutoDeploymentFlow.ts 90.90% <100.00%> (+0.18%) ⬆️

... and 50 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stalniy stalniy force-pushed the feat/choose-provider branch from ce6f625 to 7219c2f Compare July 10, 2026 04:10
@stalniy stalniy force-pushed the feat/choose-provider branch from 7219c2f to f213afb Compare July 10, 2026 08:45
@github-actions github-actions Bot added size: L and removed size: XL labels Jul 10, 2026
@stalniy stalniy marked this pull request as ready for review July 10, 2026 08:45
@stalniy stalniy requested a review from a team as a code owner July 10, 2026 08:45

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/deploy-web/src/hooks/useAutoDeploymentFlow/useAutoDeploymentFlow.spec.ts`:
- Around line 112-125: Replace the fixed 50ms timeout in the “stops matching a
provider...” test with an explicitly controlled deferred promise for the mocked
useFirstReachableProvider reachability check. Resolve that promise after
stopAutopilot() is called, await the resulting async work, then assert
selectProvider and deploy remain uncalled while requestQuotes was called once.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f489c557-55ad-44dd-a5ba-cdb14a514b91

📥 Commits

Reviewing files that changed from the base of the PR and between 23f29fa and f213afb.

📒 Files selected for processing (15)
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeployment/ConfigureDeployment.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeployment/ConfigureDeployment.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentFlowProvider/DeploymentFlowProvider.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/DeploymentFlowProvider/DeploymentFlowProvider.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ResumeDeploymentGuard/ResumeDeploymentGuard.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ResumeDeploymentGuard/ResumeDeploymentGuard.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useDeploymentFlow/useDeploymentFlow.spec.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useDeploymentFlow/useDeploymentFlow.ts
  • apps/deploy-web/src/components/deployments/PhasedDeploymentProgress/PhasedDeploymentProgress.tsx
  • apps/deploy-web/src/hooks/useAutoDeploymentFlow/useAutoDeploymentFlow.spec.ts
  • apps/deploy-web/src/hooks/useAutoDeploymentFlow/useAutoDeploymentFlow.ts

@stalniy stalniy added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit 9d4c710 Jul 10, 2026
57 checks passed
@stalniy stalniy deleted the feat/choose-provider branch July 10, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants