Skip to content

feat(ui): organize cloud environments by repository - #170892

Merged
steipete merged 2 commits into
mainfrom
snap/environments-ui
Oct 13, 2026
Merged

steipete merged 2 commits into
mainfrom
snap/environments-ui

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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. Existing cloudWorkers.* and plugins.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 recipePreparation fields 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

  • Rebased onto 9978d2eac6f0c7585d438fed75026d40e0255744 before 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.
  • Final review regressions: 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.
  • Final cutover regression check: 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.
  • Final snapshot-flow rerun: 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.
  • Final per-profile failure regression: 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.
  • Targeted type-aware lint covered all changed UI TypeScript files. Final affected-file check: 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).
  • Final cleanup-state lint: 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.
  • Final per-profile rendering lint: 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:check on 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.
  • Independent Codex autoreview through P2 — scoped-clean, no accepted/actionable findings. Review fixes have focused regressions for default-profile persistence, usable pool counting, applied-config refresh, unlabeled builds, cleanup failures, and per-profile setup failures.
  • Synthetic screenshot matrix using the same bundled mocked-Gateway harness — passed, 131.51s wall; captures inspected before upload. Additional per-profile failure desktop/narrow capture and browser assertion passed in 94.91s wall. Desktop/narrow × light/dark, expanded Advanced, repository/machine recovery, multiple profile actions, optional setup diagnostics, empty and permission states.

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.

View Before After
desktop, light Before: desktop, light After: desktop, light
narrow, light Before: narrow, light After: narrow, light
desktop, dark Before: desktop, dark After: desktop, dark
narrow, dark Before: narrow, dark After: narrow, dark
Advanced, recovery, multiple profiles, and optional setup diagnostics

After: Advanced expanded

After: repository recovery

After: machine recovery, narrow

After: multiple profile snapshots

After: optional setup diagnostics

After: profile failure, desktop

After: profile failure, narrow

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.

@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T09:26:19.593629Z 8aaf71f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL labels Oct 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +149 to +153
environment.images.some(
(image) =>
image.recipePreparation?.failure ||
image.capture?.phase === "uncertain" ||
(image.retirement?.checkpointId === image.checkpointId && Boolean(image.retirement)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@steipete
steipete merged commit 525073d into main Oct 13, 2026
89 of 90 checks passed
@steipete
steipete deleted the snap/environments-ui branch October 13, 2026 11:03
steipete added a commit that referenced this pull request Oct 14, 2026
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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant