Skip to content

fix: show active sessions while new work starts - #141236

Merged
shakkernerd merged 1 commit into
mainfrom
fix-activity-snapshot-publication
Sep 7, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix-activity-snapshot-publication

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where Live activity could keep active sessions hidden while other sessions repeatedly started work. Follow-up to #141045.

Why This Change Was Made

Publish safely reconciled session rows while refreshing for new membership. Keep the existing guards against ambiguous run identities and event-buffer overflow. An incomplete empty result keeps loading feedback; an ordinary refresh preserves the confirmed empty state.

User Impact

Already-running work appears without waiting for all other sessions to become quiet. Completed or replaced runs retain their existing stale-snapshot protection.

Evidence

  • Three successful snapshots containing stable running work previously displayed zero rows until a quiet fourth response. The same browser scenario now displays that row after every raced response, using the same four requests.
  • 47 focused UI tests and 3 bundled Activity browser tests pass. Coverage includes cold entry, refresh, completion/replacement races, disconnect, visibility, error/retry, and incomplete versus confirmed empty feedback.
  • All 20 applicable native changed checks pass. The complete core-test type graph passes in the complementary exact-head CI run; the full CI run is green.
  • Independent review through P2 is clean. The inspected 11.44-second recording below shows the complete race and empty-state controls, with no page errors.

Visual evidence

View Before After
After three successful raced snapshots Before: Active sessions still shows Loading after three successful snapshots containing stable work After: stable running work remains visible through all three successful raced snapshots
Quiet fourth response preserves the existing behavior Before: a quiet fourth response finally displays stable running work After: the same stable running work remains visible following the quiet fourth response

Race, quiet recovery and empty-state controls

activity-snapshot-7-snapshot-publication-and-empty-controls.webm
Visual verification details
  • Baseline: 99415ce
  • Exact head: 680a090586741abea170e360aab9f6bca46c60fc
  • Scenario: Open Live activity with stable running work in every snapshot. Deliver a different transient start before each of three successful replies and its terminal event before the next snapshot; then return a quiet fourth response. Additional final-head controls distinguish incomplete empty replies from confirmed empty state and preserve that state during an ordinary refresh.
  • Runtime/build: OpenClaw Control UI source-mode app at 680a090, Node 24.19.0, Chromium 144.0.7559.0, synthetic repository mock Gateway. Both sides use 1440x1000, dark theme, en-US, UTC, reduced motion and blocked service workers.
  • Stable rows after raced replies: Before 0,0,0; after 1,1,1
  • Primary paired request count: Four activeOnly requests on both revisions; the same stable A in every response
  • Incomplete empty response: Loading remains visible, no empty-state claim, aria-busy=true
  • Quiet empty response and ordinary refresh: No active sessions is shown after confirmation and remains shown during a normal refresh; aria-busy reflects the pending request
  • Recorded proof: 11.44 seconds, 286 frames, no page errors; all frames decode
  • Baseline Activity modules, mock harness and relevant styles are unchanged from the original capture through branch base 5d895d3; baseline-equivalence.json records the comparison.
  • Every changed source hash and the recorder hash match exact final head 680a090; source remained unchanged throughout capture.
  • Both paired baseline screenshots, all four after screenshots, the full after timeline at quarter-second intervals and its exact final frame were inspected. The original recordings remain intact.
  • Factual cues identify the otherwise invisible Gateway event/reply order; they do not change production state or rendered results.
  • Synthetic session labels and a public model ID only; no credentials, private messages or personal data visible.
  • The preserved baseline predates sidebar running-indicator presentation changes. The compared Activity panel, snapshot data, event order and request count remain equivalent; the sidebar is outside this repair.

Empty-state controls

Incomplete snapshot Confirmed empty snapshot
An incomplete empty snapshot keeps Loading visible A quiet empty snapshot confirms no active sessions

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 7, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 9:39 AM ET / 13:39 UTC.

ClawSweeper review

What this changes

Live activity shows safely reconciled running sessions while refreshing for newly started work and distinguishes incomplete empty snapshots from confirmed inactivity.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still withholds usable snapshots during repeated session starts. No introduced correctness or security defect was found, and the updated browser evidence addresses the previous review request.

Priority: P2
Reviewed head: 680a090586741abea170e360aab9f6bca46c60fc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with relevant regression coverage and browser evidence for the changed behavior.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The recorded exact-head Chromium/source-UI scenario exercises the Activity controller through the repository mock Gateway and reports stable rows after every raced response, plus correct empty-state controls. Newly attached before/after evidence addresses the prior request; media retrieval was unavailable for independent visual inspection here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The recorded exact-head Chromium/source-UI scenario exercises the Activity controller through the repository mock Gateway and reports stable rows after every raced response, plus correct empty-state controls. Newly attached before/after evidence addresses the prior request; media retrieval was unavailable for independent visual inspection here.
Evidence reviewed 8 items Current main still contains the publication gap: Current main schedules another refresh instead of publishing whenever reconciliation requires membership catch-up, even when existing rows are safe.
Publication remains guarded: The introduced publication condition requires both a non-overflowed event buffer and safe reconciled rows. Ambiguous run identities still prevent publication; missing membership independently schedules catch-up.
Meaningful regression coverage: The tests exercise repeated raced snapshots on initial entry and refresh, failure/retry after incomplete emptiness, disconnect cleanup, and replacement-run protection. Rendering tests distinguish incomplete emptiness from ordinary empty refreshes. Tests were inspected, not executed in this read-only review.
Findings None None.
Security None None.

