Skip to content

feat(devbox): fix some little bug and add some little feat#6777

Closed
mlhiter wants to merge 11 commits into
labring:release-v5.1from
mlhiter:fix/little-bug-1
Closed

feat(devbox): fix some little bug and add some little feat#6777
mlhiter wants to merge 11 commits into
labring:release-v5.1from
mlhiter:fix/little-bug-1

Conversation

@mlhiter
Copy link
Copy Markdown
Member

@mlhiter mlhiter commented Mar 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 8, 2026 07:11
@mlhiter mlhiter requested a review from a team as a code owner March 8, 2026 07:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 autoRefreshEnabled flag to RefreshButton to 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.

Comment on lines 47 to 54
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
}
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- 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.
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Mar 8, 2026
@mlhiter mlhiter changed the title feat: do not refresh monitor when devbox is not running feat(devbox): fix some little bug and add some little feat Mar 8, 2026
mlhiter and others added 9 commits March 8, 2026 16:05
* 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.
@mlhiter mlhiter requested review from a team as code owners March 11, 2026 09:43
@mlhiter mlhiter closed this Mar 11, 2026
@mlhiter mlhiter deleted the fix/little-bug-1 branch March 11, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants