feat(deployment): add GPU, presets, commands and env vars configure cards - #3366
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (16)
📝 WalkthroughWalkthroughThe PR adds new deployment configuration cards for presets, GPU, environment variables, and commands. It also introduces a shared dialog primitive, updates hardware and additional section composition, and adds tests for the new cards and preset matching logic. ChangesDeployment configuration UI
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3366 +/- ##
==========================================
- Coverage 69.61% 68.21% -1.40%
==========================================
Files 1088 998 -90
Lines 26639 24306 -2333
Branches 6396 5938 -458
==========================================
- Hits 18545 16581 -1964
+ Misses 7104 6773 -331
+ Partials 990 952 -38
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
e525b82 to
f34ae29
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.tsx`:
- Around line 54-64: The dialog handlers in CommandsCard should not reset the
entire RHF form; they currently affect unrelated fields and form metadata.
Update handleCancel and handleSave to scope state to the command inputs only,
using the service command field path from services.${serviceIndex}.command or a
local draft for command/arg. Keep the shared form untouched outside these
command fields, and avoid using reset(snapshot) or reset(getValues(), {
keepDirty: true }) on the whole form.
In
`@apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.ts`:
- Around line 142-148: The preset application logic in hardwarePresets should
clear stale GPU model data when a non-GPU preset is selected. Update the code
around the gpu/hasGpu handling in the preset application flow so that when gpu
is 0 or absent, services.${serviceIndex}.profile.gpuModels is explicitly reset
to an empty value instead of leaving the previous array intact; keep the
existing gpuModels assignment only in the gpu > 0 path. Use the setValue calls
in this block to ensure hasGpu and gpuModels stay consistent for sdlGenerator
and future GPU re-enablement.
🪄 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: f582e7c9-f738-4b48-882e-28aea7b93bda
📒 Files selected for processing (18)
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/AdditionalSection/AdditionalSection.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/AdditionalSection/AdditionalSection.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/EnvironmentVariablesCard/EnvironmentVariablesCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/EnvironmentVariablesCard/EnvironmentVariablesCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/GpuCard/GpuCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/GpuCard/GpuCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/HardwareSection/HardwareSection.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/HardwareSection/HardwareSection.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/PresetsCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/PresetsCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.spec.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/cardTooltips.tsxpackages/ui/components/dialog-v2.tsxpackages/ui/components/index.tsx
f34ae29 to
679f4e1
Compare
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/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.tsx`:
- Around line 49-63: The cancel flow in CommandsCard’s snapshot handling can
restore undefined into RHF fields, which is not allowed for these text inputs.
Update openModal and handleCancel so the snapshot always normalizes `command`
and `arg` to empty strings when `getValues()` returns nothing, or switch to
using `resetField()`/registered defaults in `CommandsCard` instead of passing
undefined to `setValue()`.
🪄 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: 4136b43e-5b9f-40ba-9801-aaf414fed856
📒 Files selected for processing (18)
apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/AdditionalSection/AdditionalSection.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/AdditionalSection/AdditionalSection.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/EnvironmentVariablesCard/EnvironmentVariablesCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/EnvironmentVariablesCard/EnvironmentVariablesCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/GpuCard/GpuCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/GpuCard/GpuCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/HardwareSection/HardwareSection.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/HardwareSection/HardwareSection.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/PresetsCard.spec.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/PresetsCard.tsxapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.spec.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.tsapps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/cardTooltips.tsxpackages/ui/components/dialog-v2.tsxpackages/ui/components/index.tsx
✅ Files skipped from review due to trivial changes (1)
- packages/ui/components/index.tsx
🚧 Files skipped from review as they are similar to previous changes (14)
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.spec.ts
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/ConfigurationPane.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/PresetsCard.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/AdditionalSection/AdditionalSection.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/CommandsCard/CommandsCard.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/EnvironmentVariablesCard/EnvironmentVariablesCard.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/HardwareSection/HardwareSection.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/cardTooltips.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/EnvironmentVariablesCard/EnvironmentVariablesCard.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/GpuCard/GpuCard.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/PresetsCard.tsx
- packages/ui/components/dialog-v2.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/GpuCard/GpuCard.spec.tsx
- apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigurationPane/PresetsCard/hardwarePresets.ts
679f4e1 to
59301cf
Compare
…ards Third of three stacked branches for the deployment Configuration pane (on top of the image/compute and storage branches). After this branch the Configuration pane is complete. Adds the GPU card (vendor/model/memory/interface), the hardware Presets card, and the Commands and Environment Variables cards (both backed by the dialog-v2 modal), and wires them into the Hardware and Additional sections.
59301cf to
451c57d
Compare
Why
Part of CON-411, closes CON-419. Completes the Configuration pane. After this PR its content matches the original
feat/deployment-configure-pane-inputsbranch.What
dialog-v2modal;env vars guard the reserved
SSH_PUBKEYkey.section.
Summary by CodeRabbit