lablup / lablup/backend.ai-webui
Deployment Add Revision model-card source: complete mode-transfer folder carry + E2E coverage
- Dominant language
- TypeScript
- Stars
- 133
- Forks
- 81
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 344
Description
Follow-up to FR-3314 (PR #8246), covering two review items deferred from that PR to keep its scope tight.
## 1. Card → Custom mode-transfer: carry the card's backing folder
In `DeploymentAddRevisionModal.handleModeChange`, the Preset → Custom transition currently carries only `presetValues.modelFolderId`. When the user is in Preset mode with the **Model Card** source selected, the picked model folder lives in `selectedCardVfolderId` (a raw vfolder UUID), not in `modelFolderId`, so switching to Custom loses the backing folder.
The Custom → Preset direction was already fixed in PR #8246 (it now forces `presetModelSource: 'folder'`, clears the card selection, and carries the folder). The remaining Card → Custom direction needs the raw `selectedCardVfolderId` UUID **re-encoded to the global VFolder id** that the Custom form's `modelFolderId` field expects (the Custom submit path runs `toLocalId(values.modelFolderId)`), so a raw UUID cannot be carried directly.
**Acceptance**: entering Preset mode, selecting a Model Card, then switching to Custom pre-fills the Custom Model Folder selector with the card's backing folder.
## 2. E2E coverage for the Model Card branch
The new Model Card source path in the Add Revision flow is not covered by the existing suite (`e2e/serving/deployment-lifecycle.spec.ts`, which tests Preset-mode fields and the Model Folder submission flow). Add coverage for:
- toggling the source to **Model Card**,
- compatible-preset scoping to the selected card's `availablePresets`,
- source reset behavior when toggling back to Model Folder,
- submission of the card's backing vfolder as `modelMountConfig.vfolderId`.
## References
- `react/src/components/DeploymentAddRevisionModal.tsx` (`handleModeChange`, `handlePresetFinish`)
- `react/src/components/ModelCardSelect.tsx`
- `e2e/serving/deployment-lifecycle.spec.ts`
JIRA Issue: FR-3316
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in react/src/components/DeploymentAddRevisionModal.tsx at handleModeChange and handlePresetFinish, then review ModelCardSelect.tsx to trace the selected card and backing vfolder values. Run e2e/serving/deployment-lifecycle.spec.ts and extend its Model Card coverage. Done means Card → Custom preserves the folder, compatible presets follow availablePresets, reset behavior works, and submission uses the card's vfolder ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100