Commit 8a298f1
committed
Resolves #7347(FR-2862)
Collapses the per-mode `Content + Modal` split for deployment-creation flows into single Modal components. The `*Content` antipattern is removed entirely across the deployment-creation surface.
## Changes
- **`DeploymentPresetDetailModal`** (new) — replaces `DeploymentPresetDetailContent`. Owns its own `BAIModal` frame instead of relying on a parent wrapper.
- **`DeploymentAddRevisionModal`** — `DeploymentAddRevisionPresetContent` and `DeploymentAddRevisionCustomContent` merged into a single component with a `Segmented` mode toggle in the modal title. Shared `presetTransferFragment` (`@inline`) preserves cross-mode prefill via `readInlineData`.
- **`VFolderDeployModal`** — `VFolderDeployModalContent` inlined. Empty-state / auto-deploy / selection-UI paths now branch in the single component body.
- **`ModelCardDeployModal`** — `ModelCardDeployModalContent` inlined with the same scenario branching.
- **Callers** (`VFolderNodes`, `VFolderNodesV2`, `ModelCardDrawer`) wrap the Modals with `BAIUnmountAfterClose` so the lazy Relay query gate that previously lived in the wrapper component now lives at the call site.
## Behavioral notes
- Upper-stack Selects wired into the merged components where applicable: `BAIAvailablePresetSelect`, `BAIProjectResourceGroupSelect` (`autoSelectDefault`), `BAIProjectVfolderSelect`, `BAIRuntimeVariantSelect`.
- Auto-deploy paths (single preset + single resource group) guarded by `useEffectEvent` + `useRef` for StrictMode idempotency.
- Lazy-load gating preserved via `useDeferredValue(open)` + `store-only` fetchPolicy on the query, and `loading={deferredOpen !== open}` on the Modal.
## Verification
`bash scripts/verify.sh`:
- Relay: PASS
- Lint: PASS
- Format: PASS
- TypeScript: pre-existing errors only (Relay-generated nullable response types in `deployVfolderV2`, antd Form render-prop inference). Confirmed by re-running tsc on the parent commit with this branch's changes stashed.
**Checklist:** (if applicable)
- [ ] Documentation
- [ ] Minimum required manager version
- [ ] Specific setting for review
- [x] Minimum requirements to check during review — verify the Deploy / Create Revision / Preset Detail modals on a model card and vfolder still behave as before across the empty / auto-deploy / selection scenarios
- [ ] Test case(s) to demonstrate the difference of before/after
1 parent 61939b7 commit 8a298f1
11 files changed
Lines changed: 1662 additions & 2036 deletions
File tree
- react/src/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments