Repository navigation
feat(ui): organize cloud environments by repository - #170892
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8aaf71fb71
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| environment.images.some( | ||
| (image) => | ||
| image.recipePreparation?.failure || | ||
| image.capture?.phase === "uncertain" || | ||
| (image.retirement?.checkpointId === image.checkpointId && Boolean(image.retirement)), |
There was a problem hiding this comment.
Mark all stale snapshot operations as needing attention
When crabbox.images.list returns a non-uncertain capture with stale: true, or a retirement targeting a superseded checkpoint, this predicate misses the warning state; the next branches report the repository as Building or Ready even though the provider treats stale captures and every pending retirement as operator warnings, and the previous UI counted both as attention. Include capture.stale and any retirement here so these cleanup failures remain visible in the repository status.
AGENTS.md reference: AGENTS.md:L78-L82
Useful? React with 👍 / 👎.
Shares the snapshot status rule between repository summaries and snapshot rows, and shares unassigned-preparation eligibility between repository grouping and unlabeled builds. Removes duplicate label arguments, a redeclared action props type, naming-only accessors, an input-only form-control helper, singleton fragments and consecutive store updates. Net production change: -41 lines across four Control UI files. No user-visible behavior change. Related: #170892, #170895, #170875, #171176 Refs: #171684
Settings > Cloud workers is now Cloud environments: one row per repository with a single status (Ready with its age, Building, Cold only, or Needs attention). Selecting a row opens its environment sheet: snapshot state, source commit and ages, where setup comes from, and the machine profile with a control that changes the repository default. Snapshot actions (Rebuild, Pin, Roll back, Delete) stay available per machine profile. The Profiles, Pool and Snapshots tabs are retired. Machine profiles, the ready-pool line, the plugin-wide snapshot retention policy, and machine-only images with their capture recovery live in a collapsed Advanced section. Config keys and the settings URL are unchanged. Refs: openclaw#170892
Shares the snapshot status rule between repository summaries and snapshot rows, and shares unassigned-preparation eligibility between repository grouping and unlabeled builds. Removes duplicate label arguments, a redeclared action props type, naming-only accessors, an input-only form-control helper, singleton fragments and consecutive store updates. Net production change: -41 lines across four Control UI files. No user-visible behavior change. Related: openclaw#170892, openclaw#170895, openclaw#170875, openclaw#171176 Refs: openclaw#171684
What Problem This Solves
Cloud-worker settings split repository preparation across Profiles, Pool, and Snapshots. Finding a repository's usable environment and its recovery actions requires switching between those views.
Solution
Replace the tabs with Cloud environments: one repository row and one status, opening a responsive environment sheet. The sheet contains snapshot facts and actions, recorded setup information, and the repository's default machine. Snapshot rows include every recorded machine profile, with the repository default first and checkpoint-specific Pin / Roll back / Delete actions. The single-profile sheet keeps its compact header menu.
Move profile management, the pool cap, plugin-wide snapshot retention, and machine images into collapsed Advanced, in that order. Machine-only uncertain captures, unlabeled builds, and legacy recovery hints remain accessible. Machine configuration application refreshes snapshot eligibility without navigation. Cleanup failures remain actionable even when the worker lifecycle still reports ready; unusable preparations are excluded from the ready count. Rebuild uses the existing local-repository preparation RPC and is disabled with a tooltip elsewhere. Remove the retired tab controllers, repository editor, manual-build dialog, strings, and superseded tests.
Impact
The settings URL stays
/settings/cloud-workers; navigation now says Cloud environments. ExistingcloudWorkers.*andplugins.entries.crabbox.config.*configuration remains valid, with no schema or migration change. Changing a repository's machine patches only its default profile; retention remains plugin-wide.The sibling
recipePreparationfields are optional: setup source, phase durations, and failure output appear only when reported. No snapshot size or setup data is invented. Every profile’s recorded failure remains visible when another profile has a newer successful setup. Capture, runtime compatibility, and New Session behavior are outside this PR.Evidence
9978d2eac6f0c7585d438fed75026d40e0255744before the final revision.pnpm test ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts ui/src/pages/cloud-workers/cloud-worker-snapshot-builds.test.ts ui/src/pages/cloud-workers/cloud-worker-repositories-config.test.ts ui/src/pages/cloud-workers/cloud-workers-page.test.tsx --maxWorkers=1— 24 passed, 42.21s wall.pnpm test ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts --maxWorkers=1— 7 passed, 44.61s wall. New coverage first reproduced both defects: saving the sole snapshot profile as a repository default and excluding unusable preparations from the ready count.pnpm test ui/src/pages/cloud-workers/cloud-worker-snapshot-builds.test.ts ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts --maxWorkers=1— 15 passed, 18.46s wall. Covers applied-configuration eligibility refresh, labeled and unlabeled cleanup failures, and build cancellation/dismissal, alongside default-profile and pool-count regressions.pnpm test ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts ui/src/components/settings-sidebar.test.ts --maxWorkers=1— 27 passed, 30.45s wall.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cloud-workers-settings.e2e.test.ts ui/src/e2e/cloud-workers-snapshots.e2e.test.ts— production UI build and 12 browser tests passed, 92.25s wall. Covers second-profile checkpoint targeting, repository and machine-only recovery acknowledgements, rebuild/cancel, failed-build dismissal, profile config preservation, reconnect, and admin scope.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cloud-workers-snapshots.e2e.test.ts— 4 passed, 60.10s wall.pnpm test ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts --maxWorkers=1— 8 passed, 22.03s wall. The added case first reproduced the hidden failure output.pnpm tsgo— passed, 61.46s wall.pnpm tsgo:ui— passed, 9.93s wall on the final source revision.pnpm tsgo:test:ui— incomplete: stopped after the autoreview blocker; UI pages, E2E, and other test shards passed (133.8s / 104.2s / 74.4s). Total command 959.59s wall including artifact-lock wait; remaining broad shards were cancelled (exit 143), not claimed as passing.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/pages/cloud-workers/cloud-worker-repository-machine.tsx ui/src/pages/cloud-workers/cloud-worker-snapshot-rows.tsx ui/src/pages/cloud-workers/cloud-worker-machine-pool.tsx ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts— passed with no diagnostics, 85.46s wall (including artifact-lock wait).node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/pages/cloud-workers/cloud-worker-environment-model.ts ui/src/pages/cloud-workers/cloud-worker-machine-pool.tsx ui/src/pages/cloud-workers/cloud-worker-snapshot-rows.tsx ui/src/pages/cloud-workers/cloud-worker-environments.tsx ui/src/pages/cloud-workers/cloud-worker-snapshot-builds.test.ts ui/src/pages/cloud-workers/cloud-worker-snapshots.test-support.ts— passed, 110.29s wall.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/pages/cloud-workers/cloud-worker-snapshot-rows.tsx ui/src/pages/cloud-workers/cloud-worker-snapshots.test.ts— passed, 45.01s wall.node --import ./scripts/tsx.mjs scripts/run-stylelint.mts ui/src/pages/cloud-workers/cloud-worker-environments.css— passed, 3.32s wall.pnpm ui:i18n:baseline— passed, 29.43s wall;pnpm ui:i18n:verify— passed, 63.28s wall on the final revision.pnpm format:checkon all changed surviving files — passed, 2.11s wall; targeted docs MDX checks — passed; final three-file check passed (1267ms formatter time);git diff --check— passed.The lead owns integrated live AWS proof; this lane used synthetic mocked Gateway data and created no cloud leases. No full test suite was run locally.
All captures below use inspected synthetic repositories and mocked Gateway responses.
Advanced, recovery, multiple profiles, and optional setup diagnostics
Release-note context
Settings now groups cloud environments by repository, with compact snapshot/setup/machine details and per-profile checkpoint actions. Advanced settings retain machine profiles, pool capacity, shared snapshot retention, and recovery for machine-only images.