Skip to content

fix(ui): separate parent and child session activity - #137789

Merged
fuller-stack-dev merged 2 commits into
mainfrom
openclaw/fix-parent-child-activity-indicator
Sep 4, 2026
Merged

fuller-stack-dev merged 2 commits into
mainfrom
openclaw/fix-parent-child-activity-indicator

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

Summary

  • drive the chat working timer from the selected session's direct run only
  • retain descendant-aware Stop controls and sidebar task activity
  • project a live subagent as active on its own sessions.list row

Reproduction and cause

After a parent turn completed, a visible child session could remain active. The parent row correctly exposed descendant activity for control/sidebar projection, but the chat pane reused the combined abortability predicate as its working state. That kept the parent timer and accessibility announcement running. Separately, a live subagent could be present in the subagent registry while sessions.list omitted direct activity on the child row, leaving the sidebar idle even though the footer reported a running task.

The fix keeps the ownership boundary explicit: direct session activity drives working UI, descendant activity remains available for abort controls and sidebar rollups, and the live subagent registry is a direct liveness source only for the child session key.

Verification

  • pnpm vitest run ui/src/pages/chat/chat-view.test.ts ui/src/pages/chat/run-lifecycle.test.ts ui/src/pages/chat/chat-pane-run-activity.test.ts src/gateway/server-methods/session-active-runs.test.ts (419 passed)
  • post-rebase focused suite (63 passed)
  • pnpm ui:build (passed, performance budgets passed)
  • pnpm check:changed (all gates passed through the final guard; wrapper hit its 10-minute timeout during that guard)
  • node --import ./scripts/tsx.mjs scripts/check-no-pairing-store-group-auth.mts (passed)
  • autoreview: scoped clean at required P0 threshold

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Sep 4, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 11:59 PM ET / September 4, 2026, 03:59 UTC.

ClawSweeper review

What this changes

The PR makes Control UI working state follow the selected session’s own run while the Gateway separately projects a live or queued subagent onto its child session row.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 3 items remain

The earlier lifecycle-generation finding is addressed and the code cleanly separates direct session activity from descendant abortability. Keep this member-authored, maintainer-labeled PR open until it has the repository-required live dev-Gateway UI proof; the supplied screenshots are explicitly synthetic Gateway responses.

Priority: P2
Reviewed head: ffb2e689a8e67366fdcaef03e81821d5d641df29

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and targeted regression coverage are solid, but the required real Gateway/UI behavior proof is still absent.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 7 items Current-main behavior: The fetched current main still treats only queued subagents as direct session activity, so an executing child held only in the subagent registry is absent from this projection.
Gateway repair: The PR recognizes both current-lifecycle live and queued direct child runs, preserves capacity-wait projection, and leaves parent matching keyed to the child session only.
Lifecycle fence: Direct subagent liveness now requires the run context to belong to the current Gateway lifecycle, resolving the prior stale-lifecycle finding at the liveness owner.
Findings None None.
Security None None.

How this fits together

The Gateway turns run-registry state into session rows consumed by the Control UI. The chat pane uses those rows to show working indicators while preserving parent-level Stop controls for descendant work.

flowchart LR
  A[Parent and child agent runs] --> B[Subagent run registry]
  B --> C[Gateway session activity projection]
  C --> D[Session list rows]
  D --> E[Control UI chat pane]
  E --> F[Working indicator]
  E --> G[Descendant Stop control]
Loading

Before merge

  • Resolve merge risk (P1) - The submitted screenshots are explicitly driven by synthetic Gateway responses, so they do not prove the live Gateway session projection and Control UI stay consistent through a parent/child run.
  • Resolve merge risk (P1) - Production code is +4 net lines; that growth appears justified by the new lifecycle-scoped liveness contract, but no smaller net-neutral form is apparent from the current owner boundaries.
  • Complete next step (P2) - Attach sanitized live dev-Gateway video proof of the parent/child activity and queued-child transitions before merge.
Agent review details

