feat(FR-2889): auto-select default resource group in deployment modals#7402
Merged
graphite-app[bot] merged 1 commit intoMay 15, 2026
Conversation
This was referenced May 13, 2026
Contributor
Author
4 tasks
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
Enables automatic initialization of the “resource group” selection across deployment-related modals/flows by opting into BAIProjectResourceGroupSelect’s autoSelectDefault behavior, reducing UX friction from a required-but-empty first field.
Changes:
ModelCardDeployModalandVFolderDeployModalswitch to a singleselectedResourceGroupstate and enableautoSelectDefaultonBAIProjectResourceGroupSelect.DeploymentAddRevisionPresetContentenablesautoSelectDefaultinside theresourceGroupForm.Itemso the form value is set automatically.ResourceAllocationFormItemsadds an opt-in prop (autoSelectFirstResourceGroup) that forwards toautoSelectDefault, andDeploymentAddRevisionCustomContentopts in.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| react/src/components/VFolderDeployModal.tsx | Uses autoSelectDefault + controlled selectedResourceGroup for resource-group selection in the vfolder deploy modal. |
| react/src/components/SessionFormItems/ResourceAllocationFormItems.tsx | Adds an opt-in prop to auto-select the first/default resource group via BAIProjectResourceGroupSelect. |
| react/src/components/ModelCardDeployModal.tsx | Uses autoSelectDefault + controlled selectedResourceGroup for resource-group selection in the model-card deploy modal. |
| react/src/components/DeploymentAddRevisionPresetContent.tsx | Enables autoSelectDefault so the required resourceGroup form field is initialized automatically. |
| react/src/components/DeploymentAddRevisionCustomContent.tsx | Opts into the new ResourceAllocationFormItems auto-select behavior for custom revision flow. |
ab4a457 to
ee90cf4
Compare
9904d72 to
5854ed7
Compare
This was referenced May 13, 2026
nowgnuesLee
requested changes
May 14, 2026
yomybaby
requested changes
May 14, 2026
ee90cf4 to
b724b5d
Compare
5854ed7 to
43a4f16
Compare
b724b5d to
a9174f0
Compare
43a4f16 to
6452661
Compare
a9174f0 to
90e3240
Compare
6452661 to
8f56569
Compare
90e3240 to
ed69612
Compare
8f56569 to
9810517
Compare
Merged
4 tasks
ed69612 to
bf658de
Compare
9810517 to
2088237
Compare
Merge activity
|
#7402) Resolves #7401 ([FR-2889](https://lablup.atlassian.net/browse/FR-2889)) ## Summary - `ModelCardDeployModal` / `VFolderDeployModal`: replace the `userSelectedResourceGroup ?? resourceGroups[0]?.name` controlled-fallback pattern with a single `selectedResourceGroup` state and pass `autoSelectDefault` to `BAIProjectResourceGroupSelect` so the component fires `onChange` with the chosen group (project's `default`, or the first available) once data loads. - `DeploymentAddRevisionPresetContent`: pass `autoSelectDefault` to `BAIProjectResourceGroupSelect` inside `Form.Item name="resourceGroup"` — the internal `onChange` is picked up by `Form.Item` and stored in form state. - `DeploymentAddRevisionCustomContent`: opt into the new `autoSelectFirstResourceGroup` prop on shared `ResourceAllocationFormItems`. The prop is **off by default** (`false`) so `SessionLauncherPage` / `ServiceLauncherPageContent`, which prefill via `currentGlobalResourceGroup`, keep their existing behavior unchanged. ## Verification - `bash scripts/verify.sh`: Relay PASS / Lint PASS / Format PASS. TypeScript: only pre-existing baseline noise (`SessionLauncherPage`, `StatisticsPage`, `StorageHostSettingPage`, `UserCredentialsPage`, `UserSettingsPage`, `VFolderNodeListPage`) — none of the modified files report errors. ## Test plan - [ ] Open `ModelCardDeployModal` → resource group field is pre-filled with the project's default (or first) group; Deploy button no longer blocked solely by an unselected resource group. - [ ] Open `VFolderDeployModal` → same. - [ ] Open `DeploymentAddRevisionPresetContent` (preset mode) → `resourceGroup` form field is initialized so the required-field validator passes without manual selection. - [ ] Open `DeploymentAddRevisionCustomContent` (custom mode) → resource group is auto-selected; existing `prefillFromCurrentRevision` flow still overrides correctly when the user clicks "Load current revision". - [ ] Session launcher (`SessionLauncherPage`) and service launcher behavior unchanged — they keep using `currentGlobalResourceGroup`; the new `autoSelectFirstResourceGroup` prop defaults to `false`. [FR-2889]: https://lablup.atlassian.net/browse/FR-2889?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
bf658de to
91322cc
Compare
2088237 to
61939b7
Compare
Base automatically changed from
05-13-feat_fr-2888_add_bairuntimevariantselect_and_remove_runtimevariants_block_from_deploymentaddrevisionmodalquery
to
main
May 15, 2026 08:06
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.

Resolves #7401 (FR-2889)
Summary
ModelCardDeployModal/VFolderDeployModal: replace theuserSelectedResourceGroup ?? resourceGroups[0]?.namecontrolled-fallback pattern with a singleselectedResourceGroupstate and passautoSelectDefaulttoBAIProjectResourceGroupSelectso the component firesonChangewith the chosen group (project'sdefault, or the first available) once data loads.DeploymentAddRevisionPresetContent: passautoSelectDefaulttoBAIProjectResourceGroupSelectinsideForm.Item name="resourceGroup"— the internalonChangeis picked up byForm.Itemand stored in form state.DeploymentAddRevisionCustomContent: opt into the newautoSelectFirstResourceGroupprop on sharedResourceAllocationFormItems. The prop is off by default (false) soSessionLauncherPage/ServiceLauncherPageContent, which prefill viacurrentGlobalResourceGroup, keep their existing behavior unchanged.Verification
bash scripts/verify.sh: Relay PASS / Lint PASS / Format PASS. TypeScript: only pre-existing baseline noise (SessionLauncherPage,StatisticsPage,StorageHostSettingPage,UserCredentialsPage,UserSettingsPage,VFolderNodeListPage) — none of the modified files report errors.Test plan
ModelCardDeployModal→ resource group field is pre-filled with the project's default (or first) group; Deploy button no longer blocked solely by an unselected resource group.VFolderDeployModal→ same.DeploymentAddRevisionPresetContent(preset mode) →resourceGroupform field is initialized so the required-field validator passes without manual selection.DeploymentAddRevisionCustomContent(custom mode) → resource group is auto-selected; existingprefillFromCurrentRevisionflow still overrides correctly when the user clicks "Load current revision".SessionLauncherPage) and service launcher behavior unchanged — they keep usingcurrentGlobalResourceGroup; the newautoSelectFirstResourceGroupprop defaults tofalse.