feat: add model folder picker actions in deployment add-revision modal#7475
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adds folder-management actions around model folder selection in the deployment add-revision modal, and adjusts BAIVFolderSelect label rendering while searching.
Changes:
- Adds Open/Create/Refresh actions next to model folder selects in Preset and Custom revision modes.
- Adds post-create auto-selection/refetch flow for newly created model folders.
- Hides the selected folder ID suffix in
BAIVFolderSelectwhile a search query is active.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
react/src/components/DeploymentAddRevisionModal.tsx |
Adds model folder action buttons, folder creation modal wiring, and refetch/auto-select behavior. |
packages/backend.ai-ui/src/components/fragments/BAIVFolderSelect.tsx |
Updates selected-label rendering to omit the ID suffix during search input. |
50a17a6 to
0d20384
Compare
f76df1c to
9048d4c
Compare
- Add Open/Create/Refresh buttons (Space.Compact) next to the model folder select in both Preset and Custom modes. - Mount a shared FolderCreateModalV2 (initialValues usage_mode='model'), and auto-select the newly created folder after creation. The mutation returns a VFolder global id; re-encode to a VirtualFolderNode global id so BAIVFolderSelect option matching succeeds. - BAIVFolderSelect: hide the trailing '(id)' on the selected label while the user is typing a search query, since the search input visually collides with the parenthetical id.
9048d4c to
5978a5d
Compare
0d20384 to
86bd35a
Compare

Stacked on #7458 (FR-2914)
Summary
Adds model folder picker actions to the deployment add-revision modal and tweaks
BAIVFolderSelect's search-time label rendering.DeploymentAddRevisionModalSpace.Compactaction group next to the model folder select in both Preset and Custom modes:useFolderExplorerOpener, decoded withtoLocalId).FolderCreateModalV2withinitialValues={{ usage_mode: 'model' }}so users can create a model-mode vfolder without leaving the modal.BAIVFolderSelectRef.refetch()(per-form refs so Preset and Custom forms refetch independently).VFolder(Strawberry) global id, butBAIVFolderSelect's value query reads fromvfolder_nodes(VirtualFolderNode, Graphene). Both encode the same UUID but with different__typename:prefixes, so the select's option matching would fail if we set the raw mutation id directly. Decode withsafeDecodeUuidand re-encode withtoGlobalId('VirtualFolderNode', uuid).BAIVFolderSelect(id)on the selected label while the user is typing a search query. The search input visually collides with the parenthetical id; the id is still shown in the dropdown options (optionRender) for disambiguation when picking.Test plan
(id)suffix; clearing the search restores it.BAIVFolderSelect(VFolderMountFormItem, RoleFormModal, AdminModelCardSettingModal, ImportArtifactRevisionToFolderModal) still render the selected label as expected when not searching.