Security

None.

PR surface

Source +4, Tests +154. Total +158 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 9 39 35 +4
Tests 3 157 3 +154
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 196 38 +158

Review metrics

Metric Value Why it matters
Production versus test delta production +39/-35 (net +4); tests +157/-3 (net +154) The small production increase implements the lifecycle-aware child projection and explicit UI state boundary; the larger test delta covers its session-state regressions.

Mantis proof suggestion

A redacted web chat interaction recording of the real parent/child session states would materially validate the missing live Control UI proof. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis verify the live web chat parent/child session activity transition and return redacted evidence that the completed parent is idle while its child remains active.

Merge-risk options

Maintainer options:

  1. Prove the live session transition (recommended)
    Attach a sanitized recording from an isolated live dev Gateway showing the parent and child activity states plus queued-child status before merge.

Technical review

Best possible solution:

Land the direct-versus-descendant activity split after a sanitized live dev-Gateway recording demonstrates an idle completed parent, an active visible child, and queued-child status through the real session flow.

Do we have a high-confidence way to reproduce the issue?

Yes—current main derives selected-chat working state from descendant-aware abortability and only projects queued direct subagents; the submitted boundary tests express the concrete parent/child scenario. This read-only review did not execute the tests.

Is this the best way to solve the issue?

Yes—the patch introduces one explicit direct-activity fact while retaining descendant-aware Stop behavior, which is cleaner than compensating at individual UI consumers. The remaining gap is live end-to-end validation, not an alternate design.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7ace0d00c7a6.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded correctness fix for Control UI session activity without evidence of data loss, security impact, or availability loss.
  • merge-risk: 🚨 session-state: The PR changes how live and queued agent-run state is assigned to parent and child session rows, so live-flow proof is needed before merge.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach a sanitized live dev-Gateway video showing a completed parent idle, its visible child active, and a queued child retaining queued status.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-04T02:06:36.538Z sha 8ced8b8 :: blocked before merge. :: [P2] Fence direct subagent liveness to the active lifecycle

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M and removed size: S labels Sep 4, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Addressed the lifecycle-generation finding and a related queued-child regression in ffb2e689a8e67366fdcaef03e81821d5d641df29.

  • isSubagentRunLive now rejects retained run contexts from a retired Gateway lifecycle. The regression checks the live child, idle parent, and child after lifecycle rotation.
  • Direct subagent liveness no longer overrides capacity-wait state. Both failing native collector admission cases now pass; the regression also covers an already-started child waiting for capacity.
  • Selected-chat working state remains separate from descendant-aware Stop controls and sidebar task activity.

Verification:

pnpm exec vitest run src/gateway/session-utils.queued-collector-admission.test.ts src/gateway/server-methods/session-active-runs.test.ts ui/src/pages/chat/chat-pane-run-activity.test.ts ui/src/pages/chat/run-lifecycle.test.ts ui/src/pages/chat/chat-view.test.ts --reporter=dot

421 tests passed. Before the queue fix, both native collector admission cases failed with expected undefined to be 'queued'. Fresh autoreview of the complete candidate returned no accepted/actionable P0 findings. Changed-file checks and the production UI build are being rerun; required CI is pending at https://github.com/openclaw/openclaw/actions/runs/33834778026 .

The screenshots below exercise the real Control UI in Chromium with synthetic Gateway RPC responses. They are not evidence of a live model-backed Gateway flow. They show the completed parent with zero working indicators, the selected child with one working indicator, and one child sidebar spinner in both cases. The local proof commit 8a57a6d71615b7a818e34e7d86898676670f3588 and hosted head have identical tree 8f97768082fe9ae9deb2993cf2af7755c90aefef.

Completed parent idle while its child remains active in the sidebar

Selected child retains its working indicator and sidebar activity

Release-note impact: Control UI working timers follow the selected session's own turn, while active visible children keep their own activity and queued children retain queued status.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Live dev-Gateway before/after proof is now complete.