How this fits together

Live activity combines Gateway session snapshots with incoming session-change events. Its browser controller reconciles these inputs before displaying current running or queued sessions.

flowchart TD
  A[Gateway session snapshot] --> C[Reconcile current work]
  B[Session change events] --> C
  C --> D{Known rows safe?}
  D -->|Yes| E[Display active sessions]
  D -->|No| F[Retain previous safe snapshot]
  C --> G[Refresh missing membership]
  G --> A
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +10, Tests +127. Total +137 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 20 10 +10
Tests 2 127 0 +127
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 147 10 +137

Review metrics

None.

Technical review

Best possible solution:

Publish certified rows promptly while retaining bounded catch-up, stale-run protection, and truthful empty-state feedback.

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

Yes, from source: deliver an unseen session start before each snapshot containing stable running work, and current main repeatedly discards those usable snapshots. This review did not execute the scenario.

Is this the best way to solve the issue?

Yes. Separating safe publication from membership completeness repairs the existing controller without adding another query path or weakening run-identity and overflow guards.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against dcc733dc20e8.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The recorded exact-head Chromium/source-UI scenario exercises the Activity controller through the repository mock Gateway and reports stable rows after every raced response, plus correct empty-state controls. Newly attached before/after evidence addresses the prior request; media retrieval was unavailable for independent visual inspection here.

Label justifications:

  • P2: This fixes misleading Live activity visibility during concurrent starts without changing execution or message delivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The recorded exact-head Chromium/source-UI scenario exercises the Activity controller through the repository mock Gateway and reports stable rows after every raced response, plus correct empty-state controls. Newly attached before/after evidence addresses the prior request; media retrieval was unavailable for independent visual inspection here.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded exact-head Chromium/source-UI scenario exercises the Activity controller through the repository mock Gateway and reports stable rows after every raced response, plus correct empty-state controls. Newly attached before/after evidence addresses the prior request; media retrieval was unavailable for independent visual inspection here.

Evidence

What I checked:

  • Current main still contains the publication gap: Current main schedules another refresh instead of publishing whenever reconciliation requires membership catch-up, even when existing rows are safe. (ui/src/pages/activity/session-activity-controller.ts:262, dcc733dc20e8)
  • Publication remains guarded: The introduced publication condition requires both a non-overflowed event buffer and safe reconciled rows. Ambiguous run identities still prevent publication; missing membership independently schedules catch-up. (ui/src/pages/activity/session-activity-controller.ts:266, 680a09058674)
  • Meaningful regression coverage: The tests exercise repeated raced snapshots on initial entry and refresh, failure/retry after incomplete emptiness, disconnect cleanup, and replacement-run protection. Rendering tests distinguish incomplete emptiness from ordinary empty refreshes. Tests were inspected, not executed in this read-only review. (ui/src/pages/activity/current-work.test.ts:70, 680a09058674)
  • Existing product contract: The documented Active sessions section loads running and queued sessions on entry and reconnect, updates while open, and distinguishes failed or disconnected reads from inactivity. Public docs: docs/web/control-ui/settings.md. (docs/web/control-ui/settings.md:346, 680a09058674)
  • Updated browser evidence and review continuity: The supplied snapshot, sourceRevision e48068cb98757b25bb57053ed30a017845922c317f523c8d716f4eea97d4f35b, documents Chromium running the source UI at the exact reviewed head with the repository mock Gateway. Stable rows after three raced replies change from 0,0,0 to 1,1,1 with four requests on both revisions; incomplete and confirmed empty controls are also recorded. Before/after images and an 11.44-second recording now accompany these observations, addressing the prior capture request. Attachment retrieval failed in this reviewer environment, so the media was not independently visually inspected. (680a09058674)
  • Related merged feature and routing history: The supplied GitHub context verifies feat: show active sessions in Live activity #141045 as merged. Local history associates the current-work implementation with its merge commit; this PR repairs a remaining publication race rather than duplicating that feature. (ui/src/pages/activity/current-work.ts:105, 99415ced11be)

Likely related people:

  • Shakker: Raw commit 99415ce adds ui/src/pages/activity/current-work.ts:105 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 99415ced11be; files: ui/src/pages/activity/current-work.ts)

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-07T13:16:22.110Z sha 680a090 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 7, 2026
@shakkernerd shakkernerd self-assigned this Sep 7, 2026
@shakkernerd
shakkernerd merged commit 66a846f into main Sep 7, 2026
141 checks passed
@shakkernerd
shakkernerd deleted the fix-activity-snapshot-publication branch September 7, 2026 13:46
@shakkernerd

Copy link
Copy Markdown
Member Author

Fixed: Live activity displays known running sessions while new work starts and keeps incomplete empty results visibly loading.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 8, 2026
Live activity displays safely reconciled active sessions while refreshing for newly started work and keeps incomplete empty results visibly loading.
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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