feat(devbox): fix some little bug and add some little feat#6777
feat(devbox): fix some little bug and add some little feat#6777mlhiter wants to merge 11 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the DevBox detail monitoring flow in the frontend so that monitor refresh behavior is suppressed when the DevBox isn’t in a running state, and adds user-facing messaging to explain the limitation.
Changes:
- Add a new i18n string explaining that monitoring is only available when the DevBox is running (EN/ZH).
- Add an
autoRefreshEnabledflag toRefreshButtonto allow disabling interval-based refresh. - Gate monitor refresh/polling in the DevBox detail page and monitor panel based on
DevboxStatusEnum.Running, including a warning toast on manual refresh when not running.
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 |
|---|---|
| frontend/providers/devbox/message/zh.json | Adds ZH translation for “monitoring requires running” warning. |
| frontend/providers/devbox/message/en.json | Adds EN translation for “monitoring requires running” warning. |
| frontend/providers/devbox/components/RefreshButton.tsx | Introduces autoRefreshEnabled to disable interval refresh when needed. |
| frontend/providers/devbox/app/[lang]/(platform)/devbox/detail/[name]/page.tsx | Gates periodic queries based on running status. |
| frontend/providers/devbox/app/[lang]/(platform)/devbox/detail/[name]/components/Monitor.tsx | Blocks manual refresh when not running, disables auto-refresh, and shows a toast warning. |
| useQuery( | ||
| ['devbox-detail-pod'], | ||
| () => { | ||
| if (devboxDetail?.isPause) return null; | ||
| return intervalLoadPods(devboxName, true); | ||
| }, | ||
| ['devbox-detail-pod', devboxName, devboxDetail?.status.value], | ||
| () => intervalLoadPods(devboxName, true), | ||
| { | ||
| enabled: !devboxDetail?.isPause, | ||
| enabled: isRunning, | ||
| refetchOnMount: true, | ||
| refetchInterval: 3000 | ||
| refetchInterval: isRunning ? 3000 : false | ||
| } |
There was a problem hiding this comment.
intervalLoadPods is used to poll and update devboxDetail.status/sshPort (via getMyDevboxList). With enabled: isRunning, this polling stops for non-Running transient states (e.g. Pending/Stopping) and for a Stopped DevBox that is being started, which can leave the detail page status stale unless another explicit refetch happens. Consider decoupling this from the monitor logic and enabling status polling for transitional/non-terminal states (e.g. not Shutdown/Delete), or reverting to the prior !devboxDetail?.isPause gating if that matches the intended behavior.
- Introduced a new utility for normalizing and validating mount paths, ensuring they meet specific criteria. - Updated the NetworkStorage component to utilize the new normalization function for existing paths. - Enhanced error handling in the createDevbox schema to provide clearer messages for invalid mount paths. - Added translations for new error messages related to protected mount paths in both English and Chinese. - Refactored the NetworkStorageDrawer to integrate improved path validation logic.
* fix: upload file bug * fix: go to detail page immediately
labring#6780) refactor(deploy): remove kube-rbac-proxy configuration from deploy.ya… (labring#6779) * refactor(deploy): remove kube-rbac-proxy configuration from deploy.yaml and templates * refactor(webhooks): update conditional checks for image build and registry login * refactor(webhooks): update conditional checks for image build and registry login --------- Signed-off-by: cuisongliu <cuisongliu@qq.com> Co-authored-by: cuisongliu <cuisongliu@qq.com>
fix(desktop): close correct window by using component pid (labring#6781) fix(desktop): close correct window by using component pid instead of currentAppPid Co-authored-by: jingyang <72259332+zjy365@users.noreply.github.com>
🤖 Release sealos for sealos using github-actions. Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Introduced a new utility for normalizing and validating mount paths, ensuring they meet specific criteria. - Updated the NetworkStorage component to utilize the new normalization function for existing paths. - Enhanced error handling in the createDevbox schema to provide clearer messages for invalid mount paths. - Added translations for new error messages related to protected mount paths in both English and Chinese. - Refactored the NetworkStorageDrawer to integrate improved path validation logic.
No description provided.