lablup / lablup/backend.ai-webui
Disable file browser access during model service update
- Dominant language
- TypeScript
- Stars
- 133
- Forks
- 81
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 344
Description
## Why This Work is Needed
When a user updates an existing model service via `ServiceLauncherPageContent`, the form fields are disabled while the `modify_endpoint` mutation is in flight (see `react/src/components/ServiceLauncherPageContent.tsx` around the `disabled={mutationToCreateService.isPending || isProjectMismatch`} guard on the Form). However, the **file browser entry points embedded in the same page are not gated** by that in-flight state. Specifically:
- The mount table (`VFolderTable`) renders folder name cells as links that call `generateFolderPath(vfolder.id)` and open `FolderExplorerModal` via the `?folder=` query param. These links remain clickable while the update mutation is pending.
- Downstream, `FolderExplorerModal` exposes `FileBrowserButton`, which can start a filebrowser session and mutate files in the mounted vfolder.
As a result, users can open the file browser and modify files in a vfolder that is about to be remounted into the updated service — a race condition that can corrupt the served model files or produce a service state that doesn't match what the user just submitted.
## Expected Outcomes
- While `mutationToCreateService.isPending` is true on the update path, file browser access is blocked from `ServiceLauncherPageContent`:
- Folder name links in `VFolderTable` are non-clickable (or routed through a disabled state) during the update.
- `FolderExplorerModal` / `FileBrowserButton` access originating from the launcher page is disabled or hidden.
- Users see clear feedback that the file browser is temporarily unavailable (tooltip or inline message) rather than silent no-op.
- Access is restored automatically once the mutation settles (success or error).
- No regression for the **create** path — gating only applies during the update flow (or is applied uniformly to both if cleaner).
## Key References
- `react/src/components/ServiceLauncherPageContent.tsx` — `ServiceLauncherPageContentModifyMutation`, Form-level `disabled` guard
- `react/src/components/VFolderTable.tsx` — folder link cell using `generateFolderPath`
- `react/src/components/FolderExplorerOpener.tsx` — `useFolderExplorerOpener` hook (opens modal via query param)
- `react/src/components/FolderExplorerModal.tsx` — modal rendered from the query param
- `react/src/components/FileBrowserButton.tsx` — session-launching file browser button
JIRA Issue: FR-2526
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.