feat(openclaw): lifecycle progress banner + live podman readiness#772
feat(openclaw): lifecycle progress banner + live podman readiness#772Nikhil (shadowfax92) merged 3 commits intodevfrom
Conversation
a9510fb to
e7c88e5
Compare
|
Greptile (@greptileai) review |
|
Claude (@claude) review |
|
Claude finished Nikhil (@shadowfax92)'s task in 3m 18s —— View job Code Review
SummarySolid, well-scoped PR. The core change (removing Issues1.
|
e7c88e5 to
61b2c60
Compare
✅ Tests passed — 794/797
|
Greptile SummaryThis PR removes the process-local Confidence Score: 5/5Safe to merge — no P0/P1 issues found; all changes are well-scoped, tested, and logically correct. The backend cache removal is a clean single-concern change with 4 targeted tests verifying live re-check, init, start, and external-stop detection. The UI progress banner correctly derives state from TanStack Query mutation flags without new server API surface, and the mutual-exclusion of the No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as AgentsPage
participant Hook as useOpenClawMutations
participant API as BrowserOS Server
participant OCS as OpenClawService
participant PR as PodmanRuntime
UI->>Hook: handleSetup() → setupOpenClaw()
Note over Hook: setupMutation.isPending=true<br/>pendingGatewayAction='setup'
Hook-->>UI: lifecyclePending=true (banner shown, errors suppressed)
Hook->>API: POST /claw/setup
API->>OCS: setup() [withLifecycleLock]
OCS->>PR: ensureReady() [live getMachineStatus()]
PR->>PR: getMachineStatus() — no cache
alt machine not initialized
PR->>PR: initMachine()
end
alt machine not running
PR->>PR: startMachine()
end
PR-->>OCS: machine ready
OCS->>OCS: startGateway / waitForReady / probe
OCS-->>API: done
API-->>Hook: 200 OK
Note over Hook: setupMutation.isPending=false<br/>pendingGatewayAction=null
Hook->>API: invalidateQueries (status + agents)
Hook-->>UI: lifecyclePending=false (banner gone, normal UI restored)
Reviews (1): Last reviewed commit: "fix: address review comments for opencla..." | Re-trigger Greptile |
Summary
PodmanRuntime.machineReadycache so every lifecycle action re-validates live Podman machine state; cache drift no longer causes a stale "ready" bit to outlive the real machine.Design
Spec:
packages/browseros-agent/docs/plans/2026-04-20-openclaw-lifecycle-progress-design.md.Chose the minimal local-progress design (Option 1 in the spec). Backend fix is scoped to removing the stale readiness cache; the existing in-process lifecycle lock on
OpenClawServiceis preserved. The UI derivespendingGatewayActionpurely from React Query mutation state — no new server API surface. Progress state is per-session only; if the user reloads mid-action the banner is lost until normal status settles, which is acceptable for this iteration.start()stays idempotent (probes the existing gateway before recreating) andensureGatewayPortAllocated()keeps the persisted port when the gateway is already reachable.Test plan
bun run typecheckinapps/serverandapps/agent— both clean.bun test tests/api/services/openclaw/inapps/server— 80/80 pass; includes 4 newensureReadytests covering live-state re-check, init-when-uninitialized, start-when-stopped, external-stop detection on next call.lifecyclePendingclears.