Both captures use an isolated local Gateway, a separate state directory, a loopback-only port, the real Control UI, and real WebSocket RPC. Session entries and run owners are seeded through the canonical session accessor, registerSubagentRun, and agent-run registry. No Gateway responses are mocked. No model/provider is called; this fixture isolates activity ownership and lifecycle transitions.

Observation Base 6b97bae2e15 Head ffb2e689a8e
Parent has its own live turn Working Working
Parent turn owner cleared; child continues Incorrectly working Idle
Child selected Working Working
Old child after Gateway lifecycle rotation Incorrectly working Idle

The child sidebar remains active while the child is live. On the fixed head it also becomes idle after lifecycle rotation. Raw sessions.list responses were captured alongside the DOM assertions. Both task-owned Gateways shut down after capture; the operator's running Gateway was not used or changed.

Before:

pr-137789-base-live-flow.mp4

After:

pr-137789-fixed-live-flow.mp4

MP4 SHA-256:

base   0429d3f0a013aaadb3812292c60b9ac322dc3266a1b9c3a7de1ae43912662974
head   6f14f029b4803fb3878824e6603766f9b3adf561d86948f41b41b14c135d472c

Final local gates on the hosted head passed: pnpm check:changed, pnpm ui:build, and native scripts/pr review-tests 137789 src/gateway/session-utils.queued-collector-admission.test.ts src/gateway/server-methods/session-active-runs.test.ts ui/src/pages/chat/chat-pane-run-activity.test.ts. The broader 421-test focused run and fresh autoreview also passed. Native review artifacts validate with zero findings.

Hosted CI's only failure was the npm advisory service timing out in security-fast, plus its dependent CI gate. Those jobs are on their first rerun. No security or branch-protection gate is bypassed.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@fuller-stack-dev

fuller-stack-dev commented Sep 4, 2026 •

Copy link
Copy Markdown
Member Author

The npm advisory interruption is resolved. CI attempt 3 completed successfully on unchanged head ffb2e689a8e67366fdcaef03e81821d5d641df29: https://github.com/openclaw/openclaw/actions/runs/33834778026 . Both security-fast and required openclaw/ci-gate passed. No check, advisory authority, or branch protection was bypassed.

Pre-merge evidence remains valid at this exact head:

  • 421 focused tests: pnpm exec vitest run src/gateway/session-utils.queued-collector-admission.test.ts src/gateway/server-methods/session-active-runs.test.ts ui/src/pages/chat/chat-pane-run-activity.test.ts ui/src/pages/chat/run-lifecycle.test.ts ui/src/pages/chat/chat-view.test.ts --reporter=dot.
  • pnpm check:changed, pnpm ui:build, native scripts/pr review-tests 137789 src/gateway/session-utils.queued-collector-admission.test.ts src/gateway/server-methods/session-active-runs.test.ts ui/src/pages/chat/chat-pane-run-activity.test.ts, and fresh scoped autoreview passed.
  • Live isolated dev-Gateway before/after recordings and exact base/head identities: fix(ui): separate parent and child session activity #137789 (comment) .

Latest review follow-through: the live video closes the synthetic-RPC-only evidence gap for parent completion, active child visibility, and lifecycle retirement. A separate queued-child video is intentionally omitted: queued capacity transitions are covered by the native collector integration tests and the Gateway current-lifecycle regression. The live fixture uses canonical seeded run owners, not a provider/model call. The net four production lines are retained because the shared lifecycle fence and direct-session projection are distinct required checks; the obsolete combined working/abortability path and redundant activity prop were removed.

The native prepare and head-pinned squash-merge procedure is now running. This comment is not yet a merge confirmation.

@fuller-stack-dev
fuller-stack-dev merged commit d579e4f into main Sep 4, 2026
461 of 465 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/fix-parent-child-activity-indicator branch September 4, 2026 04:30
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
* fix(ui): separate direct and descendant session activity

* fix(gateway): preserve queued subagent capacity state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant