fix(FR-2773): preserve auto-selected resourcePresetId across applyInitialValues#7153
Merged
graphite-app[bot] merged 1 commit intoApr 30, 2026
Conversation
This was referenced Apr 29, 2026
8 tasks
Contributor
Author
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes initial form synchronization in the Deployment Launcher (create mode) so that auto-selected values produced by child selectors (notably resourcePresetId) are not overwritten by the parent applyInitialValues effect.
Changes:
- Extend the “omit empty auto-selected fields” logic to cover both
resourceGroupandresourcePresetIdduring initialform.setFieldsValue()in create mode. - Add clarifying comments describing the parent/child effect ordering and the resulting clobbering behavior.
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.12% (+0% 🔼) |
1859/22905 |
| 🔴 | Branches | 7.35% | 1187/16156 |
| 🔴 | Functions | 4.83% (+0.02% 🔼) |
297/6154 |
| 🔴 | Lines | 7.89% (+0% 🔼) |
1750/22190 |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from ab6e4b0
66f8e77 to
e98a095
Compare
0c34019 to
864d385
Compare
e98a095 to
9fa9038
Compare
864d385 to
196024c
Compare
9fa9038 to
69b4380
Compare
196024c to
f5f8814
Compare
4 tasks
69b4380 to
ecdd93b
Compare
f5f8814 to
b6d3266
Compare
12 tasks
Merge activity
|
…tialValues (#7153) Resolves #7150 ([FR-2773](https://lablup.atlassian.net/browse/FR-2773)) > Stacks on top of #7152 (FR-2774). ## Summary The Resource Preset row showed `-` on the deployment launcher review step even though the user had a preset selected on step 3. Fixed by extending the `applyInitialValues` omit list so any field whose child component owns an `autoSelectDefault` flow is left alone when its merged value is empty. ## Root cause 1. On mount, `ResourcePresetSelect`'s `autoSelectDefault` effect (a child) runs **before** the parent's `applyInitialValues` effect. 2. Auto-select sets `resourcePresetId` to the first available preset name. 3. `applyInitialValues` then runs and called `form.setFieldsValue(merged)` with `merged.resourcePresetId === undefined`, clobbering the auto-selected value. 4. `ResourcePresetSelect` uses `useControllableState_deprecated`, whose `stateRef` retains the auto-selected value when the antd-injected `value` is `undefined`. So the step-3 Select **kept displaying** the preset name (giving the user the impression it was selected), while `form.getFieldsValue()` returned `undefined`. 5. The review summary's `values.resourcePresetId ? <ResourcePresetReviewDisplay … /> : '-'` fell to the dash branch. The existing code already handled the same race for `resourceGroup` via `_.omit(merged, 'resourceGroup')`. This PR generalizes that omit list to also cover `resourcePresetId`. ## Test plan - [ ] `bash scripts/verify.sh` passes. - [ ] `/deployments/create`: select a resource group, allow auto-select to pick a preset on step 3, click Next → review step renders the preset name and resource slot icons (no `-`). - [ ] Manually change the resource preset on step 3 → review reflects the new preset. - [ ] Edit mode (`/deployments/:id/edit`): pre-filled preset still renders on review. - [ ] Edge: open `/deployments/create` directly (no URL pre-fill) and skip to review immediately → preset row shows the auto-selected preset, not `-`. [FR-2773]: https://lablup.atlassian.net/browse/FR-2773?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
b6d3266 to
d033937
Compare
ecdd93b to
ab6e4b0
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Apr 30, 2026
Resolves #7157 ([FR-2776](https://lablup.atlassian.net/browse/FR-2776)) > Stacks on top of #7153 (FR-2773) → #7152 (FR-2774). ## Symptom Relay compile errors after a schema sync: ``` ✖︎ Unknown argument 'options'. react/src/components/DeploymentAddRevisionModal.tsx:172:41 react/src/pages/DeploymentLauncherPage.tsx:259:41 ``` ## Schema change `addModelRevision` no longer takes `options` as a top-level mutation argument. The `AddRevisionOptions` payload is now a field on `AddRevisionInput`: ```graphql # Before addModelRevision(input: AddRevisionInput!, options: AddRevisionOptions): AddRevisionPayload! # After addModelRevision(input: AddRevisionInput!): AddRevisionPayload! # AddRevisionInput now has: options: AddRevisionOptions = null ``` ## Changes ### `react/src/pages/DeploymentLauncherPage.tsx` - `DeploymentLauncherPageEditMutation`: drop the `$options: AddRevisionOptions` variable and the `, options: $options` argument from the `addModelRevision` selection. - `handleAddRevision`: move `options: { autoActivate: true }` from `variables` (top level) into `variables.input`. ### `react/src/components/DeploymentAddRevisionModal.tsx` - `DeploymentAddRevisionModalAddMutation`: drop the inline `options: { autoActivate: true }` argument from the `addModelRevision` selection. - `commitAdd`: pass `options: { autoActivate: true }` inside the `input` payload. ### `data/schema.graphql` - Sync to the new server schema (drives Relay compiler against the latest definition). ## Test plan - [x] `pnpm run relay` compiles without errors. - [x] `bash scripts/verify.sh` passes (Relay / Lint / Format / TypeScript). - [ ] `/deployments/create`: create-then-add-revision flow still produces an active revision (auto-activated). - [ ] Standalone Add Revision modal: clicking "Add Revision" creates a new revision and auto-activates it. [FR-2776]: https://lablup.atlassian.net/browse/FR-2776?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Base automatically changed from
04-29-fix_fr-2774_query_runtime_variant_id_and_decode_to_uuid_for_addmodelrevision
to
main
April 30, 2026 07:19
agatha197
pushed a commit
that referenced
this pull request
May 18, 2026
Part of the recent main-branch docs catch-up plan (Work Item 11). New page documenting the Deployment Preset feature introduced over Q1–Q2 2026: - FR-2750 (#7091) feature spec - FR-2761 (#7125) admin create / edit / delete UI - FR-2762 (#7127) preset detail view in VFolderDeployModal - FR-2801 (#7224) pre-populate launcher fields from preset - FR-2805 (#7233) URLSearchParams in preset navigation - FR-2827 (#7274) clickable deployment tags filter the list - FR-2810 (#7242) batch image canonical names on admin preset list - FR-2773 (#7153) preserve auto-selected resourcePresetId New sections: 1. What is a Deployment Preset? 2. (Admin) Manage Deployment Presets — list, filter, create, edit, delete (typed-confirm) 3. Using a Preset when Deploying a Model — preset detail, auto/manual deploy paths 4. Pre-populated Launcher Fields 5. Filtering by Tags Also adds book.config.yaml navigation entries under the Model Serving category in all 4 languages. Updated in all 4 languages (en/ko/ja/th). Screenshots flagged with TODO markers for separate capture. Linked from model_serving.md (PR B) so PR B's cross-references now resolve.
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 #7150 (FR-2773)
Summary
The Resource Preset row showed
-on the deployment launcher review step even though the user had a preset selected on step 3. Fixed by extending theapplyInitialValuesomit list so any field whose child component owns anautoSelectDefaultflow is left alone when its merged value is empty.Root cause
ResourcePresetSelect'sautoSelectDefaulteffect (a child) runs before the parent'sapplyInitialValueseffect.resourcePresetIdto the first available preset name.applyInitialValuesthen runs and calledform.setFieldsValue(merged)withmerged.resourcePresetId === undefined, clobbering the auto-selected value.ResourcePresetSelectusesuseControllableState_deprecated, whosestateRefretains the auto-selected value when the antd-injectedvalueisundefined. So the step-3 Select kept displaying the preset name (giving the user the impression it was selected), whileform.getFieldsValue()returnedundefined.values.resourcePresetId ? <ResourcePresetReviewDisplay … /> : '-'fell to the dash branch.The existing code already handled the same race for
resourceGroupvia_.omit(merged, 'resourceGroup'). This PR generalizes that omit list to also coverresourcePresetId.Test plan
bash scripts/verify.shpasses./deployments/create: select a resource group, allow auto-select to pick a preset on step 3, click Next → review step renders the preset name and resource slot icons (no-)./deployments/:id/edit): pre-filled preset still renders on review./deployments/createdirectly (no URL pre-fill) and skip to review immediately → preset row shows the auto-selected preset, not-.